Skip to content

fix(console): header layout and compact Namespace selector - #2977

Merged
freeqaz merged 13 commits into
mainfrom
ux-p3
Oct 20, 2026
Merged

freeqaz merged 13 commits into
mainfrom
ux-p3

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

The Console now uses one page header. On an Agent page, the name, Agent ID, Namespace, and version action fit together even on a narrow screen. On collection pages the Namespace selector sits beside Refresh in a compact, labeled control. Settings no longer shows a Namespace selector.

Keyboard focus stays on Create new version when returning to the window triggers a successful access check. The action is unavailable during the check, and focus stays elsewhere if the reader moves it. Copy Agent ID announces a successful copy or selects the ID for manual copying when clipboard access is denied. Opening a version draft does not deploy it. The existing navigation guard still protects a save in progress.

Verification

Built Storybook from a332cd32fe71 and exercised Pages / Agent detail / Header Actions and Components / Credentials / Authentication save holds navigation at 1440 and 390 px. These previews use the Console with simulated data. The recordings show a window-focus event triggering the access recheck, the keyboard focus ring returning to the version action, and the reader moving focus elsewhere during a second check.

Desktop Phone
Keyboard focus restored to Create new version Keyboard focus restored at 390 px, with the Agent ID selected after clipboard access was denied
agent-header-controls-1440.webm
agent-header-controls-390.webm

In a controller-backed browser test, the previous code lost focus from the header action while correctly leaving a user's newer focus in the sidebar. Both cases pass with the fix. I also tested this change combined with main at 69097a7e: 85 browser tests passed across the page-header, retained-revalidation, button-hierarchy, and focus-ring suites. Lint, formatting, workspace, test-suite inventory, and documentation checks passed on that tree. Hosted checks apply to their reported commit.

Collection pages show the Namespace selector as one 32 px control with an
inline Namespace prefix beside Refresh. An Agent's page and Create Agent lead
with a ghost ← Agents, then the title with Refresh (and Create new version)
at its right, then a meta row with the Agent ID, a copy button and the
compact selector. Settings no longer renders the selector. (UX spec 3.2,
plan D3)
console-page-header checks the compact selector on collections, the
Agent page's back link, meta row and actions at 1440, 1024 and 390 with a
40-character name, the phone header bottom, the ID copy button and Create
Agent's header. Tests that found ← Agents, Create new version or the
Deleting badge inside the page view now look in the page header; Settings
frames expect no selector.
@freeqaz
freeqaz requested a review from a team as a code owner October 19, 2026 22:13
@clawsweeper

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

@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. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. 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:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR consolidates console headers, compacts Namespace selection, adds Agent ID copying, and preserves header-action focus during access checks.

Example: View Research assistant in Engineering at a 390 px viewport.

  • Before: Agent identity and version actions occupy separate header sections.
  • After: Back navigation, version actions, Agent name, copyable ID, and Namespace selection form one responsive header.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused UI work with inspected visual evidence, passing head browser checks, and no actionable findings.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected desktop and phone screenshots from rebuilt Storybook at a332cd3 show the changed console header, focus ring, successful copying, and manual-copy selection; controller-backed browser checks support the lifecycle behavior. Videos are attached, but local decoding and browser startup failed. This is simulated UI evidence, not deployment or persistence proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Agent identity and controls consume excessive header space, particularly on narrow screens.
Reason: The collaborator-authored direction improves routine console use without adding configuration or changing platform contracts.

Merge readiness

✅ Ready for maintainer review

Keep this PR open for maintainer triage: it delivers a useful console improvement, and review found no actionable introduced defect.

Priority: P2
Reviewed head: 5b6e365c9d46c50658fe50b533e1db770d07a863

Before merge

None.

Findings

None.

Agent review details

How this fits together

The controller-hosted console turns route, session, Namespace, and Agent state into browser navigation and controls backed by existing authorized APIs.

flowchart TB
  Browser[Browser navigation]
  Console[Console lifecycle]
  Shell[Shared page header]
  Detail[Agent detail view]
  API[Controller APIs]
  Browser --> Console
  Console --> Shell
  Console --> Detail
  Console --> API
  Detail --> Shell
Loading

Technical review

Best possible solution:

Retain the shared header implementation with its existing navigation guards and access-revalidation behavior.

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

The base source shows the separate toolbar, and the introduced browser coverage exercises header layout and focus preservation; no target code was executed during this review.

Is this the best way to solve the issue?

The change uses the existing shell and Agent lifecycle owners, removes the replaced toolbar, and preserves server authorization and draft guards.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 698112e67e0a.

Provenance checked

  • Visible Namespace selection changes intended behavior with a stated reason (4911c7e: Make Namespace switching discoverable while preserving readable-scope filtering and navigation.)
  • Agent overview and version actions keeps the original intent (Clarify Agent status and put failed-version recovery in the first screen #2542: Keep Agent status, recovery, and authorized actions readily accessible.)
  • Unsaved drafts and pending-write navigation keeps the original intent (4a50da4: Keep unsaved drafts until explicit discard and prevent navigation during unsettled writes.)
  • Agent access revalidation keeps the original intent (83c35af: Recheck session and Agent access on refocus while preserving mounted forms.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Free Wortley: Raw commit 3411e63 adds apps/controller/src/console/shell.mjs:174 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3411e63ba44d; files: apps/controller/src/console/shell.mjs)
  • Russell Bryant: Raw commit 4911c7e adds apps/controller/src/console/shell.mjs:171 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4911c7e10dd2; files: apps/controller/src/console/shell.mjs)
  • stevenlee-oai: Raw commit 7c3ecbf adds apps/controller/src/console/agents/detail.mjs:476 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 and browser-test changes Production +368/-93 lines; browser tests +331/-11 lines Growth covers responsive layout, shared action lifecycle, clipboard behavior, and distinct browser geometry and focus regressions.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Responsive headers and keyboard focus improve a regular console workflow with limited operational impact.
  • 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 (4 earlier review cycles)
  • reviewed 2026-10-19T22:29:09.355Z sha e240f7d :: needs changes before merge. :: [P2] Restore focus to header actions after an Agent access recheck | [P2] Update Storybook scenarios for the changed header controls
  • reviewed 2026-10-20T00:53:39.633Z sha a332cd3 :: needs changes before merge. :: [P2] Omit Namespace recovery when Settings has no selector
  • reviewed 2026-10-20T01:06:15.596Z sha 7cd3a61 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-20T01:11:16.489Z sha 7cd3a61 :: needs maintainer review before merge. :: none

Reviewed October 19, 2026, 9:39 PM ET / October 20, 2026, 01:39 UTC (Revision 5).

freeqaz and others added 3 commits October 19, 2026 22:57
…te new version

revalidateMountedAgent captured the focused control only inside the page
view, so focus on Create new version, now in the header, fell to the body
after the recheck. It now captures focus in the header actions too. Adds
a regression test and Storybook stories for the header (long name, 390 px,
Copy Agent ID without clipboard access) with a workflow checklist.
@freeqaz-openai

Copy link
Copy Markdown
Collaborator

@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-repro Preliminary submission classification; full source review pending. proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 20, 2026
The pushed head already restores header-action focus after an Agent
recheck (360b506); keep that version of revalidateMountedAgent.
Settings dropped its Namespace selector, but an unreadable Namespace kept
in its URL still showed "Namespace unavailable. Switch Namespace", and the
button focused nothing. Recovery now shows only on pages that render the
header selector it focuses. A browser case covers both sides: Backends'
Switch Namespace focuses the compact selector, Settings shows no recovery.

Drops this branch's refocus test for the header's Create new version: the
same behaviour is covered by the retained-revalidation cases already on
the branch.
@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-repro Preliminary submission classification; full source review pending. 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: 🦪 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-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@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 removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@freeqaz
freeqaz merged commit 2e06f3c into main Oct 20, 2026
49 checks passed
@freeqaz
freeqaz deleted the ux-p3 branch October 20, 2026 01:51
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