Skip to content

Phase E4: Admin compute tab - #504

Merged
neuromechanist merged 26 commits into
feature/issue-493-epic-compute-webfrom
feature/issue-497-admin-compute-tab
Nov 7, 2026
Merged

neuromechanist merged 26 commits into
feature/issue-493-epic-compute-webfrom
feature/issue-497-admin-compute-tab

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

What

Phase E4 of epic #493 (issue #497): the admin Compute tab at /admin/compute, after Mail. Base is the epic branch, not staging. Website ADR 0030.

  • Requests (default): a row per account with the stated country prominent, affiliation, city, email, ORCID iD, requested date, terms version and the purpose (inert text, dir="auto", full text always reachable). Grant, Deny, Suspend, Revoke, "Lift suspension" and "Grant again", each by id through its own dialog: optional reason (500 characters), Cancel focused first, Grant needs an unticked-by-default export-control acknowledgement, Revoke a typed word. One decision in flight page-wide, a POST is never retried, and after an outcome that cannot be told (a lost answer, a 5xx, which can follow a committed batch) the page says "not confirmed" and re-reads the account once. A non-owner's own Grant is disabled with the reason.
  • Read-only views: Pools (platform, partner, account), Usage (the quarterly counts), Flagged jobs (one chip per flag: unreserved, unattributed, mismatch, overrun) and Reconciliation (status with the paused banner, unmatched accounting rows, mismatch-flagged jobs). Each read is its own, so one failed read degrades one section.
  • Badge: the length of the first page of the requested listing (200+ when more exist), fail-soft, in the shared admin shell.
  • Not offered (decision 2): policy, move-charge, pool grants and adjustments, job cancel and advance. The lede points to nemar admin compute.
  • No number is computed by the page. Where the backend serves nothing, the section says "not available yet" and links the issue. The one derived figure is the badge, a row count of a served list.

Backend contract

Epic D branch feature/issue-2021-epic-compute-users at e0685a25. Where the plan and the backend differed, the backend won: four flags not three, one flag per read, { error, code } envelope (not readError()), suspended rows offer Grant and Revoke, the list is in account creation order, a non-owner's self-grant is refused (self_decision), no drift route and no platform usage over time.

nemar-cli issues and PR

  • #2083 platform usage over time (Usage view shows quarterly counts plus a note)
  • #2084 ledger versus scheduler difference and the tolerance (Reconciliation shows a note and marks no row over tolerance)
  • #2085 count, order option and header comment on the access list
  • #2086 last decision, reason read-back and account standing on access rows
  • #2087 the copy keys; the PR is Add compute_admin copy keys nemar-cli#2089 (156 compute_admin.* keys, mirrored exactly here)
  • #2088 single-account read

Merge order: nemar-cli#2089 first (it is the source of the copy). The account-copy-parity pair in nemar-cli CI is known red until these keys reach dev.

Tested

  • bunx vitest run: 178 files, 4842 tests pass, with NEMAR_CLI_ACCOUNT_COPY, NEMAR_CLI_COMPUTE_ADMIN_CONTRACT and NEMAR_CLI_COMPUTE_ACCESS_CONTRACT pointed at the nemar-cli copy branch (the drift tests are strict in CI and red until the compute epic is on nemar-cli dev, as for E1).
  • bun run typecheck 0 errors, bun run lint clean, bun run build passes.
  • Fixtures are captured from the real backend routes: NEMAR_CLI_DIR=<Epic D checkout> bun scripts/capture-compute-admin-fixtures.mjs (named in each test file). Access rows come from the backend suite's seeding and every state change goes through the real decision routes; stale_state uses the backend suite's own race seam; flag columns are set with the UPDATE the backend's own reporting test uses.
  • Browser check against the real local backend (scripts/local-backend.mjs, extended with the admin world): the badge; own Grant disabled; Cancel focused on open; Grant gated by the acknowledgement and double-clicked sends one POST; deny with a reason, suspend, revoke gated by the typed word, grant again; a decision a second admin made first answers the backend's 409 sentence and redraws the row; Escape closes and returns focus; the hostile purpose (markup, bidirectional controls, a tab) renders as visible escaped text with no node created; Pools, Flagged and Reconciliation views; dark theme; no horizontal page scroll.

Not verified

  • 375 px width (the Chrome tools' minimum window is about 600 px; no overflow there).
  • The Settings card and the person's /compute page after a decision (that page is another phase).
  • A section degrading while the backend is down (the session itself needs the backend, so the page redirects to sign-in; covered by the read/guard tests only).
  • A real mail send (email_sent: false locally, which the row reports), real scheduler data, a real tenant.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

@neuromechanist
neuromechanist force-pushed the feature/issue-497-admin-compute-tab branch from 52ad28c to bacfdcd Compare November 7, 2026 15:21
@neuromechanist
neuromechanist merged commit 46ac1d5 into feature/issue-493-epic-compute-web Nov 7, 2026
4 of 5 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-497-admin-compute-tab branch November 7, 2026 15:23
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.

1 participant