feat: 按老师发布配置渲染快捷提示
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# Task: Render and send published teacher shortcuts
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20260929-teacher-shortcuts-ml-8ce941d7
|
||||
- Mode: Feature
|
||||
- Branch: codex/20260929-teacher-shortcuts-ml-8ce941d7-teacher-shortcuts
|
||||
- Worktree: D:\Datas\OthersProjects\.codex-worktrees\makelore\20260929-teacher-shortcuts-ml-8ce941d7
|
||||
- Base commit: 4103754b80b57b67b787ab4a6bc24bbf8591be4d
|
||||
- Owner: codex
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- Render and send published teacher shortcuts. One linked worktree per repository; this feature is separate from already merged teacher publication work. Primary and peer files remain unchanged.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- Concurrent/Planning Gates passed through official scripts before implementation, with canonical teacher context loaded and peer scopes assessed. Historical incomplete peer records stay unknown; no concrete dependency conflict.
|
||||
- User requested ordered shortcuts with separate display label and actual prompt, edited in Yuxi and activated through explicit publish. Limits: 8 entries, label 1–40 and prompt 1–6000 after trim. Explicit [] hides all buttons; missing historical field keeps old entry. No new table, migration, dependency or runtime model path.
|
||||
- User authorized one fresh independent reviewer and feature commits for this task. Merge, push, production writes and worktree deletion are not authorized for this new feature.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Implementation and verification complete. Fresh independent Reviewer passed the complete three-end feature; no actionable findings. Ready for Integration after feature commit.
|
||||
- Yuxi owns draft/default/editing; publication snapshot owns frozen list; WS persists/delivers versioned JSON; Makelore renders label and sends prompt as an ordinary question. Existing stable teacher identity, catalog refresh, in-flight questions and historical messages retain their existing paths.
|
||||
|
||||
## Verification
|
||||
|
||||
- Changed shared TeacherDefinition accepts optional/null ordered shortcuts. Composer renders current published labels and sends actual prompts via ordinary question path, preserves old missing-field suggestions entry, hides explicit empty list, disables while busy/running and keeps buttons hidden for nonempty text.
|
||||
- UI unit: node node_modules/vitest/vitest.mjs run tests/unit/coding-teacher-ui.test.tsx: 73 passed. New tests prove label/prompt separation/order, same-prompt uncertain retry identity, different prompt independent identity, catalog refresh preserves existing chat/draft and clear hides buttons.
|
||||
- TypeScript --noEmit and changed-file ESLint passed. Vite production compile including Renderer/Main/Preload/utility passed. No dependencies added or changed; installed primary dependencies linked for build.
|
||||
- Existing Playwright browser layout suite tests/e2e/teacher-reply-layout.spec.ts: 21 passed, including new 319px/508px cases for eight long configured shortcuts, exact prompt sends, empty list and existing hint send-position regression. This suite uses real components/Chromium with explicit fixture API, not production Electron cloud transport.
|
||||
- Local real-component browser .tmp/check-shortcuts.mjs additionally verified 340px fit, reaching/clicking last shortcut and [] clear. Detected large list pushing actions below viewport; capped shortcut area at 192px with scrolling and kept send position stable. Screenshots .tmp/teacher-shortcuts-client.png and teacher-shortcuts-client-narrow.png; retained ignored local evidence.
|
||||
- README updated for configuration and rollout. git diff --check passed. Not verified: production deployment, signed installer or real teacher model invocation; existing Main request path unchanged.
|
||||
|
||||
- Independent Reviewer teacher_shortcuts_review_replacement (fresh fork, no inherited development history) passed. Reviewer inspected all diffs/new files, cross-end boundaries, tests and real-browser evidence; independently ran WS publication 10 tests, Makelore UI 73 tests and Yuxi shortcut validation probes. Reviewer records: 20260929-teacher-shortcuts-review-ws-b6f3, 20260929-teacher-shortcuts-review-yx-d92a, 20260929-teacher-shortcuts-review-ml-e7c1; their official drift/complete passed. Production deployment/model provider and signed package remain outside this evidence.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- Feature result is ready for a future explicitly authorized integration. No merge/push/deploy requested for this feature.
|
||||
- Rollout: WS registration accepts shortcuts, then Yuxi publishes it, then upgraded Makelore renders it. Existing teachers can edit default or clear then publish. Draft-only save has no student effect.
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- Target: canonical teacher architecture/domain decision and current-state. Proposal: Yuxi-owned ordered label/prompt shortcuts with explicit publish; optional legacy snapshot field and [] hiding; stable chat and per-question latest config continue. Evidence: tests/browser results above. Future impact: one configuration source, no new synchronization path or migration. Semantic conflicts: none identified with accepted explicit-publication decision. Human confirmation: behavior already requested; canonical promotion requires a future authorized integration task.
|
||||
Reference in New Issue
Block a user