Skip to content

fix(console): open the configuration editor from edit current configuration - #2992

Merged
freeqaz merged 3 commits into
mainfrom
fix-2061
Oct 20, 2026
Merged

freeqaz merged 3 commits into
mainfrom
fix-2061

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Dogfood D656 (board finding 2061, low). Edit current Configuration, low on a version's Configuration tab, switched to the draft, scrolled to the top of the page and focused the heading. The editor still needed a second Edit Configuration click about 1,500 px further down.

Change

Console only (agents/detail.mjs); no API change.

  • Edit current Configuration now opens the draft with its Configuration editor already open, brought to the top of the window and focused. It uses the same linked-view path as Deploy again (finding 1898): the link names the draft page it opens, and only that page load takes it.
  • When the draft page shows before its Configuration read lands, the editor opens once the read does, unless the reader has already moved focus elsewhere (as Deploy again does).
  • A draft that is already in its editor (unsaved edits kept from before) has its editor focused and brought into view instead.
  • Every caller gets the editor opened. Saving patches the Configuration, which the API authorizes on its own, so a Configuration editor without Agent update can use it.
  • The editor's Edit Configuration button carries data-opens="configuration-editor" so the page can find it; its behaviour is unchanged.
  • Storybook: new Pages/Agent detail → Edit current Configuration story with steps. docs/guides/console/agent-details.md says the button opens the draft's editor.
  • The existing revision-history journey in console-agent-detail.test.mjs now reads the opened editor instead of the native Configuration disclosure, and no longer clicks Edit Configuration after Edit current Configuration. Its immutable-snapshot, saved-value and cancel-baseline assertions are unchanged.

Verification

  • New test in tests/browser/console-agent-saves.test.mjs (real controller, active v1, 390x844): "Edit current Configuration opens the draft's Configuration editor in view and focused".
    • The editor is focused and its top is within 120 px of the window top, with no Edit Configuration button left.
    • Second case: the draft's Configuration read is held. Focus waits on the Configuration tab, and the editor opens, in view and focused, once the read is released.
    • Third case: with unsaved edits, the reader goes to v1 through the version list and comes back through Edit current Configuration. The open editor, with the edits, is focused and in view.
    • Fails on main sources (no editor opens). The held-read case fails with the deferred path disabled, and the third case fails without the open-editor branch.
  • Whole files at 2 CPUs on the final sources: console-agent-detail 37/37, console-agent-deploy-again 11/11, console-agent-overview 41/41.
  • Pinned at 2 CPUs on the final sources: console-agent-saves.test.mjs 20/20 runs (45/45 tests each). console-agent-detail.test.mjs 19/20 runs (37/37 each), plus one extra clean run. The one failed run was the headless browser failing to launch (libgbm.so.1: cannot open shared object file) in an unrelated test, a host hiccup; the library is present and every other run passed.
  • prettier and eslint clean on touched files. Storybook frame checked locally at 1440 and 390.
  • Open-PR conflict check (3-way git merge-tree, conflict hunks in the touched files) against every open PR touching them, including fix(console): call a deploying version deploying, not historical #2990 (same file, different lines): identical to main.

Screenshots (Storybook Edit current Configuration, right after the click)

Before 1440 After 1440 Before 390 After 390

Risks

  • Low. Only Edit current Configuration sets the edit intent; Create new version and other links to the draft behave as before. The API still authorizes every save.

…ration

Edit current Configuration, low on a version's page, switched to the draft
at the top of the page; the editor still needed an Edit Configuration
click about 1,500 px below (dogfood finding 2061). The button now opens
the draft with its editor open, brought to the top of the window and
focused, through the same linked-view path Deploy again uses. When the
draft's Configuration read is still out, the editor opens once it lands,
unless the reader has moved focus.
@freeqaz
freeqaz requested a review from a team as a code owner October 20, 2026 02:05
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

…tes are refused

A draft kept in its editor with unsaved edits has no Edit Configuration
button, so Edit current Configuration fell back to the top of the version
detail. It now focuses and scrolls to the open editor. A caller known to
be refused Agent updates gets the draft without the editor opened, and
the leave guard that could never fire on a version page is dropped.
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR makes Edit current Configuration open, focus, and scroll to the current draft’s JSON editor.

Example: From version v1’s Configuration tab at 390 × 844, click Edit current Configuration.

  • Before: The draft opens at the page heading and requires another Edit Configuration click farther down.
  • After: The draft’s Configuration JSON editor opens immediately, receives focus, and scrolls into view.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, useful patch with meaningful browser coverage and resolved earlier findings; visual evidence meets only part of the repository gate.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Edit current Configuration opens a draft far above the editor and requires another edit action.
Reason: This maintainer-authored change makes the existing edit action reach its expected destination through the current Console workflow.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it fixes a concrete Console navigation problem still present on main, and no actionable code findings remain.

Priority: P2
Reviewed head: e1eefe8041d6ff545c6369d58949acc4004d1ff2

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The required final-revision interaction video showing the click, editor opening, focus, and scroll result is not supplied.
Agent review details

How this fits together

The Console Agent detail page turns version-navigation actions into draft views; Configuration saves continue through the existing independently authorized API.

flowchart TD
  A[Version Configuration tab] --> B[Edit current Configuration]
  B --> C[Existing linked view intent]
  C --> D[Current draft Configuration read]
  D --> E[Existing JSON editor]
  E --> F[Focus and scroll into view]
Loading

Technical review

Best possible solution:

Use the existing linked-view intent to reveal the current draft’s editor while preserving explicit saves and deployment.

Do we have a high-confidence way to reproduce the issue?

Current-main source shows navigation to the draft without opening its editor, matching the supplied before screenshots; no target code was run during this read-only review.

Is this the best way to solve the issue?

The patch uses the existing navigation and editor owners, preserves independent Configuration authorization, and covers delayed reads and retained edits without adding a parallel save path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9ab26afcc8e2.

Provenance checked

  • Historical-version navigation to the current Configuration changes intended behavior with a stated reason (370570d: The original editor implementation opened the current draft while preserving immutable snapshots and separate deployment.)
  • Linked-view focus and deferred opening keeps the original intent (6ce2de8: Deploy again reveals its draft action after reads settle and avoids taking focus after the reader moves elsewhere.)
  • Configuration editor focus keeps the original intent (7138a02: Opening the editor moves keyboard focus to the JSON field after replacing the edit button.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Current main still needs the fix: At fetched main, Edit current Configuration still calls change("draft", "configuration"), and openVersionDetail has no edit intent. (apps/controller/src/console/agents/detail.mjs:3912, 9ab26afcc8e2)
  • Focused implementation: The introduced diff extends the existing linked-view mechanism, handles delayed Configuration reads and retained editors, and invokes the existing editor without changing save authorization. (apps/controller/src/console/agents/detail.mjs:1672, e1eefe8041d6)
  • Earlier findings resolved: The final commit removes the Agent-update permission condition and updates the existing revision-history journey for the automatically opened editor; both earlier findings are addressed. (tests/browser/console-agent-detail.test.mjs:1015, e1eefe8041d6)
  • Meaningful browser coverage: The added browser scenario exercises immediate opening, a held Configuration read, and retained unsaved edits through the real Console and Fastify fixture. (tests/browser/console-agent-saves.test.mjs:1799, e1eefe8041d6)
  • Reviewed visual evidence: The four downloaded Storybook screenshots show the before state at the heading and the after state with the focused JSON editor at the top at desktop and phone widths. The full PR body and author discussion provide no walkthrough video. (e1eefe8041d6)
  • Required UI evidence gate: Repository policy requires screenshots and a short interaction video as native GitHub attachments before merging UI changes; the supplied screenshots are gist links. (AGENTS.md:454, e1eefe8041d6)

Likely related people:

  • Free Wortley: Raw commit 7138a02 adds apps/controller/src/console/agents/detail.mjs:3578 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7138a024fdd0; files: apps/controller/src/console/agents/detail.mjs)
  • Kevin: Raw commit 370570d adds apps/controller/src/console/agents/detail.mjs:811 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 370570d78872; files: apps/controller/src/console/agents/detail.mjs)

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The misleading edit action adds avoidable navigation and scrolling, but users can still reach the editor through the existing control.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-20T02:31:16.388Z sha f331314 :: needs changes before merge. :: [P2] Open Configuration editing independently of Agent-update permission | [P2] Update existing browser journeys for the automatically opened editor
  • reviewed 2026-10-20T03:04:15.257Z sha e1eefe8 :: needs maintainer review before merge. :: none

Reviewed October 19, 2026, 11:09 PM ET / October 20, 2026, 03:09 UTC (Revision 3).

…istory journey

Saving patches the Configuration, which the API authorizes on its own, so a
Configuration editor without Agent update gets the editor opened too. The
revision-history journey now reads the opened editor instead of the native
Configuration disclosure, and no longer clicks Edit Configuration after Edit
current Configuration. The guide says the button opens the draft's editor.
@freeqaz

freeqaz commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 20, 2026
@freeqaz
freeqaz merged commit 33132e1 into main Oct 20, 2026
95 of 96 checks passed
@freeqaz
freeqaz deleted the fix-2061 branch October 20, 2026 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant