Skip to content

Fix Refresh points on the UMAP run page - #369

Merged
byronwall merged 3 commits into
mainfrom
claude/umap-refresh-points
Nov 29, 2026
Merged

byronwall merged 3 commits into
mainfrom
claude/umap-refresh-points

Conversation

@byronwall

@byronwall byronwall commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

"Refresh points" on a UMAP run page now rereads the run's points and updates the count and the plot.

Before: Clicking the button sent no request. The page kept the old points.
After: One click sends one read, and the page shows the current points. If that read fails, the last points stay on screen.

Cause

The page called the points query after an await, so the router did not track it. Revalidating it reran nothing. The page now starts both reads before the first await.

Because the points read now starts before the page knows the run exists, fetchUmapPoints returns an empty list for an unknown run instead of throwing "Run not found".

Proof

Before: one point removed, then Refresh points
before

The old code still shows 2 points after the click.

Loaded, then refreshed after one point is removed
After: 2 points on load, 1 point after one is removed and the button is clicked.

A browser check on pnpm dev with an isolated audit database showed one server read on click, no loading fallback flash, and the missing-run message with no console error. The five Canvas and run page navigation paths from #367 still pass.

The new spec tests/e2e/umap-run-refresh.spec.ts fails on the old code at the expected 1 points. It passes now, and it also checks that a failed refresh keeps the points.

pnpm lint exits 0, pnpm type-check passes, and pnpm test gives 925 passed, 86 skipped (database tests).

Codex review round 1 passed (no P0 or P1 in scope). The last commit fixes its one in-scope finding, a failed refresh that emptied the plot, and adds that case to the spec. No second round ran.

Limits

  • CI skips the new spec, because seeding a UMAP run needs an audit database. Run it locally.
  • A failed refresh logs a console warning and shows no message on the page. A failed first load still shows 0 points.
  • canvas-note-panel.spec.ts fails 2 of 4 cases on my machine, both on this branch and with main's source. The spec skips in CI.

Stack: UMAP run page rereads

What splits: Making the run page follow its rereads, in two parts: the points read, then the cards and the run itself.
Why it splits: The points fix was already in review and can merge alone.
Why this split: The second part builds on how this part starts its reads. Adding it here was rejected, because it would change a PR that was already reviewed.

  1. Fix Refresh points on the UMAP run page #369: "Refresh points" rereads the points.
  2. Fix stale groups and deleted runs on the UMAP run page #370: Fixes the two older faults that the review of this layer found: a stale group table, and a deleted run that showed 0 points.

🤖 Generated with Claude Code

byronwall and others added 3 commits November 28, 2026 08:26
The run page read its points after awaiting the run record, so the router
did not track the read and revalidating it reran nothing. Start both reads
before the first await.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The run page now asks for points before it knows the run exists, and the
"Run not found" throw reached the browser console.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@byronwall

Copy link
Copy Markdown
Owner Author

Pre-merge review of #369 and #370 together (origin/main...33400b04, against CODING_STANDARDS.md). Nothing was changed. Merging as is.

Left open:

  • P2, added by Fix stale groups and deleted runs on the UMAP run page #370: app/src/routes/umap/[id]/index.tsx:43. A failed run read can be reused if you open another run and return within a few seconds, which shows an error.
  • Pre-existing: index.tsx:82. "Delete Run" on a run deleted elsewhere shows "Failed to delete run".
  • Pre-existing, not reproduced: app/src/features/umap/useUmapCanvas.ts:18. The resize observer attaches once, so a remounted plot container may be missed.
  • Nit: app/tests/e2e/umap-run-refresh.spec.ts:51 has an abort-all route that no request reaches.

🤖 Generated with Claude Code

@byronwall
byronwall merged commit c1ceb8d into main Nov 29, 2026
4 checks passed
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