Skip to content

feat(redesign): the Office opens on what needs a decision (#839) - #902

Merged
thinkclay merged 1 commit into
mainfrom
redesign/r3-839-admin
Sep 25, 2026
Merged

thinkclay merged 1 commit into
mainfrom
redesign/r3-839-admin

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Closes #839. Release 3 (#849) — the last one.

Overview

/office opened 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 MetricRow band, 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 + Lane rows 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

Route Drawer / breadcrumb / tab Page said
/office/cms/workers Workers Users
/office/violations Violation Reports Anti-Circumvention Violation Reports
notifications console — no heading at all, a bare Text

All three now agree; what the violations screen is about moved into its tip.

MetricCard is gone

The acceptance called for it. 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 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:

  • #901 — GET /v1/legal-agreements/violation-reports returns 500 on every request. The list query embeds circumvention_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.
  • #900 — everything behind /office/communities/verification returns 403 for every user, including super_admin. requireOfficeRole does from("users").select("role"), and core.users has no role column, so the query errors, data is null, and the helper returns false unconditionally. The error is discarded — only data is destructured. Roles actually live in core.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:

Screen 1440 390
/office hScroll 0, H2: Office + H3: Needs a decision + H3: Notification operations same
/office/cms/workers hScroll 0, H2: Workers hScroll 0, key–value stacks per row
/office/cms/jobs hScroll 0, H2: Jobs hScroll 0
/office/violations renders, data blocked by #901 —
/office/communities/verification renders its error branch, blocked by #900 —

scf-core 1236 passed / 0 failed; both typechecks clean; pnpm prepush green.

One note on the test run: an intermediate run showed MapSearchInput and ProgressIndicator failing with a bare STACK_TRACE_ERROR and 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

`/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]>
@thinkclay
thinkclay merged commit d5de71b into main Sep 25, 2026
9 checks passed
@thinkclay
thinkclay deleted the redesign/r3-839-admin branch September 25, 2026 11:03
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.

feat(redesign): admin Overview, Screening, People and Jobs reskinned onto the shell

1 participant