fix: toggle the teacher dock from the conversation header

This commit is contained in:
鲨鱼辣椒
2026-09-29 17:00:06 +08:00
parent 5de8ea823d
commit 2922f35e4b
6 changed files with 132 additions and 28 deletions

View File

@@ -23,7 +23,7 @@
- Warm welcome heading, existing composer and a compact inspiration invitation share the empty-chat layout. Both the invitation and persistent sidebar button open only https://square.nianxx.cn/#explore in the system browser on explicit click.
- No public project feed, preview cards, community store or iframe remains in this feature. Existing unrelated Main routes are unchanged. The composer remains mounted across the first send; teacher introductions keep their prior three-successful-operation-round behavior and receive responsive clearance.
- Preserved the concurrent live help-label overlay (task 20260929-teacher-help-label-83a2f67c): the two buttons and suggestions text remain 帮我整体看🧠. Ported only its three source edits and synchronized existing expectations; peer checkout untouched.
- Temporary Renderer now loads this checkout's index-CwqpErpO.js. Existing Main PID 62668 remains running; formal installation, cloud configuration, user history and remote branches unchanged. Kept this worktree for the live trial.
- Temporary Renderer now loads this checkout's index-Cgp0q7I7.js. Existing Main PID 62668 remains running; formal installation, cloud configuration, user history and remote branches unchanged. Kept this worktree for the live trial.
## Verification
@@ -87,3 +87,15 @@ All three steps completed. Earlier public-feed investigation was feasibility wor
- Completed: teacher introductions remain fixed-width overlays at the upper right, with no reserved horizontal rail. The welcome is centered horizontally in the whole content page and vertically in the available area above the bottom invitation/composer. Invitation and input sizing and spacing remain unchanged. Desktop teacher dismissal no longer shifts either element; compact content can scroll below the overlay.
- Validation: typecheck, 77 focused unit tests, 8 headless layout/interaction cases, lint:check (0 errors, 8 existing warnings), scoped E2E ESLint, build:vite, native E2E --list (20 cases), ownership and diff checks passed. Screenshots reviewed with both teachers floating; tests assert horizontal/vertical centering, stable bounds on dismissal, collapsed sidebar alignment, bottom input and preserved drafts. Native headed tests were not run to avoid focus changes.
- Trial updated to index-CwqpErpO.js in the background. Actual live horizontal and vertical center errors are 0px, invitation gap 12px and input bottom gap 16px. No alerts/cards/iframe; auth identity, route and all 13 saved drafts unchanged. Existing teacher dismissal state was preserved. Background native capture was unavailable (UnknownVizError), so visual review used the headless layout screenshots; live DOM geometry was independently verified. Evidence: trial floating-teachers-centered-welcome-20260929/. Keep this checkout for the live trial; no merge or push.
## Follow-up: Integrate Teacher Dock Toggle Handoff
- User-authorized handoff from 前端-页面修改2 supplies /tmp/makelore-help-label-83a2f67c/teacher-dock-toggle.patch. Continue the owned trial/frontend feature at 5de8ea8; ownership start/status passed, and existing Project Context Loaded still applies. Read the delivering task and new empty-work-preview task records.
- Cross-check: launch metadata still points to this checkout/5de8ea8. 前端-页面修改3 finalized 0167d36 but explicitly has not updated the running app, so there is no new runtime overlay to preserve. Keep that separately completed Main/preview feature out of this bounded button update. No semantic conflict; Planning Gate: Passed.
- Apply the narrow two-file button patch and regression, adapt affected native scenarios, validate against the latest layout/help text, and refresh only the trial Renderer. Right header toggle controls consultationOpen with matching accessible labels/state; opening/closing preserves selected teacher, work/chat tab, history and drafts and sends no prompt. No prompt-configuration work, formal installation, cloud change or remote push.
- Integrated the supplied two production-file changes and nonempty-history/draft/no-submit regression without overwriting the latest welcome layout or help label. Updated two affected native scenarios to use the teacher toggle and existing Work/Chat tabs, preserving browser coverage. README records the new header control.
- Checks: typecheck, 91 relevant unit tests in four files, all 8 headless welcome-layout/interaction cases, lint:check (0 errors, 8 existing warnings), scoped changed-test ESLint, build:vite, native E2E --list (20 cases), documentation ownership and whitespace checks passed. Full headed Electron fixture not run to avoid desktop focus changes.
- Live Renderer index-Cgp0q7I7.js on unchanged Main PID 62668: background click sequence verified expanded/collapsed labels and aria state, dock removal/reopening, preserved current tab/teacher and both current draft values, unchanged operation history, all 13 stored drafts and 帮我整体看🧠. Current live teacher has no messages; nonempty teacher-history preservation is covered by the integration unit regression. Restored the initial closed dock. Opening the dock only reads existing data; no test prompt was submitted.
- Native background timers initially delayed the click-verification script. Temporarily disabled webContents background throttling to finish the pending verification, then restored the original throttling setting. No window activation; focus monitor and live checks remained unfocused. Temporary inspector is closed after finalization. Evidence: trial teacher-dock-toggle-integrated-20260929/.
- Welcome centering remains 0px error on both axes, invitation gap 12px and composer bottom gap 16px; auth identity and route preserved, no page alerts. Empty-work commit 0167d36 remains separate and was not live before this update. Keep this trial worktree; no main merge/push or cloud/prompt edits.