Repository navigation
feat(office): rebuild the tab strip, and give every Office page a way in (#1441) - #1445
Merged
Merged
Conversation
… in (#1441) Office's strip is now Overview · Screening · People · Organizations · Jobs · Reports · Compliance. Content Management opened on Users with nothing leading on to Jobs, Teams, Organizations, Projects or Universities; it is now People, Organizations and Jobs. Violations is Reports (the Moderation rename is #1272's). Screening, Organizations and Compliance get a row of their own pages beneath the strip, the way Admin's Billing does (#1439). The row component is shared: AdminGroupTabs and OfficeLayout both render drawer/GroupTabs, and each section keeps its own groups (admin-groups.ts, office-groups.ts). OfficeLayout's old row was built from the route tree and its tabs did not navigate; it is gone, with office-sections.ts. The phone's employer Jobs tab no longer claims /office/cms/jobs, so an Office page lights only Office. URLs are unchanged: navigation only. Deletes the dead officeCmsNavigation.ts (#1319). Fixes #1441 Closes #1319 Co-Authored-By: Claude Opus 5.5 <[email protected]>
3 tasks done
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.
Part of epic #1442. Fixes #1441. Closes #1319.
What changed
Office's strip is now Overview · Screening · People · Organizations · Jobs · Reports · Compliance (7 tabs).
/office/cms(the users list) and/office/cms/workers/*./office/cms/teams/:id/analytics→ Organizations)./office/cms/jobs/*.The phone's employer Jobs tab no longer claims
/office/cms/jobs, so an Office page lights only Office.URLs are unchanged: navigation only, with no route moves and no redirects.
Why the CMS pages were unreachable
OfficeLayoutalready drew a sub-tab row for/office/cmsand/office/atsfrom the route tree, but itsonValueChangewas a no-op ("handled by Link components", and there were none). The tabs looked clickable and went nowhere. That row and its helperoffice-sections.tsare gone.One mechanism for in-section rows
I reused #1443's Admin pattern rather than adding a third mechanism:
features/drawer/GroupTabs.tsxis the row itself, lifted fromAdminGroupTabs(which now renders it, with no change in behaviour).admin/admin-groups.tsand the newoffice/office-groups.ts(officeGroupPages, longest-prefix matching withownsfor sibling paths such as/office/ats/request).OfficeLayoutrenders the Office row, so every Office list page that already uses it gets the row without per-page edits.officeCmsNavigation.tsis deleted (#1319).Overlap with #1444
This PR edits only
generateOfficeDrawerItemand the mobileemployer-jobsentry indrawer/config.ts, and doesn't touchroutes.ts. Locales gainroutes.office.people/routes.office.reportsunderoffice, while #1444 adds underorg. Any conflict should be a few lines insection-tabs.test.ts.Tests
section-tabs.test.ts: the 7-tab strip, and every CMS page (list, create, edit, detail,teams/:id/analytics) lighting the right tab for office, office-without-check-admin and employer-admin trees./office/cms/jobslightsoffice-jobs.mobile-sections.test.ts:/office/cms/jobs*lights no employer phone tab.office-groups.test.ts: each row's pages and lit page, the check-admin split, and a reachability test. It walksapps/scaffald/app/(admin)/office/and asserts that every page except detail, create and edit pages, redirects and fix(developers): API keys and webhooks are per-organization but sit behind Office's staff-only gate — move them to the employer side #1440's moving api-keys/webhooks is a strip tab or a row entry.Ran:
pnpm check✅,nx run scf-core:test✅ (Node 22),pnpm prepush✅.pnpm radium:checkreports 3 violations, all present before this change and none in files touched here: theme dimension inpackages/ui(LegendIndicator, useTheme, colors.ts doc comments) and the@hookform/resolvers5.x pin.Browser check (local, office + check-admin user, 1440×900)
I clicked every tab and sub-tab. Each one navigated, and the right tab and sub-tab lit. Admin's Billing row still works after the shared-component refactor.
The screenshots live on the
pr-assets/office-tabs-1441branch, which holds images only. Delete it after merge.Noticed, not changed
SectionTabsignores a click on the already-lit folder tab (SectionTabs.tsx:54), so on a detail page such as team analytics, clicking Organizations doesn't return to the list. The detail pages have their own back buttons. This matches the rest of the app and is left alone.🤖 Generated with Claude Code