Merge teacher composer actions into latest main

This commit is contained in:
鲨鱼辣椒
2026-09-29 23:36:05 +08:00
5 changed files with 95 additions and 15 deletions

View File

@@ -0,0 +1,71 @@
# Task: Hide teacher model selector from the composer
## Identity
- Task ID: 20260929-teacher-composer-actions-e819c3d7
- Mode: Feature
- Branch: codex/20260929-teacher-composer-actions-e819c3d7-teacher-composer-actions
- Worktree: /Users/chillishark/Makelore 麦洛/.codex-worktrees/makelore/20260929-teacher-composer-actions-e819c3d7
- Base commit: a77ddbd6813bb71d490544edfef6e1f35240070f
- Owner: codex
- Status: Ready for Integration
## Scope
- Hide the teacher composer's model picker, model name and configuration details; retain the microphone, send and in-flight stop controls.
## Intent And Constraints
- User explicitly requests a presentation change to the screenshot's teacher input controls and subsequently authorizes updating the running application. Preserve existing voice, model choice/request/retry semantics, cloud configuration, drafts/history, shortcuts and billing. Do not merge main, push, replace the formal installation or discard concurrent renderer updates.
## Outcome
- Removed TeacherModelSelect from TeacherChatPanel (one import and its rendered element). Idle footer now contains only microphone and send; the running reply still exposes stop. Model names, dropdown and configuration messages are no longer rendered there.
- Existing stored model preferences, published defaults, frozen retries, voice transcription, shortcuts, drafts/history and backend contracts remain unchanged. The hidden selector no longer makes its model-directory request. README now describes the visible controls accurately.
- Source changes are isolated on this task branch. At the user's subsequent request, updated the running temporary trial (PID 32583) with an immediate scoped display change and a compiled renderer for its next load. No main merge, push, cloud change or formal installation replacement was performed.
## Verification
- 88 relevant tests passed across coding-teacher-ui, teacher-composer-voice and teacher-conversation-panel. Updated the existing model-picker test to seed an old preference and verify unchanged send/remount behavior without a picker or model-directory call.
- Updated two existing browser scenarios: 319px and 508px panels show exactly microphone/send buttons with no model/config text or horizontal overflow; default and previously saved model sends preserve their original parameters. Both passed (4.8 seconds); both generated screenshots were visually inspected.
- Browser tests use the existing isolated Vite/mock-API fixture and installed Chrome in headless mode (MAKELORE_LAYOUT_BROWSER_CHANNEL=chrome). Initial default launch could not find Playwright's bundled Chromium; no app behavior ran in that attempt, and no browser installation was needed. No real model calls or user application interactions.
- Standard typecheck, scoped ESLint, build:vite and git diff --check passed. Build log: /tmp/makelore-teacher-composer-actions-build.log. Project-doc structure and task-aware drift checks passed.
## Follow-ups
- Merge the source branch when requested. The running trial now includes this UI update; its older Main and the formal installed app remain unchanged.
## Promotion Candidates
- Target: canonical teacher UI/current-state at next integration. Proposal: hide model picker and details from the teacher composer while retaining microphone/send/stop and existing model execution/retry semantics. Evidence: explicit screenshot-based user instruction, 88 unit tests, two narrow/wide browser cases and inspected screenshots. This supersedes the prior visible-picker UI requirement only; user confirmation is already supplied, and no cloud-model ownership decision changes.
## Project Context Loaded
- Identity: feature task, branch/worktree/base as above; task_context start/status passed with exact ownership and reservation. Main base a77ddbd already contains the window-close fix and merged teacher composer/compact shortcuts.
- Read: AGENTS, entry/memory-index/planning-gate, active task, positioning, current-state, decision index and teacher ADR, architecture, domain/success criteria, evidence/reflection/commitment context. Canonical current-state retains historical UI descriptions; current README and user instruction govern this small presentation change.
- Goal: child-friendly project creation with cloud-defined teachers. Main/cloud own model execution and billing; this change only hides the picker UI. Existing pending requests retain their frozen model and idempotency identity.
- Peers: all registered Scope/Intent/Promotion sections inspected. Teacher composer/model and shortcut tasks supply already-merged behavior; the latest user request explicitly narrows visible controls. Grouped teacher introductions and Code back-entry touch separate surfaces. Child-language has incomplete scope but no concrete dependency. No blocking semantic conflict; peer worktrees stay untouched.
- Files: TeacherChatPanel, existing teacher-reply-layout tests, README and this record. No server/API contract changes or new design system.
- Gate: Passed.
## Plan
1. Remove only the model picker import/render from the teacher composer.
2. Adapt existing narrow/wide browser cases and run voice/send regressions, typecheck, scoped lint and build; inspect screenshot.
3. Record verification and prepare a clean feature commit.
## Live Update Resume
- Same-task start/status passed. Project context and source remain the completed 8af0ca7; source tests/build already passed. Peer group-intro and code-back-entry update the same trial and must be preserved; no cross-thread messages were sent.
- Actual trial is PID 32583 with isolated makelore-trial-tdq_nuah/user-data. Served dist is teacher-composer-4f829ac1/source/dist, a real directory; its latest index matches code-back-entry-33d87a81/source-with-group-intro/dist (index-Dh1e8q7U.js). launch/guidance metadata initially lags those renderer updates, so the actual loaded/served asset hashes are authoritative.
- Gate: Passed for scoped update, preserving peer task checkouts and their staged source. Create an independent copy of the latest combined build source and apply only the tested three-line picker removal. Verify/build it before publication; re-check live baseline and process/profile immediately before swapping hashed assets and index atomically.
- Apply a narrowly scoped CSS hide to the existing renderer via Electron insertCSS, closing only an already-open model dropdown if necessary. This makes the requested display change immediately without reloading user conversations or disrupting active state. The same change is compiled into the next renderer entry so it survives reload/restart. Keep old assets/index for rollback, verify actual controls and process/state preservation, and record accurate loaded-versus-next source metadata.
## Live Update Result
- Completed 2026-09-29 23:22 Asia/Shanghai. Independent stage: `/var/folders/mx/ltbgwsks5_n8zllj69p_wbcw0000gn/T/makelore-trial-tdq_nuah/teacher-composer-actions-e819c3d7`. Product sources differ from the latest combined renderer only by the three-line picker removal; preserved grouped teacher introductions, Code return entry, shortcuts and the old Main-compatible teacher conversation API.
- Staged typecheck, focused saved-model unit regression and build:vite passed. Both 319px/508px browser cases passed (6.1 seconds), and both screenshots were visually inspected. The initial staged browser attempt failed because the current repository test fixture imported a newer API export absent from the older trial; adapted only that staged test fixture and reran successfully.
- PID/profile and served-index checks passed before publication. Copied new hashed assets, retained old assets, and atomically replaced the served index with `index-DcnlEkIE.js` (SHA256 `1c35dc1bc65bf70893c85e95fc5bd62628cd7bc09bca82a0d6538a412523947f`). Existing loaded asset remains `index-Dh1e8q7U.js` with the scoped CSS overlay; no reload/restart occurred. launch.json and guidance-preview.json distinguish loaded versus next renderer and preserve previous overlay metadata.
- Teacher panel was already closed immediately before publication and remained closed. Before/after hashes confirm unchanged inputs, selected conversation, drafts, operation messages, teacher messages and local storage; route, focus and panel state also match. A temporary offscreen DOM probe verified the live stylesheet hides only the model trigger while microphone/send remain displayed, then removed itself. Full composer appearance was verified in the isolated browser screenshots, not by opening the user's closed panel.
- The first attempts stopped before publication because another task had closed the inspector, the equivalent macOS `/var` and `/private/var` paths needed canonical comparison, and the panel had since been closed. Reopened only this trial's diagnostic connection, canonicalized profile validation and allowed the already-closed panel without changing its state. No user-state repair was required.
- Read-only subagent review identified metadata rollback/concurrency checks; added conditional metadata rollback and a final served-index comparison before publication metadata. `verification.json` records the successful update and state checks. Existing trial Main and the separately running installed app (PID 49184) were untouched.