Repository navigation
Phase E2: Compute dashboard - #505
Merged
neuromechanist merged 29 commits intoNov 7, 2026
Merged
neuromechanist merged 29 commits into
neuromechanist merged 29 commits into
Conversation
Deploying nemar-website with
|
| Latest commit: |
39cc3fb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e8751a5a.nemar-website.pages.dev |
| Branch Preview URL: | https://feature-issue-495-compute-da.nemar-website.pages.dev |
3 tasks done
neuromechanist
merged commit Nov 7, 2026
442be8b
into
feature/issue-493-epic-compute-web
4 of 5 checks passed
This was referenced Nov 7, 2026
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.
Phase E2 of epic #493: the
/computedashboard. Implements #495 from the approved plan (#495 (comment)); where the merged backend differs, the backend won (listed below). Base is the epic branch; do not merge before the nemar-cli copy PR (nemarOrg/nemar-cli#2082) is settled.What it does
/computeon the app host: session guard (login withnext),Cache-Control: private, no-store. ReadsGET /compute/mefirst, then usage (group=day,partition, the server's default window) and the first page of jobs in parallel, each in its owntry/catch. One failed read or view builder shows one notice that says the figures are missing, not zero./settings#compute-accesswhen requests are open, frozen sentence for an ACTIVE frozen account only), Balances (CPU and GPU cards, three-decimal SU, never added together), Usage (one hand-rolled SVG chart per pool, stacked by partition, a<details>table of the numbers, an "Adjustments and other partitions" line for rows no pool can be told for), Jobs (table, state badges, "Load more" that works without JavaScript through?after=), Queue (null figure reads "Not enough data" with the count).none,requested,denied, an unverified account and a state outside the closed six show the Access panel only and read nothing./computeis an app route (host.ts), linked from the user menu for active, suspended and ended accounts and from the active Compute card in Settings.compute_page.*,compute_access.granted.link);compute_access.granted.bodyreworded to say jobs are submitted with the command line.--chart-series-1..4,--chart-grid,--chart-axistokens in light, system-dark and explicit-dark blocks.scripts/capture-compute-read-fixtures.mjs+ 13 fixture files captured from the real router;scripts/local-backend.mjs --seed-compute; ADR 0030 addendum, AGENTS.md map, CHANGELOG, handoff.Where the backend differs from the issue (the backend won)
No job name (the user job has none);
getComputeMewas not in E1 so this phase createscompute-api.ts; the frozen note is for an active account only (the CLI's rule);/compute/meanswers 200 in every access state (a 403 is only an unverified account); read errors carry the sentence inerrorand the word incode; queue estimates are inside/compute/me; amounts print with three decimals like the CLI. Backend gaps filed: nemar-cli#2078 (pool as a usage group), #2079 (job name), #2080 (are new jobs accepted), #2081 (the copy keys).Deviations from the plan
ComputeBadge.astro(access and job state) andComputePanel.astroinstead ofComputeJobBadge.astro; badge and jobs-table styles areis:globalwith a.compute-prefix so rows built by the Load more script are styled (a sync comment points atImportStatusBadge.astro).app_id(CHECK in migration 0115), so a route cannot serve one. The case is covered by unit inputs on the view model and by a source test that forbids every markup-writing API in the Compute files.compute-terms.ts, its drift test andCOMPUTE_REQUESTS_ENABLED.Tests
bun run lint,bun run typecheck(0 errors),bun run build(passes;public/og-image.pngit regenerates was not committed).bun run testwith the drift variables pointed at the nemar-cli copy-PR worktree: 179 files passed, 3 skipped, 4931 tests passed. New:compute-format,compute-chart,compute-badges,compute-api(every captured fixture, malformed bodies, error mapping, transport failures),compute-view,host,compute-user-contract-drift,compute-chart-tokens,compute-dashboard-ui. The format tests also pass underTZ=Pacific/Auckland.formatSuas a float (1), parse as local time (6, under a non-UTCTZ), pools read by iteration (1), a null queue figure printed as-(1).dev:account-copy-drift(seven new keys, reworded sentence) andcompute-user-contract-drift(newNEMAR_CLI_COMPUTE_STATE,_USER_CONTRACT,_CONTRACTvariables and sparse-checkout paths inci.yml). Both pass locally against the Epic D worktree. Do not put this onstagingearlier.Browser check (real browser, real local backend with
--seed-compute)Run: every access state (curl against SSR, panel list and text per state), the rich account in Chrome (balances, charts light and dark, jobs, Load more: 25 then 50 rows, no duplicate, cursor equal to the server-rendered
?after=page, appended rows equal the server-rendered rows cell by cell), a badafter(Jobs notice with a link back), frozen, overrun (-2.500), thin queue and0s, forced failure of each read separately (a closed port through a throwaway local edit, not committed: only that panel shows its notice, the rest render), no horizontal scroll at 360, 606 and 768 px (iframe widths), 3 x labels at 360 px, signed-out redirect to login withnext.Not run: the unverified persona and
requests_open: falselive (unit and source tests only); the same numbers againstnemar compute balanceandnemar compute list --json(the page and the CLI read the same routes, but the CLI binary was not run); a real screen reader (aria name and description inspected only) and a real Enter/Space key press on the<details>; the system-theme toggle (explicitdata-themeused); the marketing-host redirect (host tests only; the dev server refuses a spoofed Host); a 404 or 403 on/compute/melive (unit tested).Review fixes (second round)
formatSuis now the shortest exact decimal, the same rule as nemar-cli'sformatSu; the fixed three-decimal function issuFixed(the CLI's own name).formatSuShortis gone. Call sites, tests, the ADR 0030 addendum and AGENTS.md follow.compute-contract.tsis the one place forCOMPUTE_JOB_STATESandCOMPUTE_JOB_SOURCES; the drift extractors moved totest/compute-contract-drift.ts(with their own test) for the admin tab to import;readComputeErrorincompute-api.tsstays exported as the neutral{error, code}reader.cancelledunchanged); "neighbors"; Load more leaves ctrl, cmd, shift, alt and non-primary clicks to the browser.compute_access.granted.bodyno longer promises an allocation ("Your balances are on your compute page"), andcompute_page.unreported_noteno longer promises a human review. nemar-cli'snemar compute queuehelp embedscompute_page.queue_note(a test pins both helps). Not changed:compute_access.section.lede("a grant opens a starting allocation") predates this phase; say if you want it reworded too.Chart colors: method
For each theme the four series are checked pairwise on (a) contrast against
--admin-surface, (b) CIE L* difference of their relative luminance (grayscale lightness), (c) CIE76 Lab distance in normal vision, and (d) Lab distance after Machado 2009 deuteranopia and protanopia matrices at full severity. The earlier set had a grayscale L* gap of 4.7 between light series 2 and 3 and light series 2 at 3.2:1, so it is replaced. New light set#172554 #ea580c #0f766e #334155: contrast at least 3.6:1, grayscale L* gap at least 10.9, CVD Lab distance at least 18.4. Dark set unchanged: contrast at least 4.6:1, L* gap at least 9.0, CVD distance at least 11.6.test/compute-chart-tokens.test.tsnow pins 3.5:1 and an 8 L* gap in both themes. (The earlier "5.7" was the minimum of these measures with the L* gap scaled by 1.2, not a single-method figure.)