Skip to content

feat(console): connect agent revisions to their details - #3915

Open
russellb wants to merge 5 commits into
mainfrom
codex/agent-revision-workspace
Open

russellb wants to merge 5 commits into
mainfrom
codex/agent-revision-workspace

Conversation

@russellb

@russellb russellb commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Problem

Agent revision selection and the detail tabs appeared as separate parts of the page. Operators could scroll into Configuration, Channels, or Logs without a clear connection to the selected revision. Workspace files and Access also appeared beside revision views despite applying to the whole Agent.

Change

  • Connect desktop revision history to a persistent revision heading and its detail tabs. At 1,100 px or less, use a native selector above the same detail panel.
  • Identify saved revisions as read-only snapshots and an editable draft as Build next revision. Read-only drafts show Next revision draft, a read-only badge, and saved-settings scope; delayed permission responses update these labels.
  • Retain supported detail tabs when changing revisions, with Configuration as the fallback. Separate Agent-wide Workspace files and Access from revision details.
  • Keep section switches anchored to the visible Agent strip, give the outer tabpanel a unique ID, and preserve keyboard navigation, draft retention, write guards, permissions, deployment recovery, and URL navigation.

Updates the owning reference, runtime flow, Storybook scenarios, and browser coverage. No Driver contract or API change. Merges main without rewriting published history, preserving its deployment-read, authorization, and Policy denials fixes.

Verification

Tested head: a17112643095dc92712e62bd9ae17f8690f5b8cc.

  • Typecheck, lint, formatting, workspace isolation, documentation checks/length limits, flow validation, and rebuilt Storybook passed. Console design-token checks: 5/5.
  • Six focused review regressions failed on the pre-fix code: section scrolling, unique panel IDs, keyboard relationships, and immediate/delayed read-only draft labels. They pass after the fixes.
  • Broader merged-branch browser run: 309/312 passed initially. Three newly merged tests still clicked Configuration while Access was open; their Revisions navigation steps were updated and all 3/3 passed. Permission-revocation and audit assertions remain intact.
  • Final focused revision/navigation/permission/paging checks: 15/15. Additional full Policy denials and dialog suites: 11/11. No skips in these runs. Two dialog tests now scope their selected-tab locator to the revision tab list.
  • The flow remains one coherent Agent-editing/runtime trace, within the 2,500-word limit. It retains the Secret collection-permission and audited exact-read boundaries identified in review.

Visual evidence — rebuilt Storybook, simulated UI proof

Stories under Pages / Agent detail: Historical revision workspace, Agent sections, Mobile revision workspace, Open draft, and Version draft, viewer can only read. Screenshots: desktop 1440 × 1000 and phone 390 × 844; video: 1440 × 900. No page errors or horizontal overflow in the captured states. These fixtures do not establish backend persistence, credential delivery, or model execution.

Desktop before · Desktop after · Draft · Read-only draft · Phone · Agent-wide workspace

Revision history connected to its snapshot and detail tabs

Play the 25-second walkthrough: select Channels, change revisions with Channels retained, switch to Workspace files and back, then open Draft. Played at normal speed; opening, transitions, and final draft state inspected. Uploaded media bytes verified. Evidence gallery.

At the earlier 29e94513d head, a full controller image was deployed to local k3d using Kubernetes Compute: API/worker Ready, real browser sign-in and draft navigation/editor checks passed, and served CSS/JavaScript matched source. These review fixes have not been redeployed there. The demo remained a draft without model credentials; no Agent runtime deployment or model turn was exercised.

Risks

Navigation and focus across revision changes, retained drafts, paging, and permission changes remain the main risks. Backend contracts and default runtime image versions are unchanged. CI and renewed review must be checked at the updated head before merging.

@russellb
russellb requested a review from a team as a code owner October 28, 2026 01:09
@clawsweeper

clawsweeper Bot commented Oct 28, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-28T01:12:16.267540Z 29e9451 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 28, 2026
@clawsweeper

clawsweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR connects Agent revision history to its detail panel and separates Agent-wide Workspace files and Access navigation.

Example: An operator views revision v6 while v7 remains selected for service.

  • Before: A compact picker and flat tab strip separated revision selection from its details.
  • After: Desktop history highlights v6 beside its read-only heading and detail tabs; changing to v7 retains Channels.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused UI work with inspected visual evidence and meaningful browser coverage; the prior finding is fixed, while CI failure attribution remains unresolved.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Downloaded Storybook screenshots show the changed renderer's desktop history/detail layout and editable/read-only draft states at the declared head. The PR supplies refreshed phone and interaction-video links, but the review environment blocked their retrieval. This establishes scoped UI evidence, not persistence or runtime execution; the earlier k3d deployment does not prove the subsequent review fixes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Operators can lose the connection between the revision being viewed and its details, while Agent-wide controls appear to belong to that revision.
Reason: The maintainer-authored direction provides a clearer revision boundary while retaining the compact selector on smaller screens.

Merge readiness

✅ Ready for maintainer review

Keep open: the prior accessibility finding is fixed, and no additional source defect was found. The reviewed head has a failed Console Browser check whose cause needs triage before landing.

Priority: P2
Reviewed head: a17112643095dc92712e62bd9ae17f8690f5b8cc

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Console Agent page receives authorized Agent, Configuration, revision, and deployment responses and renders navigation, snapshot details, and existing draft controls.

flowchart LR
  Operator --> Console
  Console --> RevisionNavigation
  RevisionNavigation --> RevisionDetails
  Console --> AgentSections
  RevisionDetails --> ControllerAPI
  AgentSections --> ControllerAPI
Loading

Technical review

Best possible solution:

Retain the integrated revision workspace and resolve the failed browser check before landing.

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

This is a navigation feature; current-main source and the before screenshot establish the separate picker and flat tab layout it replaces.

Is this the best way to solve the issue?

The change fits the existing Agent page owner and preserves API, authorization, draft, and deployment handlers without adding a parallel subsystem.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 27ca6d843ea7.

Provenance checked

  • Revision picker and detail layout changes intended behavior with a stated reason (0402f1c: The earlier layout used a compact picker to reduce page length and separated deployment activity from configuration details.)
  • Draft heading and deployment checklist placement changes intended behavior with a stated reason (bd52601: The checklist brought deployment into the first desktop screen; this PR deliberately places revision context and tabs before that checklist.)
  • Keyboard tab navigation keeps the original intent (4e45875: Tab semantics, manual arrow-key selection, and one Tab stop made navigation accessible; the change applies those rules independently to both tab lists.)
  • Revision and deployment ownership keeps the original intent (7c3ecbf: Revision details distinguish stored snapshots, deployment outcomes, and live observations; browsing continues to leave the service selection unchanged.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Derek Carr: Raw commit 0402f1c adds apps/controller/src/console/agents/detail.mts:1204 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0402f1cf13aa; files: apps/controller/src/console/agents/detail.mts)
  • stevenlee-oai: Raw commit 7c3ecbf adds apps/controller/src/console/agents/detail.mjs:547 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 7c3ecbfce4fa; files: apps/controller/src/console/agents/detail.mjs)

Review metrics

Metric Value Why it matters
Production scope TypeScript +225/-78; CSS +129/-9 Production changes remain in the existing Agent page and stylesheet; the surrounding test updates follow the changed navigation.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This improves revision browsing and scope clarity on one Console page without changing backend contracts.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 (1 earlier review cycle)
  • reviewed 2026-10-28T01:23:59.049Z sha 29e9451 :: needs changes before merge. :: [P2] Give the Agent-section panel a distinct ID

Reviewed October 29, 2026, 2:25 PM ET / 18:25 UTC (Revision 2).

@freeqaz freeqaz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Free's clanker here (an AI agent working on Free's behalf). This is a comment-only review of head 29e94513d2. The merge-tree with main is clean, and CI Required and First Agent Smoke are green. Three findings, two of them confirmed in a browser probe on a remote test VM (a throwaway test file, not pushed):

1. Medium: switching between Revisions and Workspace files/Access while scrolled makes the page jump (apps/controller/src/console/agents/detail.mts:3879-3891)
renderTab anchors the scroll on tabs.getBoundingClientRect(), which is the revision tab strip. setLayoutShape now hides that strip for workspace/access, so on one side of the switch its rect is all zeros and moved becomes the strip's whole offset. Probe at 1440×600 on a draft:

  • At scrollY 400, clicking Workspace files moves the page to 221, and the Agent sections strip drops 179 px. Clicking Revisions then moves it to 551, and the strip ends at -165 px, so the tab just clicked scrolls out of view.
  • At scrollY 150, clicking Workspace files jumps to 0.

On main, Workspace/Access were in the same strip, so the anchor held. Suggested fix: when either the old or the new tab is agent-wide, anchor on agentScopeTabs (or skip the compensation). It would help to add a scrolled Workspace⇄Revisions case to "Agent tabs replace only their content…" in console-agent-detail-2.test.mjs.

2. Low: duplicate DOM id (detail.mts:1408)
versionLayout.id = `${tabIds}-workspace` is the same id that the loop gives the Workspace files tab button (${tabIds}-${id}). The probe found one id on two elements. getElementById on the Revisions tab's aria-controls returns the Workspace tab button, and the Workspace tab's aria-controls points at itself. Any distinct id (for example ${tabIds}-sections-panel) fixes it. The tablist test (console-agent-detail-2.test.mjs:2129) dropped Workspace files/Access from its list, so its aria-controls/aria-labelledby and arrow-key checks no longer cover the new Agent sections tablist. That is how this got through. Extending the same state() check to that tablist would catch it.

3. Low: a read-only draft still tells the reader to edit (detail.mts:1979, revisionStateLabel)
For a member without draft update, the history row says "Draft · Read-only". The heading still says "Edit the saved draft, then deploy it as a new revision." under a "Draft" badge, because the scope line and the badge ignore draftReadOnly()/configurationReadOnly().

Nits (non-blocking)

  • Test DRY: .agent-tabs:not(.agent-scope-tabs) appears about 20 times and .locator(".agent-draft-actions").getByText(/generation N/) about 16 times across files. A revisionTabStrip(page) / draftGeneration(page, n) helper in console-agents-browser-helpers.mjs (next to chooseRevision) would keep the next layout change to one edit.
  • Many outcome assertions now read the hidden native <option> (includeHidden: true) at desktop width rather than the visible history row that users see. markVersionOutcomes updates both, so this is fine today. One row-label assertion in a delayed-badge test would pin the visible path.
  • Flow doc: the word-budget trims in unrelated paragraphs dropped two facts: that Secret summaries need no collection permission, and that each refused exact Secret read is an audited denial. The new history line also says "Document uncommitted revision workspace…".

I found no regressions in draft retention, write guards (the row buttons go through change() and trackRevisionControl), unavailable-tab fallback (revisionTab), the narrow-viewport selector (rendered from the same data, no extra fetches), or focus after the last history page.

@russellb

Copy link
Copy Markdown
Member Author

Addressed the review feedback in a17112643095dc92712e62bd9ae17f8690f5b8cc:

  • Agent section switches use the always-visible section strip as their scroll anchor. Browser checks cover Workspace files ⇄ Revisions at 150/400 px, including normal document-bottom clamping.
  • The outer section panel has a distinct ID. The real-controller browser checks verify unique IDs, panel references, labels, arrow keys, activation, and one Tab stop in both tab lists.
  • Read-only drafts show Next revision draft, Draft · Read-only, and saved-settings scope. The Configuration label also respects its separate grant. Immediate and delayed permission responses are covered.
  • Added a visible desktop history-row assertion for delayed failure evidence. Restored the flow's Secret collection-permission and audited exact-read facts, and corrected its revision-workspace changelog wording.

Merged main while preserving published history and its newer deployment/authorization behavior. The broader browser run passed 309/312 initially; the three failures were newly merged tests needing Revisions navigation, and all three passed after that update. Final focused checks passed 15/15; Policy denials/dialog suites passed 11/11, with no skips. Typecheck, lint, formatting, workspace, docs, flow validation, design tokens, and rebuilt Storybook passed.

The PR Verification section now links refreshed screenshots (including the read-only draft) and a verified 25-second walkthrough. These are simulated Storybook UI proof; the separate local k3d deployment remains at the earlier head. Hourly monitoring remains enabled.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 29, 2026

This branch has not been deployed

No deployments
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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

2 participants