Files
makelore/.project-docs/30-worklog/tasks/20260928-teacher-hover-intro-a73f6e29.md
T

13 KiB

Task: Show playful teacher introductions on hover and simplify the consultation header

Identity

  • Task ID: 20260928-teacher-hover-intro-a73f6e29
  • Mode: Feature
  • Branch: codex/20260928-teacher-hover-intro-a73f6e29-teacher-hover-intro
  • Worktree: /Users/chillishark/Makelore 麦洛/.codex-worktrees/makelore-teacher-hover-intro
  • Base commit: b26e25c9ed
  • Owner: codex
  • Status: Ready for Integration

Scope

  • Move published teacher introductions into playful hover cards on the existing topbar entries. Remove introductions and the add/expand/close icon group from consultation headers.

Intent And Constraints

  • User explicitly requests this presentation/interaction change. Preserve published identities, teacher selection, conversation history, per-agent drafts, model/auth contracts and true proactive messages. Hover/focus must not start a conversation or acknowledge messages. Keep the existing single light visual system and native preview usable.
  • Use the current entry to toggle its panel; selecting another teacher opens that teacher. Retain Escape and drag resizing. Keep explicit new topics as a text action inside expanded history, outside the header.
  • Follow-up: user explicitly requests updating the existing temporary application without taking desktop focus. Reuse its isolated profile and avoid activating windows during verification.

Project Context Loaded

  • Task ID/mode/branch/worktree/base match Identity and the successful start/status registry. All other registered task scopes reviewed through their records; prior classroom/style/integration tasks are completed sources. Main's teacher-focus task is active but owns prompt work, with no overlapping frontend files. Isolated ownership avoids contention.
  • Read entry/planning instructions, memory index, active task, positioning, current state, teacher ADR/decision index, relevant architecture/domain/evidence and reflection/commitment/stale indexes. Current main uses generic server-distributed identities with separate drafts and pinned topic versions; older fixed-role task records are historical.
  • Design skill search selected soft playful cards. Adapt cream/pale blue, rounded borders and restrained offset shadows to existing Chinese typography; no new font download or product-wide theme. Hover content uses the published description; no invented biography.
  • 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.
  • User requests removing the two pictured footer messages: the invitation to type below and the count of omitted earlier messages. Delete only their Renderer presentation; preserve context selection metadata, replies and input behavior.
  • Same-task ownership resumed and verified; previously loaded project context still applies. Refreshed the active peer agent-refresh record: it now implements catalog refresh on top of 862477f in its own checkout and explicitly leaves the running trial alone. Code-path overlap is limited to separate concerns in TeacherChatPanel; no semantic conflict. Gate passed.
  • Remove the two elements, run existing focused verification and compile, then apply equivalent targeted hiding to the running trial without reloading its in-memory drafts or changing focus.

Follow-up Plan: Composer Placeholder

  • User requests the exact placeholder “和老师聊聊”. Same-task start/status identity matches; earlier loaded context remains applicable, peer refresh work is isolated and semantically separate. Gate passed. Change only the placeholder, compile, and update the live trial attribute without replacing input values or moving focus.

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 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.

  • Initial implementation was isolated on the recorded branch without deployment. The explicitly requested background trial update is recorded below; no main merge, remote push or deliberate teacher/model request occurred.

  • 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.

  • Passed: 9 browser layout checks, including 520px/1000px scrolling teacher strips, direct teacher-to-teacher hover, keyboard focus/Escape, click then pointer movement, unread bubble preservation and native viewport clearance. Reviewed rendered card and desktop conversation screenshots.

  • Passed: both targeted Electron scenarios (consultation drafts/teacher switching and topbar/proactive presence) against the final production build. One run failed before the teacher interaction at the existing sidebar drag assertion (193px instead of 256px); a separate retry of that scenario passed without source/test changes to the drag behavior.

  • Passed: standard typecheck, changed-file ESLint, production Vite/Electron compilation, git diff whitespace check, project-docs structure and task-aware ownership drift checks.

  • 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.

  • Footer-copy follow-up: removed the redundant invitation to type below and omitted-history message count from TeacherChatPanel; context metadata and other response behavior are unchanged. Existing coding-teacher-ui tests (38) passed, as did typecheck, scoped ESLint and production build. The live trial had three matching footer paragraphs; all three became invisible after the targeted presentation update. PID 27713, current input values and foreground PID were preserved; no reload, message or window activation occurred. Temporary inspector was closed afterward.

  • Placeholder follow-up: changed the source textarea placeholder to exactly “和老师聊聊”. Typecheck, scoped ESLint and production compilation passed. Updated the same live Renderer attribute and installed a scoped observer for subsequent panel remounts until its next normal load. Verified the exact placeholder, unchanged input values/focus, unchanged foreground app and same PID 27713. No restart/reload or message occurred; temporary inspector closed after the update.

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 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.