9.6 KiB
9.6 KiB
Task: Integrate classroom teacher and friend workspace
Identity
- Task ID: 20260922-classroom-workspace-7b9e4c21
- Mode: Feature
- Branch: codex/classroom-workspace
- Worktree: /Users/chillishark/Makelore 麦洛/.codex-worktrees/makelore-classroom
- Base commit:
e5d271bc45 - Owner: codex
- Status: Ready for Integration
Scope
- Integrate the approved quiet project/chat workspace and teacher/friend consultation UI into the latest merged product, then run that combined source in the existing isolated trial app.
Intent And Constraints
- User authorizes integration and future edits in this combined version; latest steering permits subagents, used for bounded backend review and UI regression tests. Teacher guides thinking and methods, friend offers experience feedback, students initiate consultation. No memo/consensus UI. Preserve real Code runtime, project metadata, model/auth/payment controls. Main owns consultation APIs. Original dirty checkout is read-only; its abandoned consensus implementation is not imported.
Outcome
- Integrated the approved prototype layout and exact character assets into the latest repository base: project/conversations on the left, operation/work tabs in the center, optional resizable teacher/friend consultation on the right. Real runtime, account/model controls, project management and native browser preview remain connected.
- Added project-level role-specific consultation routes, topic history and account/project/role draft separation. Each explicit send references the selected operation conversation. No automatic model call on opening, no generated consensus or task list, no automatic insertion into the operation draft. Published teacher configuration remains authoritative; friend derives its model/limits/availability with a separate minimal persona.
- Preserved legacy source-level teacher and admin preview contracts. Fixed source deletion races; affected in-flight project consultation cancels while project history remains. Embedded work preview survives operation/work switching, and yields to overlaid consultations on narrow windows.
- Updated the existing external trial launcher at
/Users/chillishark/Makelore 麦洛/课堂工作区预览/launch.pyto default to this worktree. The original standalone prototype is retained behind--prototype; existing isolated trial profile is reused.
Verification
- Final focused regression: 8 files / 101 tests passed across backend, consultation/chat UI, title bar, main layout and sidebar. Browser preview lifecycle/occlusion: 7 tests passed separately (108 total). Coverage includes role/project/account isolation, source validation/switching, idempotency, delete races, explicit-only model requests, drafts, preview preservation, and narrow-overlay handling.
- TypeScript, scoped ESLint, production Vite/Electron build, Git whitespace check and project-document drift gate passed. Existing E2E assertions were adapted to the new routes/layout but the E2E runner was not executed.
- Native trial recompiled and restarted from this checkout. After the user unlocked macOS, verified both role panels, distinct visual treatments, suggestion-only draft filling, teacher draft restoration after role switch, independent friend draft, central work tab, operation draft preservation, and consultation expansion/restoration. Cleared inspection drafts. Real model response was not exercised: trial is signed out and has no selected operation model. Native preview lifecycle and narrow-window occlusion were verified in focused tests, not with a running user work page.
Follow-ups
- Detailed teacher pedagogy and role prompts remain a separate product discussion as requested. Production cloud model replies require a signed-in account and published enabled consultation configuration.
Promotion Candidates
- Target: current-state and teacher consultation architecture/domain documentation. Proposal: recognize the approved single-teacher/single-friend workspace, project-level role history with per-request operation source, and student-owned transfer from reflection to action. Evidence: user instructions, README, route/service/UI implementation and focused tests. Future impact: additional personas can extend the same project consultation pattern without creating operation tools. Semantic conflicts: older teacher ADR describes source-level topics and bringing responses back to the main draft; those remain legacy API/admin behavior, not the student workspace. Human confirmation: already supplied for this implementation and removal of memo/consensus; detailed role prompts still require the later discussion requested by the user. Canonical promotion deferred to an integration task.
Project Context Loaded
- Task ID: 20260922-classroom-workspace-7b9e4c21; mode: feature; branch: codex/classroom-workspace.
- Worktree: /Users/chillishark/Makelore 麦洛/.codex-worktrees/makelore-classroom.
- Base:
e5d271bc45. Ownership verified; no other active local owner. Original main contains only the previously rejected consensus feature changes; preserved in place. - Read: memory-index, active task, project-positioning, current-state latest integration, decision-index, system-overview, teacher ADR, relevant business-rules and success-criteria, README and AGENTS.
- Project goal: local creative work through Main-owned Code/Pi and independently billed text consultation. Latest integration adds cloud teacher and project conversations. Positioning and success docs contain template/stale sections; README, actual code, latest teacher ADR and this conversation govern scope.
- User's newer approved role design extends the single teacher UI with a friend and project-level consultation continuity. Detailed teacher pedagogy prompts remain cloud-owned and deferred. Friend uses the same approved model/availability channel with a minimal distinct experience-feedback persona, no tools or fabricated play experience.
- Modules: Code header, sidebar, central preview, consultation panel/API/service/context, focused tests.
- Gate: Passed.
Implementation Plan
- Reuse teacher request/persistence pipeline for role-separated project consultations, retaining legacy source-scoped and preview contracts.
- Integrate prototype layout, character entry points, resizable consultation, project drafts, and central real work preview.
- Verify roles/project isolation, explicit-only submission, draft persistence, source bounds, existing Code behavior; typecheck, focused tests, build and native trial inspection.
- Point the trial launcher at this combined source for future iterations and document current behavior.
Approved Interaction Follow-up (2026-09-22)
- Same task, branch and worktree resumed with matching ownership; no other active task owners. Gate passed after reloading task record, relevant project memory, teacher ADR, README and AGENTS. Current baseline is 68e676c; the recorded task base remains
e5d271b. - User explicitly approves this iteration after discussion: remove redundant project-context strip from the project-scoped consultation; support free questions and a deliberate “老师,帮我看看” action that generates project-contextual discussion questions. Offer “我也说不清,你带我看看” to start a concrete guided conversation. No demonstration view, memo, consensus or automatic implementation actions.
- Keep the existing quiet sage/sand UI; generic skill design-system results do not override the approved design. Add request intent and structured generated suggestions through the existing Main-owned consultation pipeline, then update Renderer, focused tests, README and the same temporary application.
- Implemented: removed redundant project strip from both consultation roles; student teacher empty state offers free input and “老师,帮我看看”. Explicit help requests carry per-turn intent through the existing model pipeline, validate a short introduction plus 2–3 contextual questions, and render questions as deliberate send actions. “我也说不清,你带我看看” starts one concrete conversational prompt; the help entry remains available during ongoing chat. Quick actions preserve free-text/quoted drafts; ordinary sends still clear accepted drafts. Reopened history and live snapshots reconcile accepted request identities, so unknown delivery can retry safely and known terminal requests can start a fresh request.
- Verification: 55 backend tests and 46 teacher/chat UI tests passed (101 total), with structured output validation, scope/intent/idempotency, streaming JSON suppression, failed/reopened/live-snapshot retries, draft retention and legacy friend/admin compatibility. Full typecheck, scoped ESLint, whitespace and production build passed. E2E fixture/spec updated but E2E runner not executed. Existing isolated trial restarted from the new build; native app visually confirmed the teacher project strip is gone and the ongoing-conversation help entry is present. One deliberate real help request reached the existing model path and ended with “老师暂时无法回复,请稍后重试。”; verified the retry action and restored editable composer. Successful real model-generated questions were not verified. Existing user conversation history was preserved.
- Service follow-up (outside this frontend iteration): the current generic model error does not prove a sign-in failure. Read-only comparison found teacher model-runner differs from normal provider/AI proxy handling of credential_mode, bare gateway base URL /v1 normalization, credential refresh, and upstream error categorization. These differences are possible investigation leads, not a confirmed root cause. No runtime credentials were inspected or changed, and model-runner remains untouched.