refactor(teacher): retire discussion components and keep text replies
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
# Task: Retire teacher discussion components and preserve text replies and quick replies
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20260928-teacher-reply-cleanup-c8e4a219
|
||||
- Mode: Feature
|
||||
- Branch: codex/20260928-teacher-reply-cleanup-c8e4a219-teacher-reply-cleanup
|
||||
- Worktree: /Users/chillishark/Makelore 麦洛/.codex-worktrees/makelore-teacher-reply-cleanup
|
||||
- Base commit: ae0f72d8fa0089f87b41d272da220e1c1397aec8
|
||||
- Owner: codex
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- Remove retired visual discussion components from UI, state, context, parser, service and routes; keep teacher prose, clickable quick replies and free input.
|
||||
- Preserve opaque historical data, agent/version selection, read tools, proactive check-ins, billing and operational Agent.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- User explicitly authorizes this product change, superseding old component-based teaching plans. Do not publish cloud configuration, restart applications or steal desktop focus.
|
||||
- Gates passed: read AGENTS, project entry/read-before-planning, memory and indexes, relevant positioning/teacher decision/domain/architecture/current-state/evidence/commitment/stale records, success criteria and peer task scopes. Managed feature worktree identity verified against registry.
|
||||
- Isolated from the live trial checkout. Frontend and reply protocol implementation delegated; backend/context/store and integration verification owned here.
|
||||
- Follow cloud agent configuration for persona, length, prefixes and style; keep only output format and single-angle guided-help requirements locally.
|
||||
- Plan: remove active component plumbing; retain passive legacy fields; add UI/parser/history/service/cloud regressions; run typecheck, targeted/full unit checks, build and guarded UI verification; document and commit.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Removed all four interactive discussion views, their dedicated CSS, state/focus/conversion/lifecycle actions, client mutation API, Host API mutation routes and backend state machine. Pending drafts restore only current send fields while retaining request identity for safe retry.
|
||||
- Ordinary questions and guided-help/suggestions use one text + quickReplies envelope. The local runner and cloud final-output path preserve project reads while keeping tool preambles out of the answer. Check-ins keep their existing plain-text path and scheduling/dedup behavior.
|
||||
- Removed old component schemas/instructions, hard-coded suggestion counts/length/student-voice policy and check-in/guided-help brevity additions. “帮我看看” recommends one concrete starting point with replies around it. Published persona, skills, language, length, prefixes and style remain authoritative; no Alice-specific runtime content.
|
||||
- Legacy discussion/context/snapshot/error data stays opaque and unmodified on read/list/save/recovery. No component is restored or updated. The parser supports old intro/questions, reply envelopes with inert tool data and damaged historical envelopes; only prose and suggestions survive. Raw parse failures or received cancelled output remain inert diagnostics, excluded from context/read_conversation.
|
||||
- Kept teacher selection/version binding, readonly project/source tools, native/cloud billing and request identities, cancellation, source/account guards, active check-ins and operational Agent unchanged.
|
||||
- README now describes the supported product behavior. No cloud publication, real application restart, live trial update or desktop focus change. Work is retained on this isolated feature branch.
|
||||
|
||||
## Verification
|
||||
|
||||
- `corepack pnpm run typecheck`: passed after the combined changes.
|
||||
- `corepack pnpm run lint:check`: passed; scoped ESLint rerun after final parser/service changes passed.
|
||||
- Final duplicate-card regression: both ordinary and guided suggestion cards use request ID + index keys; two repeated-text click/draft cases fail before the fix and pass after it. UI suite 52/52 and scoped ESLint passed; typecheck/build rerun after this final code edit.
|
||||
- Targeted teacher backend/cloud/model/read-tools/UI/parser/history/route/guidance run: 9 files, 281 tests passed. Frontend agent also verified teacher companion and chat panel suites: 103 tests passed across its initial 3-file run.
|
||||
- `corepack pnpm test`: first stage ran 261 files, 259 passed; 2551 tests passed, 3 skipped, 3 failed. The 3 failures are pre-existing Pi event-projector message expectations (2) and managed-worker-opener runtime-v6 versus v7 expectation (1). Isolated `git archive HEAD` base snapshot ae0f72d reproduces the exact same failures (3 failed / 12 passed); these tests and production coding-runtime/contracts/reducer paths have no task diff. Evidence: /tmp/makelore-teacher-reply-full-tests.log and /tmp/makelore-teacher-reply-baseline-tests.log.
|
||||
- The test script’s pressure stage was skipped by its `&&` after baseline failures, so ran `coding-chat-pressure.test.tsx --maxWorkers=1` separately: 1 passed.
|
||||
- `corepack pnpm run build:vite`: passed for Renderer, Main, Preload and utility worker. Generated output stayed ignored in this isolated checkout.
|
||||
- Playwright teacher-reply-layout fixture: 12 headless Chrome checks passed at 319px/508px; rich Markdown/font checks rerun after shared dependency allow-list fix: 2 passed. No Electron/native app launch. Shared Electron first-chat spec updated to assert absence of retired send fields, but native suite deliberately not launched under the no-restart/no-focus constraint.
|
||||
- Independent review found and resolved ordinary JSON questions/tool examples being mistaken for protocol and an aborted runner resolving normally losing received diagnostic bytes. Regressions cover both.
|
||||
- Production search confirms old component words/schemas remain only as passive archive types, historical transport/fence recognition, and test data. No active lifecycle/prompt/action code remains. Model-bound history and read tools use only prose + quick replies; no legacy archived fields or raw failures enter the model.
|
||||
- `check_project_docs.py`, task-aware drift check and `git diff --check`: passed before handoff.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- Integration must preserve the independent manual agent-refresh work while dropping its obsolete component state assumptions; this branch intentionally does not import another task’s unmerged feature.
|
||||
- Track the three existing unrelated Pi test expectation failures separately. No production Pi changes are included here.
|
||||
- Cloud agent configuration and cloud-side stored conversation history were not inspected or published; verification establishes what this client now sends, not an audit of remote prompt contents. Existing pinned versions are intentionally preserved.
|
||||
- Task was not merged, pushed or deployed. No post-merge worktree cleanup applies.
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- Targets: `30-worklog/current-state.md`, `10-decisions/ADR-2026-09-22-coding-teacher.md`, `20-architecture/data-flow.md`, `40-domain/business-rules.md`.
|
||||
- Proposal: current teacher UX is prose plus clickable quick replies/free input; retire prior ideas/structure/flow/comparison component plans and model schema/state instructions. Preserve opaque historical data and the teacher responsibility of organizing ideas, understanding relationships and carrying confirmed consensus; published configuration owns expression policy.
|
||||
- Evidence: explicit user direction in this task, deleted UI/API/state/schema paths, parser/history/model-payload regressions, headless interactive verification.
|
||||
- Impact/conflict: supersedes prior active component lifecycle and multiple-topic suggestion assumptions; no automatic migration or history deletion, no change to source/version/billing/operational Agent boundaries. Prior feature-task records remain historical evidence.
|
||||
- Human confirmation: already supplied by this task’s explicit product requirements; canonical promotion must still happen in a serialized integration task.
|
||||
Reference in New Issue
Block a user