Repository navigation
Separate the admin surfaces into tabs and split reading from acting - #228
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
🔵 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, aSurfaceTabsnav (aria-currentlinks), 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 reshapeCycleSurfaceinto an overview + Actions aside layout. - Move static limits and the deposit cap out of live rows into
limits, surfaced via a collapsedLimitsdisclosure; contract addresses via aContractsdisclosure.
| 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.
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/:surfaceper held surface;/adminand any unheld or unknown surface redirect to the first held oneSurfaceTabslists the held surfaces as links; the surface heading is visually hidden and takes focus on a tab changeCycleActionRailshows each action as a collapsed row with "Ready", the unmet count or "Unavailable"; one row opens at a time, the first ready one by defaultAcceptance criteria
/admin/:surfaceper held surface;/adminopens the first held surfacearia-current; focus moves to the surface heading on changeTest plan
Automated tests
npm run test— 1006 passing.Manual verification
/adminas governance: tabs Emergency, Configuration and Governance;/adminlands on Emergency./admin/emergency: it redirects to/admin/cycle.Breaking changes
None.
Checklist
Screenshots
None.