Repository navigation
fix(console): keep the new version notice in view on Edit current - #3004
Conversation
Edit current Configuration scrolled the editor flush to the top of the window, with the draft's 'New version' notice 370 px (1440) or 590 px (390) above it, so nothing on screen said this was now the draft (finding 2086). The notice now comes to the top with the editor below it; a window too short for both brings the editor to the top as before. Tests also cover Edit current returning to a kept draft (finding 2089).
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR keeps the draft notice above the focused Configuration editor when the window has enough room. Example: Choose Edit current Configuration at 390 × 844.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open: this PR addresses a concrete loss of draft context with a focused change. The previous Storybook finding is resolved, and no introduced code defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Console Agent detail page receives version-navigation intent and Configuration data, then opens, focuses, and positions the draft editor. flowchart TD
A[Version Configuration tab] --> B[Edit current Configuration]
B --> C[Existing draft navigation]
C --> D[Open and focus editor]
D --> E[Measure available window space]
E --> F[Reveal notice or editor]
Technical reviewBest possible solution: Keep the existing navigation and editor owners, revealing the draft notice when space permits and preserving editor-first positioning in short windows. Do we have a high-confidence way to reproduce the issue? Current-main source scrolls the editor above the draft notice, consistent with the supplied desktop and phone before screenshots; no target code was executed during this review. Is this the best way to solve the issue? The geometry check is a small correction in the existing scroll owner and preserves editor visibility when the notice and editor cannot fit together. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7f44e5f4c91e. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 20, 2026, 12:45 AM ET / 04:45 UTC (Revision 2). |
The Edit current Configuration story's description and steps now check the 'New version' notice at the top with the editor below it at desktop and phone widths, and the editor-first fallback in a short window. The short window test also requires the notice above the window, so it proves the fallback rather than any scroll that leaves the editor near the top.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Problem
#2992 made Edit current Configuration open the draft with its editor in view and focused. It scrolled the editor field to the very top of the window. The draft's "New version. Changes affect future deployments…" notice and the version selector were then 370 px (1440) or 590 px (390) above, out of view. At 390 the phone top bar had scrolled away too, so nothing on screen said the reader was now on the draft and not the current version (finding 2086).
Two of the routes #2992 threaded
editthrough were never exercised (finding 2089). A kept draft brought back by Edit current went untested. So did the in-place tab change, which Edit current cannot reach: the button shows only on a version, and that hand-off needs the draft already selected.Change
agents/detail.mjs: Edit current Configuration brings the draft's version notice to the top, with the focused editor below it.tests/browser/console-agent-saves.test.mjs:Verification
detail.mjs, 2 CPUs): 4 killed.editon resume, drop it on load, always scroll the editor to the top, always scroll the notice.editfrom the tab-change hand-off. Edit current cannot reach that path (see Problem).ignore editStart.disabledremains equivalent, as finding 2089 notes.console-agent-savesfile passed 47/47.git merge-treeshows no new conflicted file or hunk.Screenshots right after Edit current Configuration, before | after:
Storybook: the existing Pages/Agent detail Edit current Configuration story's description and walkthrough steps now check the notice at the top with the editor below at desktop and phone widths, plus the editor-first fallback in a short window. After internal review, the short-window test also requires the notice to be above the window.
Risks
Low. Only the scroll target changes: the notice instead of the editor, with a fallback to the editor on short windows. The 160 px allowance is a scroll heuristic, not a style value.