Skip to content

feat(console): Settings with Sign out and session facts - #2996

Merged
freeqaz merged 6 commits into
mainfrom
ux-p9
Oct 20, 2026
Merged

freeqaz merged 6 commits into
mainfrom
ux-p9

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Settings (UX spec 3.10, row P9 / S2) was one panel with name and email, a "No configurable settings in this release." line and a Back button. Sign out lived only in the account menu, and the page did not look like the rest of the warm-quiet console.

Change

  • Settings is now two .cards in a 720 px column, matching settings-1440.png / settings-390.png:
    • Signed-in account: a 64 px initials avatar (same initials() as the account row, now exported from shell.mjs) beside a dl with Name and Email.
    • Session: a secondary (plain) Sign out button that runs the existing sign-out (POST /api/auth/sign-out, the account menu's path), described by "Signing out ends this session on this device only." At phone width the button spans the card and is 44 px tall.
  • "No configurable settings in this release." and Back are removed. Back was the only reader of the previousCollection history state, so that bookkeeping in navigation.mjs/console.mjs is removed too (history entries now carry null state).
  • Omitted on purpose (client-only change): the session read (GET /api/auth/session → {authenticated, sessionKey, user}) has no sign-in method, sign-in time or expiry, and its schema allows no extra fields. So there is no "Sign-in method" row and no "Signed in" / "Expires" rows. Adding those fields is a separate server change that needs owner sign-off.
  • docs/reference/console.md: describes Settings (word count goes down by 2).

Verification

  • New browser test tests/browser/console-shell.test.mjs › "Settings shows the account and session cards, and its Sign out ends the session" runs at 1440 and 390. It checks the scope line, that there is no Namespace selector, a 64 px avatar with "CA", Name/Email only, Sign out's accessible description, secondary styling (surface fill, border-strong edge), no "No configurable settings" or Back, a 720 px column, a full-width 44 px button at 390, a successful POST /api/auth/sign-out, the Sign in form, and GET /api/auth/session returning null.
    • On main's console sources (this branch's test against origin/main's console.mjs/console.css/shell.mjs/navigation.mjs) it fails: TimeoutError waiting for the Signed-in account card's .account-avatar.
    • With the change it passes. console-shell.test.mjs passed 20/20 at 2 CPUs (8/8 tests each run).
  • console-retained-revalidation.test.mjs: the Settings return now uses the sidebar Agents link instead of the removed Back button, with the same held-frame assertions. The case passed 20/20 at 2 CPUs and the full file passed 67/67.
  • Internal visual review (shots.mjs on the head vs the mockups at 1440 and 390, plus keyboard focus and a 50-char name / 80-char email overflow probe): approved, with nits only. Applied: a 96 px label column and a stretched dl at phone width so long emails keep room, and 24 px initials in the 64 px avatar. Not changed: the desktop Sign out is 39 px tall, from the shared base button rule (out of scope here). After the nits, console-shell.test.mjs passed 20/20 again at 2 CPUs.
  • Full files green: console.test.mjs 48/48, console-page-header.test.mjs 5/5, console-shell.test.mjs 8/8. Prettier and eslint are clean on the touched files.
  • Acceptance numbers (spec P9, from the Storybook settings frame, measured the way shots.mjs measures):
1440 390
Namespace selectors 0 0
"Sign out" buttons in #main 1 (85×39) 1 (309×44, full card width)
Settings column width 720 343
Cards Signed-in account, Session same
dl rows Name, Email same
Expiry shown no (not in the session response) no
primary / accent / danger elements 0 / 0 / 0 0 / 0 / 0
page scrollWidth 1425 (no overflow) 375 (no overflow)

Before / after / mockup (Storybook settings story; mockup is the alignment target. The Sign-in method, Signed in and Expires rows are omitted, see Change):

Before After Mockup
1440 settings-before-1440 settings-after-v2-1440 settings-mockup-1440
390 settings-before-390 settings-after-v2-390 settings-mockup-390

Walkthrough (Storybook settings story, simulated UI: choose Sign out in the Session card, "Signing out…", then the sign-in page): 1440 video · 390 video. The real sign-out path (Fastify auth, POST /api/auth/sign-out, session read null afterwards) is covered by the browser test above.

Sign-out unconfirmed from Settings (new story, sign-out returns 503 while the session stays active): private content is hidden until revocation is confirmed, with Retry.

1440 390
settings-signout-unconfirmed-1440 settings-signout-unconfirmed-390

Storybook: Pages/Settings › Account (description and walkthrough steps updated) and Pages/Settings › Sign-out unconfirmed (new; reuses the sign-out 503 fixture through the card's button). docs/contributing/console-storybook.md lists the new coverage.

Open-PR conflict map (git merge-tree of each open PR against main, then against this head):

Risks

Low. This is a client-only change to one page. Sign out reuses logout() unchanged. Dropping the previousCollection history state only affects the removed Back button, which was its only reader (history.state has no other reader in the console). The sign-in method and expiry rows wait for a server change.

Settings (UX spec 3.10, row P9) becomes two cards in a 720 px column:
Signed-in account (initials avatar, name, email) and Session with a
secondary Sign out and its help line. The 'No configurable settings'
line and the Back button go; Back's previousCollection history state
had no other reader, so it goes too. The session read carries no
sign-in method or expiry, so those rows are omitted.
Its text stays true (no editable settings), and leaving it avoids a new
conflict with the open Installation configuration PR on that line.
@freeqaz
freeqaz requested a review from a team as a code owner October 20, 2026 03:17
@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.

Visual review nits: a 96 px label column at phone width so long emails
keep room, the list stretches to the card, and 24 px initials in the
64 px avatar.
@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 20, 2026
@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. 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 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 gives Settings separate account and session cards, adds Sign out, and removes the Back button and its unused navigation state.

Example: Demo Operator opens Settings at a 390-pixel viewport.

  • Before: Settings shows name, email, and Back; Sign out is available through the account menu.
  • After: Settings shows an initials avatar and a Session card with a full-width Sign out button.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, useful patch with the previous finding resolved; directly inspected proof establishes presentation, while interaction evidence remains partly unverified.
Proof confidence 🦐 gold shrimp (3/6) ✨ media proof bonus Sufficient (screenshot): The inspected Storybook screenshot demonstrates the changed Settings presentation; the PR supplies desktop and phone sign-out walkthroughs and clearly labels them simulated UI proof. Browser coverage separately exercises real controller sign-out. Newer media could not be inspected because of this environment's access restrictions, so its interaction contents remain unverified.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Settings provides little account context and requires opening another menu to sign out.
Reason: The collaborator-authored direction adds a useful action with little production machinery and deliberately avoids inventing unavailable session metadata.

Merge readiness

✅ Ready for maintainer review

Keep open for maintainer triage. The previous Storybook finding is fixed, and the reviewed diff introduces no concrete correctness or security defect.

Priority: P3
Reviewed head: 72954275dbde23d743fdb730f838e171022479c2

Before merge

None.

Findings

None.

Agent review details

How this fits together

The controller-served console reads the admitted session to display account details and sends Settings sign-out requests through the existing API client and server authentication boundary.

flowchart LR
  User[Signed-in user] --> Settings[Settings page]
  Settings --> Session[Admitted session facts]
  Settings --> Logout[Existing logout handler]
  Logout --> Auth[Controller authentication endpoint]
  Auth --> Result[Session revoked or retry screen]
Loading

Technical review

Best possible solution:

Keep the focused Settings presentation and reuse the existing logout owner without expanding the session API.

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

This is an enhancement; current-main source confirms the previous Settings panel, and the PR reports that its browser case fails against the base presentation and passes with the change.

Is this the best way to solve the issue?

The implementation uses existing session facts, shared avatar initials, and the established logout handler, while removing navigation state made unnecessary by the deliberate Back-button removal.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6c5bbd6ff8ce.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Focused introduced change: The pinned diff replaces the Settings panel, shares the existing initials calculation, and removes previousCollection together with its sole consumer; current main retains the old panel. (apps/controller/src/console/console.mjs:2424, 72954275dbde)
  • Previous finding resolved: The Settings scenario now supplies sign-out walkthrough steps, and a separate exported story exercises unconfirmed sign-out through the Settings button using the existing failure fixture. (scripts/console-storybook/public/scenarios.mjs:1185, 72954275dbde)
  • Authentication boundary preserved: Settings calls the existing logout handler. The API client retains the pinned session header, and server sign-out retains origin validation and matching-session checks before revocation. (apps/controller/src/auth/index.ts:1577, 72954275dbde)
  • Integration coverage: The added browser case exercises Settings at desktop and phone widths, submits sign-out, and checks that the subsequent session read is null; its fixture uses real Fastify and controller authentication with in-memory platform state. (tests/browser/console-shell.test.mjs:178, 72954275dbde)
  • Visual evidence and inspection limit: The downloaded desktop after screenshot shows the two cards, account avatar, and secondary Sign out button. The updated body links desktop and phone interaction videos and failure screenshots. The prepared manifest contains only four images; direct retrieval of newer media was blocked by the domain allowlist, the Gist API returned 403, and the web reader could not access the video. This is a review-environment limitation, not absent contributor evidence. (72954275dbde)

Likely related people:

  • kevinlin-openai: Raw commit 3474bb7 adds apps/controller/src/console/console.mjs:585 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3474bb717fff; files: apps/controller/src/console/console.mjs)

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is a focused Settings usability and presentation improvement; sign-out already exists in the account menu.
  • 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.
  • 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-20T03:46:09.642Z sha b39b7c0 :: needs changes before merge. :: [P3] Add the Settings sign-out walkthrough to Storybook

Reviewed October 20, 2026, 12:03 AM ET / 04:03 UTC (Revision 2).

…Storybook

The Settings story describes the account and Session cards with steps,
and a new Settings 'Sign-out unconfirmed' story reuses the sign-out 503
fixture through the card's button (review: Storybook must cover the new
control).
@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:feature Preliminary submission classification; full source review pending. proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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 20, 2026
@freeqaz
freeqaz merged commit 184b495 into main Oct 20, 2026
70 checks passed
@freeqaz
freeqaz deleted the ux-p9 branch October 20, 2026 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. 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