diff --git a/.project-docs/30-worklog/tasks/20260930-refresh-icon-2c6e81a4.md b/.project-docs/30-worklog/tasks/20260930-refresh-icon-2c6e81a4.md new file mode 100644 index 00000000..688d0136 --- /dev/null +++ b/.project-docs/30-worklog/tasks/20260930-refresh-icon-2c6e81a4.md @@ -0,0 +1,51 @@ +# Task: Show the teacher refresh control as an icon only + +## Identity + +- Task ID: 20260930-refresh-icon-2c6e81a4 +- Mode: Feature +- Branch: codex/20260930-refresh-icon-2c6e81a4-refresh-icon +- Worktree: /Users/chillishark/Makelore 麦洛/.codex-worktrees/makelore/20260930-refresh-icon-2c6e81a4 +- Base commit: 9f575e2c2fecad195fe08b3c4c2dcbd49b14f3e6 +- Owner: codex +- Status: Ready for Integration + +## Scope + +- Remove the visible label from the upper-right teacher refresh button, keeping a compact icon control; continue the current temporary-app UI update. + +## Intent And Constraints + +- Keep refresh behavior, disabled/busy state, spinning icon, accessible name, status announcement and hover tooltip. Preserve the completed address-toolbar move and all latest composite trial changes. No merge or push. + +## Outcome + +- Removed the teacher refresh label and reduced its control to a 32px square icon button. Refresh handler, accessible label, tooltip, busy/disabled state, spinning icon and status announcement remain intact. README now describes the icon-only behavior. Updated the current temporary app on top of its latest composite source, preserving the previous full address-toolbar move. + +## Verification + +- Standard typecheck, focused ESLint, production build and all 49 existing teacher-companion unit tests passed. No new tests were added for the reversible label/style change. +- Separate composite trial build passed; byte comparison confirmed only TeacherCompanion.tsx and classroom-workspace.css changed from the previous trial source. Live PID remained 32583 and loaded `index-CwXrqibZ.js`. DOM and captured image confirm no button text, one refresh icon, a 32x32 target and the original tooltip; the full address toolbar remains visible. +- Restored the original Work tab and open teacher pane after the renderer refresh. Route, conversation, inputs, both draft stores, teacher turns, 22 operation messages, preview URL, sidebar, window bounds and fullscreen all match before. No generation was active and no messages were sent. Restored background throttling, released the update lease (0 remain) and closed the debugging listener. Main/preload, native window overlays and installed app were not replaced. +- Source check logs are `/tmp/refresh-icon-{typecheck,unit,lint,build}.log`. Composite source, rollback entry/manifests, `verification.json`, `cleanup.json` and `live-refresh-icon.png` are under `/var/folders/mx/ltbgwsks5_n8zllj69p_wbcw0000gn/T/makelore-trial-tdq_nuah/refresh-icon-2c6e81a4`. + +## Follow-ups + +- None recorded. + +## Project Context Loaded + +- Task ID/mode/branch/worktree/base match Identity; official start/status confirms isolated ownership. App worktree creation returned Not a git repository at the parent-directory chat root; official skill isolation succeeded from the preceding completed toolbar task `9f575e2`. +- Read own task record. All 12 previously loaded entry, positioning, integrated-state, decision/teacher ADR, architecture, domain/success, evidence/reflection/commitment files are byte-identical to the just-completed toolbar task. Product remains Main-owned project conversations and a shared browser; this is a Renderer presentation-only change. +- Read-only review of 27 peer records found no semantic conflict. Existing refresh task requires preserving refresh/drafts/version behavior. Prior toolbar task is ready; retain its changes. Old child-language scope remains undefined and unrelated. No canonical writes are needed. +- Files: TeacherCompanion.tsx, scoped workspace CSS and README. Remove the label span; reduce the button from 76px to 32px square. Existing status/aria/title and click handlers remain. Gate: Passed. + +## Plan + +1. Apply the small presentation change and document the icon/tooltip behavior. +2. Run existing focused refresh tests, typecheck and production build; no new tests are needed for this reversible label/style change. +3. Apply only the two product-file changes to a new copy of the latest trial source, update its renderer, verify the icon and preserved state, and record the result. + +## Promotion Candidates + +- None recorded. diff --git a/README.md b/README.md index b6acd5d6..9b2d3af7 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,7 @@ Pi 正式包必须继续运行 `pnpm run verify:artifact:pi`、`pnpm run smoke:p ### 下发智能体咨询 -顶部智能体名单旁的“刷新”按钮可立即获取最新下发名单、发布资料和当前版本,独立于主动关心的检查条件。刷新中显示进度,成功提示“已更新”,失败保留原名单并可重试;顶部和已打开的咨询面板使用同一份结果。刷新不发起模型请求、不切换当前智能体、不清除草稿或历史,运行中的问题保留已绑定版本,下一次提问由 Main 固定当时的发布版本,同一聊天保持连续。 +顶部智能体名单旁的刷新按钮只显示图标,可立即获取最新下发名单、发布资料和当前版本,独立于主动关心的检查条件。刷新时图标旋转;悬停提示和无障碍状态提供刷新进度、成功或失败信息,失败保留原名单并可重试;顶部和已打开的咨询面板使用同一份结果。刷新不发起模型请求、不切换当前智能体、不清除草稿或历史,运行中的问题保留已绑定版本,下一次提问由 Main 固定当时的发布版本,同一聊天保持连续。 老师 Agent 是某一领域杰出人物的能力转化而成的智能体,供平台学生使用,在真实项目、作品和问题中提供专业理解、判断与解决问题的能力支持。定义以人的领域能力及学生价值为中心;蒸馏属于实现方法,云端下发、上下文读取和聊天是能力交付方式。完整理念见[老师 Agent 产品定位](.project-docs/00-brief/project-positioning.md#老师-agent-的产品定位)。 diff --git a/src/pages/Chat/TeacherCompanion.tsx b/src/pages/Chat/TeacherCompanion.tsx index 6b1a21e7..30b9ccba 100644 --- a/src/pages/Chat/TeacherCompanion.tsx +++ b/src/pages/Chat/TeacherCompanion.tsx @@ -58,7 +58,6 @@ export function TeacherCompanion({ companion, open, onOpen, onToggle, bubbleRef, title={refreshMessage || '刷新智能体'} disabled={loading || companion.refreshing} aria-busy={companion.refreshing} onMouseDown={(event) => event.preventDefault()} onClick={() => { setIntroductionId(null); void companion.refresh(); }}> - {companion.refreshing ? '刷新中' : companion.refreshStatus === 'error' ? '刷新失败' : companion.refreshStatus === 'success' ? '已更新' : '刷新'} {refreshMessage} {!invitation && welcomes.length > 0 &&