Skip to content

Fix stale groups and deleted runs on the UMAP run page - #370

Merged
byronwall merged 3 commits into
claude/umap-refresh-pointsfrom
claude/umap-run-stale-state
Nov 29, 2026
Merged

byronwall merged 3 commits into
claude/umap-refresh-pointsfrom
claude/umap-run-stale-state

Conversation

@byronwall

@byronwall byronwall commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

On a UMAP run page, "Regenerate Groups" now updates the group table, and "Refresh points" and "Regenerate Groups" report a run that was deleted elsewhere. All work without a reload. A refresh that partly fails now keeps the whole last result.

Before: The group table kept the old groups. A deleted run showed "0 points" with its old details, or stayed on screen after a "Regenerate Groups" alert.
After: The table shows the new groups. A deleted run shows "This UMAP run could not be loaded."

Cause

The page copied the run's details into a constant that was set once, so rereads did not reach the cards. "Refresh points" reread only the points, not the run. A failed "Regenerate Groups" reread nothing.

Proof

Before: one point removed, then Regenerate Groups After
groups before groups after

The plot has one point in both. Only the new code shows 1 note in the table.

Before: run deleted, then Refresh points After
deleted before deleted after

Only the new code shows the missing-run message.

Before: run deleted, then Regenerate Groups After
regenerate before regenerate after

The old code showed an alert and kept the run. The new code shows the missing-run message with no alert. A failure on a run that still exists keeps the alert.

tests/e2e/umap-run-refresh.spec.ts on pnpm dev with an isolated audit database:

  • The three new cases each failed on the route as it was before their fix.
  • On this branch, all 4 cases pass. The first case now also fails each read in turn and checks that the count and the groups stay.

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

Codex review round 1 on the first commit passed (no P0 or P1 in scope, two P2, one pre-existing). The second commit fixes the partial-refresh P2 and adds its test. The third fixes the pre-existing finding. No second round ran.

Limits

  • CI skips this spec, because seeding a UMAP run needs an audit database.
  • A failed refresh logs a console warning and shows no message on the page.

Open findings

  • P2 · diff · app/src/routes/umap/[id]/index.tsx:43 — If the run read fails on refresh, and you open another run and come back within a few seconds, the router can reuse the failed read and show an error. Open: reproduced by the review probe, not by the spec; it has no test.
  • P3 · base · app/src/routes/umap/[id]/index.tsx:82 — "Delete Run" on a run deleted elsewhere shows "Failed to delete run". Pre-existing: read from the code, not run.

Stack: UMAP run page rereads, layer 2 of 2

This slice: The cards and the run itself follow each reread.
Why it is its own layer: #369 was already open for review, and these two faults predate it.
Full story: #369

🤖 Generated with Claude Code

byronwall and others added 2 commits November 28, 2026 22:00
Read the run through an accessor, so a reread reaches every card.
Refresh points now rereads the run too, so a deleted run shows as
missing. A failed run reread keeps the run on screen.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A run read that failed beside a good points read showed new points
with old groups.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@byronwall
byronwall added this pull request to stack #371 November 29, 2026 03:06
@byronwall byronwall changed the title claude/umap run stale state Fix stale groups and deleted runs on the UMAP run page Nov 29, 2026
@byronwall
byronwall marked this pull request as ready for review November 29, 2026 03:07
The action fails on a deleted run, and the page skipped the reread.
It now rereads, and alerts only when the run still exists.

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