Skip to content

Separate the admin surfaces into tabs and split reading from acting - #228

Merged
luchobonatti merged 12 commits into
mainfrom
feat/227-admin-surface-tabs
Oct 14, 2026
Merged

luchobonatti merged 12 commits into
mainfrom
feat/227-admin-surface-tabs

Conversation

@luchobonatti

Copy link
Copy Markdown
Member

Summary

Closes #227

Each admin surface the wallet holds is a tab at its own URL, and the Cycle surface reads on the left and acts from a rail on the right.

Changes

  • /admin/:surface per held surface; /admin and any unheld or unknown surface redirect to the first held one
  • SurfaceTabs lists the held surfaces as links; the surface heading is visually hidden and takes focus on a tab change
  • Cycle splits into an overview (tiles, live rows, Epochs, Recent activity) and a sticky Actions rail; on narrow screens the rail comes first
  • Static price limits and the deposit cap sit in "Limits"; contract addresses sit in "Contracts" at the foot of each surface
  • CycleActionRail shows each action as a collapsed row with "Ready", the unmet count or "Unavailable"; one row opens at a time, the first ready one by default

Acceptance criteria

  • /admin/:surface per held surface; /admin opens the first held surface
  • An unheld surface reached by URL redirects to the first held surface and shows nothing of it
  • Tabs are links with aria-current; focus moves to the surface heading on change
  • Cycle state on the left, actions in a sticky rail on the right; the rail goes first on narrow screens
  • Each action is a collapsed row showing "Ready", the unmet count or why it is unavailable; one opens at a time
  • Static limits and contract addresses sit in collapsed "Limits" and "Contracts" sections
  • Signing still opens the transaction modal

Test plan

Automated tests

npm run test — 1006 passing.

Manual verification

  1. On a local network, open /admin as governance: tabs Emergency, Configuration and Governance; /admin lands on Emergency.
  2. As the manager, open /admin/emergency: it redirects to /admin/cycle.
  3. On Cycle as the manager: the rail reads "1 of 3 ready" with Close epoch open; Fulfill epoch and Fund the reserve are collapsed with their unmet counts.

Breaking changes

None.

Checklist

  • Self-reviewed my own diff
  • Tests added or updated
  • Docs updated (if applicable)
  • No unrelated changes bundled in

Screenshots

None.

@luchobonatti
luchobonatti requested review from hpmaxi and a balanced review from Copilot October 13, 2026 14:40
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
strata-vault-kit-app Ready Ready Preview Oct 13, 2026 6:05pm UTC

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

It is a broad UI refactor introducing new per-surface routing, redirects, focus management, and a component extraction whose subtle interaction behaviors warrant final human review despite no defects being found.

0 open findings

What changed in this PR

This PR restructures the operator-facing /admin panel. Instead of stacking every authority surface in one card list, each held surface now lives at its own URL (/admin/:surface) behind a tab bar, and the Cycle surface is split into a read-only overview (left) and a sticky Actions rail (right). The new CycleActionRail renders each action as a collapsible row summarizing readiness, replacing the old inline CycleActions block. Static price limits, the deposit cap, and contract addresses are tucked into collapsed Limits/Contracts disclosures.

Changes:

  • Add per-surface routing (/admin/:surface) with redirect to the first held surface, a SurfaceTabs nav (aria-current links), and focus moved to a visually-hidden surface heading on tab change.
  • Extract cycle actions into a new CycleActionRail (one row open at a time, first ready by default) and reshape CycleSurface into an overview + Actions aside layout.
  • Move static limits and the deposit cap out of live rows into limits, surfaced via a collapsed Limits disclosure; contract addresses via a Contracts disclosure.
File Description
app/​src/​App.tsx /​ App.test.tsx Add /admin/:surface route and test coverage.
app/​src/​pages/​AdminPanel.tsx /​ .test.tsx /​ .module.css New HeldSurfaces with routing, redirect, focus management; drop card grid for tabs; test + style updates.
app/​src/​pages/​cycle.ts /​ .test.ts Add Readiness, readiness, readyCount; split limits out of rows in GROUP_LAYOUT/groups.
app/​src/​components/​admin/​SurfaceTabs.tsx /​ .test.tsx /​ .module.css New tab bar of NavLinks per held surface.
app/​src/​components/​admin/​CycleActionRail.tsx /​ .test.tsx /​ .module.css New collapsible action rail with readiness summaries and a11y wiring.
app/​src/​components/​admin/​CycleSurface.tsx /​ .test.tsx /​ .module.css Overview + sticky Actions aside layout; Disclosure, FigureRows; remove inline actions.
app/​src/​components/​admin/​CycleSection.tsx /​ .test.tsx Wire rail + contracts into CycleSurface; test helpers for collapsible rows.

I found no concrete defects: the readiness logic cannot produce a misleading "0 unmet" summary (amount/epoch conditions gate enabled), the redirect/focus guards are correct, removed exports and CSS classes have no dangling references, and all surfaces retain comprehensive test coverage.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@luchobonatti
luchobonatti merged commit ef54fcc into main Oct 14, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 0ae61924 Deployed Oct 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Separate the admin surfaces into tabs and split reading from acting

3 participants