Files
makelore/.project-docs/30-worklog/tasks/20260929-teacher-prompt-buttons-a682d30f.md
T

17 KiB

Task: Move configured teacher prompts above composer

Identity

  • Task ID: 20260929-teacher-prompt-buttons-a682d30f
  • Mode: Feature
  • Branch: codex/20260929-teacher-prompt-buttons-a682d30f-teacher-prompt-buttons
  • Worktree: /Users/chillishark/Makelore 麦洛/.codex-worktrees/makelore/20260929-teacher-prompt-buttons-a682d30f
  • Base commit: 78cfde6734
  • Owner: codex
  • Status: Ready for Integration

Scope

  • Present Yuxi-configured teacher shortcuts above the composer as compact clickable text; preserve exact configured label/prompt and existing send/voice/model behavior.

Intent And Constraints

  • User authorized code and background trial update. No subagents, cloud deployment, paid prompts, main merge/push, focus changes or history deletion.

Outcome

  • Configured teacher shortcuts sit outside and directly above the composer. Latest approved styling uses one shortcut per row, eight distinct 13px/600 text colors with matching subtle shadows, no fill/border/box shadow, a small chevron and hover underline. The target-to-composer gap is 8px; wrapping/overflow/keyboard focus supported.
  • Adapted product/tests dependency from main 53d5b6b (bb96941); original source task record remains in its source commit, excluded from this feature boundary. Explicit empty arrays hide prompts; absent historical field retains approved fallback. Published label and prompt are unchanged.
  • Trial Renderer updated in place in PID 32583; Main and empty-work preview overlay remain intact. Live Alice cloud v53 supplies “继续看看咯”.

Verification

  • Typecheck, lint (0 errors / 8 existing warnings), production build passed. 75 focused unit tests and 23 headless browser scenarios passed, including 319/508px overflow, keyboard focus, exact configured prompt sends, preserved drafts, cloud refresh/empty list and voice/model controls.
  • First test pass exposed two stale assertions in the imported tests (send argument position and old toolbar ownership); adapted them. One rerun hit the existing old-topic stream timing test; serial rerun passed all 75 with no product changes.
  • Trial screenshot confirms 13px, weight 400, no shadow, buttons above composer, no horizontal overflow. Same account/storage/drafts/teacher/tab; focus monitor reports no trial activation.
  • Operation hydration initially collided with the existing E2E trial 250ms background-sleep timer while the desktop was at loginwindow. Read-only inspector diagnosis traced stop to BackgroundLifecycleController.sleepIfIdle (same failures present at 11:28Z before this update). A temporary Main-owned snapshot-verification lease allowed normal selectConversation hydration; then released it. No runtime code or user files changed. Final comparison: all 14 operation messages, teacher turns, drafts, selected teacher, route/tab unchanged; 15 timestamps visible. No live prompt or microphone call. All inspector breakpoints were removed.

Follow-ups

  • Feature branch awaits separate integration; no main merge/push or cloud deployment in this task. Prior model-selection cloud rollout remains pending.

Promotion Candidates

  • Target: integrated classroom UI documentation. Proposal: configured prompts live 8px above the composer as transparent 13px/600 clickable text, one shortcut per row with distinct readable colors, matching text shadows and hover underline; exact cloud labels/prompts, absent/empty compatibility and send guards retained. Evidence: user approval, 75 unit / 23 browser tests and live trial comparison. No product-policy conflict; canonical promotion belongs to integration.

Project Context Loaded

  • Task ID/mode/branch/worktree/base: matching official reservation and owner verified; feature task at 78cfde6734 in the isolated path above.
  • Read: AGENTS; entry, memory index, active task, positioning, current state, decisions/teacher ADR, architecture, domain rules, success criteria, evidence/commitment indexes and all registered peer Scope/Intent/Promotion sections.
  • Goal: child-friendly creation with cloud-defined teachers and Main-owned auth/model access. Current code and README supersede stale canonical mentions of retired discussion components.
  • Active peers: window-close (native lifecycle, explicitly excludes trial), help-label/replies-release, child-language (undefined scope), and completed teacher/composer/community/empty-preview tasks. No concrete semantic conflict; preserve their committed behavior and do not modify peer checkouts.
  • Relevant dependencies: main 53d5b6b adds configured shortcuts; current trial has 78cfde6 microphone/models and empty-preview 0167d36 overlay. Only shortcut support and presentation are brought into this task.
  • Files: TeacherChatPanel, classroom-workspace.css, shared definition and focused UI/layout fixtures, README. Existing single light palette and body font remain; design skill recommendations subordinate to approved layout.
  • Gate: Passed.

Plan

  1. Reconcile committed Yuxi shortcuts support with trial composer, preserving empty-array versus absent compatibility.
  2. Move controls above composer and give them body-size, normal-weight, pale rounded styling with keyboard focus and wrapping.
  3. Verify UI behavior/layout, typecheck/lint/build; update current trial in background preserving source overlays and user state; document evidence.

Compact Shadow Follow-up

  • Same-task ownership resumed and verified at efd1894. Reused the unchanged planning context above and reread current peer scopes; no new conflict. Gate passed.

  • User now wants smaller buttons without a visible border, using background and soft shadow. Keep 13px text for readability, reduce minimum height from 36px to 30px and padding to 4px/10px, soften corners.

  • Plan: update only prompt CSS, existing layout assertions and product/task documentation; verify targeted layouts and build. Refresh the built stylesheet in the running trial without remounting conversations or activating the window.

  • Completed: prompt button minimum height 30px (was 36px), padding 4px/10px, 8px corners, no border, soft 2px/6px shadow and pale cream background. Font remains 13px/400.

  • Verification: typecheck, lint (0 errors, 8 existing warnings), source/staged production builds and six 319/508px prompt/model/microphone layout scenarios passed. Existing checks now assert no border, a shadow and 30px height.

  • Updated the production stylesheet link in the live trial, with new built assets/index installed for subsequent reload. No Renderer remount or Main restart; live JS behavior is unchanged. Native capture confirms 30px, zero border and soft shadow. All localStorage, input text, operation messages, teacher turn text and route remained byte-identical; window stayed unfocused.

Click Affordance Follow-up

  • Same-task ownership and existing planning context verified again at dc8f766; peer scope decisions remain compatible. Gate passed. User wants the compact borderless prompts to look unmistakably clickable.

  • Plan: retain 30px/13px sizing, strengthen the warm fill and bottom shadow, add a small decorative chevron, and provide hover/pressed depth feedback with reduced-motion support. Update existing layout checks and hot-swap the built stylesheet in the trial, preserving live conversations.

  • Completed: 30px borderless buttons now have a warmer pale-yellow fill, 2px bottom shadow and decorative chevron. Hover raises 1px and pressed state lowers 1px; reduced-motion keeps position stable. Exact configured text and accessible name unchanged.

  • Verification: typecheck, lint (0 errors / 8 existing warnings), source and combined-stage production builds, and six focused browser cases passed. Existing cases now exercise hover, pressed and reduced-motion feedback as well as 319/508px layout and exact prompt sends.

  • Trial stylesheet index-ydJGBX8O.css installed and activated without reload. Native screenshot inspected; computed height 30px, font 13px, border 0 and raised shadow confirmed. All storage, inputs, 14 operation messages, teacher message text and route unchanged; focused=false before/after. No cloud changes or live messages sent.

Smaller Reply Cards Follow-up

  • Resumed the same visual refinement task at 79b1dc1; verified ownership, existing planning context and peer registry against the last reviewed state. No new overlap. Gate passed.

  • User identifies the generated three-color reply cards, separate from the configured prompt buttons. Reduce one size: text 16px to 14px, padding 14px/16px to 10px/12px, radius 16px to 12px, gap 10px to 8px, arrow 16px to 14px. Keep full row width and at least a 44px target, colors and click/send behavior.

  • Plan: change scoped CSS, existing browser assertions and docs; build and swap the current trial stylesheet without remounting conversations or changing focus.

  • Completed the requested size step for generated reply cards only: 14px text, 10px/12px padding, 12px radius, 8px row gap, 14px chevron and 44px minimum target. Three colors, full-width layout and click behavior unchanged; configured prompt buttons retain their previously approved size/style.

  • Verification: typecheck, full lint (0 errors / 8 existing warnings), source/combined-stage builds and 10 browser reply-history/card interaction cases passed at 319px and 508px.

  • Hot-swapped trial stylesheet index-CZpr_a7Y.css without reload or focus acquisition. Actual three screenshot cards now measure 45.8px high with 14px text. Native image inspected; storage, current text inputs, operation messages, teacher history and route match before the update. No live model calls.

Text Shortcut Follow-up

  • Same-task ownership resumed at fef3b3a, matching feature task/branch/worktree verified. Reused previously read unchanged project memory and reread peer scope/constraints/promotions. Latest live trial includes Code brand navigation, hidden model selector and grouped introductions; preserve these overlays. No peer semantic conflict with scoped shortcut CSS. Canonical memory remains read-only. Gate passed.

  • User requests removing the shortcut background and making it clickable text. Design skill search/reference used for semantic buttons, stable hover and focus feedback; keep existing product palette/typeface rather than introduce a new system. Use 13px muted green text plus existing chevron, transparent background, no border/shadow, hover underline/darker text and visible keyboard focus. Preserve 30px hit height, wrapping and exact cloud labels/prompts.

  • Plan: change only shortcut CSS, adapt existing layout assertions and current README. Verify existing narrow/wide shortcut click/keyboard/overflow scenarios, typecheck/lint/build. Copy the latest combined trial stage, apply only this CSS block, and swap its built stylesheet in the running app without remounting chats or changing desktop focus; compare live state before/after.

  • Completed text treatment: removed fill, border and raised shadow; 13px/400 green text with chevron, darker underlined hover, stable position and keyboard outline. Kept 30px targets, cloud label/prompt, input visibility conditions and sends unchanged. This supersedes the earlier raised-button styling.

  • Verification: four existing shortcut/layout scenarios passed at 319px and 508px (including click/prompt contract, eight long labels, focus, hover/pressed/reduced-motion, empty config and input/send position). Typecheck, full lint (0 errors / 8 existing warnings), source and combined trial production builds passed. Inspected browser screenshot. Task-aware docs drift and diff whitespace checks passed.

  • Updated only the live stylesheet to index-_6TMWSCY.css in PID 32583; no Renderer reload, Main restart, prompt or native focus call. Copied the latest Code-brand/hidden-model/group-intro composite before applying this CSS so peer work remains. Served index/assets also prepared for subsequent normal reload. Immediate swap remained unfocused. Read-only check confirmed transparent/none/13px/30px rules; route unchanged and no localStorage changes beyond normal auth state. The app loaded 14 messages after the initial empty snapshot and later became focused with its consultation open, so live message/input snapshots were not stationary and are not claimed byte-identical. No history or draft writes were performed. Inspector closed.

  • Evidence: /tmp/teacher-text-link-{browser,typecheck,lint,build,trial-build}.log, /tmp/teacher-text-link-results and trial teacher-text-shortcuts-a682d30f/verification.json. No main merge/push or cloud publication in this follow-up.

Text Weight and Spacing Follow-up

  • Same-task ownership resumed at fd0b720; verified task/feature/branch/worktree and read peer scopes. Existing design/planning context reused unchanged. Latest trial sidebar-group overlay is unrelated and must be retained. No subagents or native activation; scope is only shortcut typography/spacing. Gate passed.

  • User asks for bolder text, a text shadow, and closer placement above the composer. Plan: use 600 weight and a subtle 1px green text shadow; reduce group bottom margin from 10px to 2px while keeping focus-ring clearance (button-to-composer gap 16px to 8px). Preserve transparent background, no box shadow, labels, click behavior, 30px target and wrapping. Update existing layout assertions, run checks/build and hot-swap CSS from a copy of the latest composite trial.

  • Completed: 600 weight, 1px subtle green text shadow and 8px target-to-composer gap. Transparent background, no box shadow, cloud text/prompt, input visibility and click behavior unchanged.

  • Verification: four existing browser scenarios at 319/508px passed, including exact shortcut sends, long-label overflow and focus/hover/pressed behavior. Browser screenshot inspected. Typecheck, full lint (0 errors / 8 existing warnings), source and composite production builds passed.

  • Trial: copied the latest sidebar-groups composite and changed only shortcut CSS. Built stylesheet index-DLG7JTx3.css was activated in PID 32583 without Renderer reload or Main restart; installed composite assets for later normal reload. Read-only verification confirmed 13px/600 and rgba(83,105,73,0.25) text shadow. Route, storage, drafts, 14 operation messages and teacher contents are unchanged; focused=false before/after. Inspector closed. No live prompts, cloud publication or main merge/push.

  • Evidence: /tmp/teacher-text-depth-{browser,typecheck,lint,build,trial-build}.log, /tmp/teacher-text-depth-results and temporary trial teacher-text-depth-a682d30f/verification.json. Task-aware docs and whitespace checks passed before commit.

Colored Text Follow-up

  • Resumed the same task at 83a19fb, verified matching feature/branch/worktree ownership and reread peer scope records. Existing planning/design context unchanged; sidebar grouping remains unrelated. Teacher composer-files peer has no concrete dependency on shortcut colors; preserve its work and any newer trial overlays. Gate passed.

  • User wants a different text color per row. Plan: one configured shortcut per row, with eight distinct readable colors, matching subtle text shadows and darker hover/pressed variants. Keep 13px/600, transparent background, 30px target and 8px composer spacing; no prompt or sending changes. Adapt existing browser checks, verify builds and update trial CSS without reload or native focus.

  • Completed: eight distinct blue/purple/ochre/teal/rose/indigo/terracotta/green colors, one shortcut per row, with matched text shadow and darker hover/pressed colors. Base text contrast on the pane is at least 4.85:1. Prevent flex shrinking from compressing wrapped lines inside the bounded scrolling area.

  • Verification: four existing browser cases passed at 319/508px, including eight distinct row colors, no overlapping/clipped wrapped text, exact sends, focus and 8px composer gap. Inspected narrow screenshot after correcting the wrap compression found visually. Typecheck, lint (0 errors / 8 existing warnings), source and latest-composite production builds passed.

  • Trial stylesheet index-D03AC39p.css activated in PID 32583 without reload, restart or native focus. Preserved latest composite overlays; next-load assets prepared. Read-only verification confirms transparent background, no box shadow, 600 weight and color-based text shadow. Local storage and route stayed identical; app stayed unfocused. Conversation hydration progressed from 0 to 14 operation messages during verification, so messages/inputs are not claimed byte-identical. No writes to history/drafts or model requests were made. Inspector was already open on the verified trial PID and is left as found.

  • Evidence: /tmp/teacher-text-colors-{browser,typecheck,lint,build,trial-build}.log, /tmp/teacher-text-colors-results and temporary trial teacher-text-colors-a682d30f/verification.json. No main merge/push or cloud publication. Task-aware docs and whitespace checks passed.