feat(chat): simplify teacher pane and color follow-up cards

This commit is contained in:
鲨鱼辣椒
2026-09-28 12:43:39 +08:00
parent 80c9c0d683
commit 862477f9d4
8 changed files with 51 additions and 38 deletions

View File

@@ -28,10 +28,16 @@
- Gate: Passed. Plan: implement tooltip and preview clearance, simplify the panel while preserving navigation, verify relevant unit tests, browser layout and isolated Electron interactions, then document delivery. No live teacher requests, remote publication or app restart in this task.
- Trial-update resume: matching start/status ownership restored to planning; prior product context rechecked, all peer scopes reviewed and unchanged. Gate passed. Existing trial metadata points to an exited process and an older checkout; installed production is a distinct running application. Plan: reuse the verified 772da4f build in the isolated trial, add a local background startup wrapper, preserve the profile/port, and verify runtime and foreground ownership read-only. Earlier no-restart constraint is superseded only for the explicitly requested trial update.
## Follow-up Plan: Reply Cards And Header Removal
- User approved the proposed pale blue/cream/lavender follow-up cards with 16px text and requests removing the entire duplicate avatar/name header. Update the same trial afterward; the earlier no-focus constraint persists.
- Same task/worktree resumed via start/status; prior project context and peer scopes remain unchanged. Design search recommends soft playful cards; adapt only the approved colors/typography without adding fonts or unrelated layout. Gate passed.
- Change Renderer styles/header only, preserve generated suggestions, submission and per-agent drafts. Update affected existing tests, visually inspect in a headless fixture, and refresh the running trial in the background where feasible.
## Outcome
- Added a cream, rounded introduction card using the published teacher name, avatar and description. Hover or keyboard focus opens one card at a time outside the scrolling topbar; empty descriptions do not create a card. The pointer can enter the card to read long descriptions. Leaving, Escape or clicking the entry closes it; moving inside the clicked entry does not reopen it until a fresh entry.
- Removed the introduction and add/expand/close icon group from the consultation header. Clicking the selected topbar entry toggles its panel; switching entries selects that teacher. Escape restores focus to the selected teacher, per-agent drafts remain intact, drag resizing remains available, and the new-topic text action sits in expanded history.
- Removed the introduction and add/expand/close icon group initially; the approved follow-up removes the entire duplicate avatar/name header. Identity remains in the topbar and individual reply attribution. Clicking the selected topbar entry toggles its panel; switching entries selects that teacher. Escape restores focus to the selected teacher, per-agent drafts remain intact, drag resizing remains available, and the new-topic text action sits in expanded history.
- Extended native work preview clearance to include the introduction and any real unread speech bubble, using the maximum overlapping clearance. Hover does not create topics, send requests or acknowledge unread messages. README describes the final behavior.
- Independent review caught immediate entry-switch overlap and selected-entry focus restoration issues; both were fixed and covered. Final screenshot review prompted a second pointer-move opening-path regression, now fixed by keeping pointer-enter as the sole mouse opening path.
- During delivery, the peer teacher-focus task completed and a separate read-only agent-refresh task was registered. Its task record was reviewed; it changes no presentation/runtime code and has no semantic conflict.
@@ -39,6 +45,9 @@
- Trial update completed: existing `Makelore Teacher Trial.app` (bundle `cn.makelore.teacher-presence.trial`, Electron 43.4.0) now runs this checkout's verified 772da4f build as PID 27713. Reused `/var/folders/mx/ltbgwsks5_n8zllj69p_wbcw0000gn/T/makelore-trial-tdq_nuah/user-data` and port 54599. The prior recorded trial PID had already exited, so no running application was stopped.
- A machine-local `dist-electron/main/trial-background.cjs` bootstrap, excluded from Git, guards startup show/focus calls and launches through `open -g -j`. It leaves the window hidden until the user activates it; normal window behavior is restored upon user activation. Metadata backups and startup/focus evidence are kept beside the existing trial. Production code and the installed application were not modified.
- Reply-card follow-up: generated follow-up questions now use pale blue, cream and lavender cards in order, 16px text and 1.8 line-height, dark readable text, responsive wrapping, hover/focus and disabled states. Both suggestion-generation and ordinary follow-up groups share the style. Removed unused header/icon styles and kept admin preview identification outside a header.
- Updated the current trial presentation through Electron insertCSS after verifying the exact PID/path/window. Renderer/Main were not restarted: operation drafts are held in memory, so this avoids losing them or authentication. The current page receives equivalent selectors for its existing markup; the rebuilt source removes the header and uses the new card markup on the next normal load. No fake cards or messages were added to the real profile.
## Verification
- Passed: 98 tests across teacher-companion, coding-teacher-ui, coding-chat-panel and preview-clearance suites on the final changes.
@@ -48,10 +57,13 @@
- Independent code review passed. Electron interaction tests use isolated profiles and fixture responses; no real-model interaction or production installation was exercised.
- Background trial verification: exact process path and Host API listener confirmed; OPTIONS runtime-info returned 204. Loaded Renderer URL points to this checkout and `index-PjM22P-Y.js`; the document is complete and React root is mounted. Startup status recorded one blocked show, a loaded hidden/unfocused window, and the original isolated profile. A 12-second NSWorkspace foreground monitor recorded no trial activation and retained the previously foreground application's PID throughout. Verification performed no UI click, activation or test message.
- Reply-card follow-up passed 91 existing unit tests, typecheck, changed-file ESLint, production build and whitespace checks. Existing Electron assertions were updated for the removed header but not launched during this follow-up. A headless visual sample using the supplied text verified the actual card CSS at 540px and 320px: 16px font, 28.8px line-height, three expected colors and no horizontal overflow.
- Live update retained PID 27713 and all current input values; the window remained unfocused and the foreground app PID stayed unchanged. Subsequent read-only DOM inspection confirmed the open consultation header had zero height. No generated follow-up cards were mounted at inspection, so their rendering was verified in the headless sample rather than claimed as a live conversation check. The temporary loopback Node inspector was closed after verification.
## Follow-ups
- Integrate this branch when requested; retain this worktree because the updated trial now runs its compiled output. The user can activate the existing `Makelore Teacher Trial` Dock entry to review the interface.
## Promotion Candidates
- Target: `.project-docs/30-worklog/current-state.md` and the canonical classroom interaction description. Proposal: published teacher introductions live in transient topbar hover/focus cards, and consultation headers contain identity only; the selected entry toggles the panel and new topics remain available inside expanded history. Evidence: explicit user request, changed components, 98 unit tests, 9 browser layout checks and 2 Electron scenarios. Future impact: preserves the consultation capability while simplifying the teacher selection surface. Semantic conflicts: none with generic distributed identities, pinned topic versions or true proactive messages. Human confirmation: already supplied for this interaction; canonical promotion remains an integration-mode step.
- Target: `.project-docs/30-worklog/current-state.md` and the canonical classroom interaction description. Proposal: published teacher introductions live in transient topbar hover/focus cards, and the duplicated consultation header is removed; generated follow-up questions use three alternating pastel cards with 16px text; the selected entry toggles the panel and new topics remain available inside expanded history. Evidence: explicit user request, changed components, 98 unit tests, 9 browser layout checks and 2 Electron scenarios. Future impact: preserves the consultation capability while simplifying the teacher selection surface. Semantic conflicts: none with generic distributed identities, pinned topic versions or true proactive messages. Human confirmation: already supplied for this interaction; canonical promotion remains an integration-mode step.