fix: align Code return and sidebar collapse in the top row

This commit is contained in:
鲨鱼辣椒 committed 2026-09-29 23:25:41 +08:00
1 parent dcaa7baacc
commit 163f262753
7 files changed
+58 -14

No files matched your search

@@ -8,11 +8,11 @@
- Worktree: /Users/chillishark/Makelore 麦洛/.codex-worktrees/makelore/20260929-empty-work-merge-39c633d0
- Base commit: a77ddbd6813bb71d490544edfef6e1f35240070f
- Owner: codex
- Status: Ready for Integration
- Status: Planning
## Scope
- Move the existing “编程 Code” module-home return entry from the project configuration sidebar into the Coding chat/workspace sidebar below the brand. Retain its `/module-select` target and the configuration page's own back action.
- Move the existing “编程 Code” module-home return entry from the project configuration sidebar into the Coding chat/workspace sidebar top row above the brand. Retain its `/module-select` target and the configuration page's own back action.
## Intent And Constraints
@@ -43,7 +43,7 @@
## Promotion Candidates
- Target: canonical classroom navigation when next integrated. Proposal: Code module-home return is visible below the chat sidebar brand and omitted from project configuration/resource sidebars; original configuration back remains. Evidence: explicit user confirmation, existing component reuse, actual Electron navigation and screenshots. No architecture or module-target change; no further product confirmation required.
- Target: canonical classroom navigation when next integrated. Proposal: Code module-home return is visible at the upper left above the chat sidebar brand, aligned with the right-side collapse control and omitted from project configuration/resource sidebars; original configuration back remains. Evidence: explicit user confirmation, existing component reuse, actual Electron navigation and screenshots. No architecture or module-target change; no further product confirmation required.
## Follow-up: Update The Temporary Renderer
@@ -59,3 +59,13 @@
- Final generated source: `code-back-entry-33d87a81/source-with-group-intro` under the trial root; running JS `index-Dh1e8q7U.js`, CSS `index-CA1PKQZ_.css`. Typecheck, scoped lint and Renderer build passed again on this composite source. Launch/guidance metadata and build-source record explicitly retain Main/base/overlay provenance for subsequent updates; old assets and pre-update entry/metadata are retained for rollback.
- Live verification: Code return button visible on `/chat`; same account, active conversation, selected teacher, teacher content, current Work tab and all 14 consultation drafts. All persisted conversation-history hashes unchanged; one generated runtime prompt manifest refreshed during normal conversation rehydration. Visible virtualized message count changed after rehydration, so full on-screen text equality was not claimed. No model prompt was sent for validation. Configuration and nested-route absence were covered by the preceding isolated Electron E2E.
- Used the normal lifecycle lease and conversation-selection API to recover an idle runtime after Renderer reload, then released the lease and restored background throttling. Final live state has zero alerts and unchanged visibility/focus. A native screenshot attempt timed out; actual DOM/button presence, source checks and previous isolated visual/E2E evidence were used instead. Verification summary is in the trial update directory's `verification.json`; private snapshots are mode 0600 and never needed for handoff.
## Follow-up: Align Return And Collapse Controls
- User asks for the Code return at the sidebar upper left and collapse icon at the right of the same row, then update the trial. Same task resumed with exact feature/worktree/branch/base ownership verified. Shared context has no changes since dcaa7ba; active task, entry and all peer scopes reread. Teacher-composer-actions is updating the trial separately; preserve its latest published source when staging. Other ready peers do not create a navigation conflict.
- Project Context Loaded: current light Electron workspace, Main-owned APIs and local project/conversation state remain authoritative. Sidebar default/minimum widths are 171/128px, so macOS traffic-light reservation of 88px cannot accommodate the full return label plus a collapse button in the native row. Use one compact row at the top of the Sidebar above the brand; preserve native titlebar chrome and the stable collapsed/peek expand control. Configuration routes continue to hide return. Narrow sidebars truncate only the visual label, keeping accessible navigation. Linux retains its existing non-collapsible behavior.
- Planning Gate: Passed. Update Sidebar/TitleBar and compact ModuleSwitcher presentation, adapt the existing navigation/layout checks, build, and refresh the latest trial Renderer while preserving conversation state. No main merge, push or formal-app replacement.
- Implementation: reused ModuleSwitcher in a 40px top sidebar row, removed its vertical offset for this toolbar variant, and aligned a 32px collapse button to the right. TitleBar keeps the existing stable expand/peek button only when the Code sidebar is collapsed. Other module layouts and configuration-page absence remain unchanged.
- Verification: typecheck, changed-file lint and full production build passed. Relevant unit coverage totals 26 passing tests (two old TitleBar assertions updated to the new Sidebar-owned expanded control). Existing Electron navigation scenario passes with actual same-row/right-edge geometry, no duplicate toggle, 128px narrow width without overlap, config/nested absence and collapsed-hover return. Reviewed default-width screenshot. Independent implementation review passed. Temporary Renderer staging is in progress and includes the separately published teacher-composer-actions overlay.