Repository navigation
feat(nav): Admin section — move platform setup out of Office (#1439) - #1443
Merged
Merged
Conversation
Office mixed daily staff work with setup pages staff rarely touch, and
several of those pages had no way in. They now live under a new
top-level Admin section at /admin, right after Office in the nav:
General /admin/general/geographic
Billing /admin/billing/{payments,transactions,stripe}
Integrations /admin/integrations/{background-checks,hris}
Developer /admin/oauth-apps, /admin/oauth-apps/:id
System /admin/system/{notifications,storage}
Admin uses Office's gate (office role, tablet+), and its layout keeps
the navigator mounted under the loading overlay so deep links survive
the role check (#519). Each tab owns its group by prefix, so it lights
on detail pages; multi-page groups get a row of their pages.
Office loses its Integrations, Payments and Transactions tabs. Every
moved /office path is now a hidden route that redirects to its new
home, keeping child segments and query (?status=failed). The Office
Overview cards, OAuth screens and developer links point at /admin.
API keys and webhooks are untouched (#1440).
Fixes #1439
Co-Authored-By: Claude Opus 5.5 <[email protected]>
thinkclay
added a commit
that referenced
this pull request
Nov 25, 2026
…rged Scaffald/sdk#44 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Open
8 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1439. Part of epic #1442.
What changed
A new top-level Admin section at
/adminsits right after Office in the nav. It holds the platform setup that staff rarely touch./admin/general/geographic/office/settings/geographic/admin/billing/payments,/transactions,/stripe/office/payments,/office/transactions,/office/settings/stripe/admin/integrations/background-checks,/hris/office/integrations/*/admin/oauth-apps,/admin/oauth-apps/:id/office/oauth-apps/*/admin/system/notifications,/storage/office/notifications,/office/storageROUTES.ADMINis inroutes.ts, placed beforeOFFICE. InsideOFFICEthe moved entries only gainedhidden: trueand a comment. API keys and webhooks are untouched (fix(developers): API keys and webhooks are per-organization but sit behind Office's staff-only gate — move them to the employer side #1440).(admin)/admin/_layout.tsxuses Office's gate,useRoleProtectedRoute(['office'])plususeOfficeRouteProtection. The navigator always renders, with the loading overlay on top, so a deep link survives the role check (fix(auth): OAuth callback + hydration fixes, versioned legal acceptance, web PKCE #519). Narrowing the gate toplatformis left to the epic.generateAdminDrawerItem()has its own icon (SlidersHorizontal), andgetNavItemsputs it right after Office. Each Admin tab claims its group bymatchPrefix, so a tab lights on its detail pages too, e.g./admin/oauth-apps/:id. Office's strip no longer has Integrations, Payments or Transactions.AdminGroupTabsrow moves between them. I couldn't reuseOfficeLayout's secondary tabs: theironValueChangeis a no-op, so they only display./office/...route file is now justMovedToAdminRedirect. It keeps child segments and the query string (features/admin/moved-paths.ts). These redirects stay behind the Office gate, as the issue allows.OfficeDeveloperLinks' OAuth entry now point at/admin. I also added i18n keysroutes.admin.*in en, es and fr.Verification
Checked in the browser on the local stack at 1280×800, signed in as the seed office user:
Office,Admin,Home, … Admin's folder tabs read General · Billing · Integrations · Developer platform · System./adminredirects to/admin/general/geographicand lights General./admin/billing/stripelights Billing, with the sub-row Payments · Transactions · Stripe settings./admin/integrations/hrislights Integrations, with the sub-row Background check providers · HRIS & Payroll./admin/oauth-apps/95c6ffef-…(the detail page) lights Developer platform./admin/system/storagelights System, with the sub-row Notifications · Storage./admin/billing(which lands on payments) opens/admin/billing/transactions./office/settings/stripe→/admin/billing/stripe/office/settings/geographic→/admin/general/geographic/office/payments→/admin/billing/payments/office/transactions→/admin/billing/transactions/office/integrations/hris→/admin/integrations/hris/office/integrations/background-checks→/admin/integrations/background-checks/office/oauth-apps→/admin/oauth-apps/office/oauth-apps/<id>→/admin/oauth-apps/<id>/office/storage→/admin/system/storage/office/notifications?status=failed→/admin/system/notifications?status=failed, with the console opening on the Failed filter/admin/billing/stripeis sent to/dashboard. Their sidebar has neither Office nor Admin.Checks:
pnpm check: passes.vitestfor drawer, admin and layouts gives 133/133. New tests covergetNavItemsorder, every Admin tab lighting by path (including/admin/oauth-apps/:id),activeNavKeyclaiming/admin/*, Office's remaining tabs, and the redirect map.nx run scf-core:test: 1785 pass and 13 fail. All 13 are inclearAuthStorage.test.tsandMapStateProvider.test.tsx, wherelocalStorageis undefined under this machine's Node 26. Neither touches this change.pnpm radium:check: reports 3 violations, all in files this PR does not touch: comments inpackages/uiand the@hookform/resolverspin.pnpm prepush: passes, with all 277 gated api tests. The first run failed 10 gated tests because the shared local edge runtime is serving functions from another worktree (sweep5). Pointed at this branch's ownapion a spare port, every one passed. This PR has no backend changes.Not updated:
scripts/audit/screen-capture.mjsstill lists the old/office/...paths. They redirect, so the sweep still works.🤖 Generated with Claude Code