Repository navigation
feat(redesign): the Office opens on what needs a decision (#839) - #902
Merged
Merged
Conversation
`/office` opened straight into the notification delivery queue — an operations
table — with the storage dashboard and a list of developer links below it.
Nothing on the page said how much was waiting for an administrator, and the
queues that do need a person were each somewhere else entirely.
An overview first: the counts as a `MetricRow` band, then "Needs a decision"
as plain rows linking into each queue, then the consoles. A count we do not
have yet renders as a dash rather than a zero — those are different claims,
and on this page the difference is "nothing to do" versus "we could not ask".
The community verification queue was a column of bordered cards, each
repeating a "License Information" sub-panel on its own tinted ground: a box
inside a box inside a scroll view, with the two decisions at the bottom right
of each. It is `ScreenHeader` + `ListToolbar` + `Lane` rows now, with how long
someone has waited leading the row and Approve/Reject as the row's actions.
Rejecting opens beneath the row rather than replacing its actions, so the
person being rejected stays on screen while the reason is written.
Three names disagreed with their own navigation:
- `/office/cms/workers` is "Workers" in the drawer, the breadcrumb, the tab
and the route — and was titled "Users" on the page.
- `/office/violations` is "Violation Reports" everywhere except its own
heading, which read "Anti-Circumvention Violation Reports". What it is
about belongs in the tip.
- The notifications console had no heading at all, only a bare `Text`, so it
was absent from the document outline.
`MetricCard` is gone. The last two were in `AdminMetricsPanel` and
`EEOReportScreen`; the former rendered title, figure and caption all in the
same secondary grey, so the number had no more weight than its label.
## Two of these four screens cannot be verified with data
Both are server-side and neither is touched here:
- `GET /v1/legal-agreements/violation-reports` returns 500 on every request
— the list query embeds `circumvention_reports_reported_by_user_id_fkey`,
a foreign key that was never created. Filed as #901. The screen sits on
"Loading violation reports…" and never reaches an error state.
- Everything behind `/office/communities/verification` returns 403 for every
user, including one holding `super_admin`: `requireOfficeRole` selects a
`role` column from `core.users`, and that table has no such column, so the
helper returns false unconditionally. Filed as #900.
Verified at 1440 and 390 as an employer: no horizontal scroll on any of the
four, the Overview resolves one H2 and its sections as H3s, and the People and
Jobs tables collapse to key–value stacks on the phone.
Co-Authored-By: Claude Opus 5 <[email protected]>
6 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.
Closes #839. Release 3 (#849) — the last one.
Overview
/officeopened straight into the notification delivery queue — an operations table — with the storage dashboard and developer links beneath. Nothing said how much was waiting for an administrator, and the queues that need a person were each somewhere else.An overview first: the counts as a
MetricRowband, then Needs a decision as plain rows linking into each queue, then the consoles. A count we don't have yet renders as a dash rather than a zero — on this page that difference is "nothing to do" versus "we could not ask".Screening
The community verification queue was a column of bordered cards, each repeating a "License Information" sub-panel on its own tinted ground: a box inside a box inside a scroll view, with the two decisions at the bottom right of each. It's
ScreenHeader+ListToolbar+Lanerows now — how long someone has waited leads the row, Approve/Reject are the row's actions, and rejecting opens beneath the row rather than replacing its actions, so the person being rejected stays on screen while the reason is written.Three names that disagreed with their own navigation
/office/cms/workers/office/violationsTextAll three now agree; what the violations screen is about moved into its tip.
MetricCardis goneThe acceptance called for it. The last two were in
AdminMetricsPanelandEEOReportScreen— the former rendered title, figure and caption all in the same secondary grey, so the number had no more weight than its label.Two of the four screens cannot be verified with data
Both are server-side, neither is touched here, and both are why the acceptance's "tables verified" can only be partly met:
GET /v1/legal-agreements/violation-reportsreturns 500 on every request. The list query embedscircumvention_reports_reported_by_user_id_fkey; that foreign key was never created (the column exists, the constraint doesn't). The screen sits on "Loading violation reports…" and never reaches an error state./office/communities/verificationreturns 403 for every user, includingsuper_admin.requireOfficeRoledoesfrom("users").select("role"), andcore.usershas norolecolumn, so the query errors,datais null, and the helper returns false unconditionally. The error is discarded — onlydatais destructured. Roles actually live incore.role_assignments.Both were found by reading the network rather than the page: each screen renders a plausible loading or empty state over the failure.
Verification
Employer session injected before page boot:
/officehScroll 0,H2: Office+H3: Needs a decision+H3: Notification operations/office/cms/workershScroll 0,H2: WorkershScroll 0, key–value stacks per row/office/cms/jobshScroll 0,H2: JobshScroll 0/office/violations/office/communities/verificationscf-core1236 passed / 0 failed; both typechecks clean;pnpm prepushgreen.One note on the test run: an intermediate run showed
MapSearchInputandProgressIndicatorfailing with a bareSTACK_TRACE_ERRORand no assertion message. Both pass in isolation, both are untouched by this branch, and a re-run with the dev server stopped returned 1236/0. That is load flake — same signature as #753 — not a regression here.🤖 Generated with Claude Code