Repository navigation
Fix Refresh points on the UMAP run page - #369
Merged
Merged
Conversation
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>
Owner
Author
|
Pre-merge review of #369 and #370 together ( Left open:
🤖 Generated with Claude Code |
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.
"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 firstawait.Because the points read now starts before the page knows the run exists,
fetchUmapPointsreturns an empty list for an unknown run instead of throwing "Run not found".Proof
The old code still shows 2 points after the click.
After: 2 points on load, 1 point after one is removed and the button is clicked.
A browser check on
pnpm devwith 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.tsfails on the old code at the expected1 points. It passes now, and it also checks that a failed refresh keeps the points.pnpm lintexits 0,pnpm type-checkpasses, andpnpm testgives 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
canvas-note-panel.spec.tsfails 2 of 4 cases on my machine, both on this branch and withmain'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.
🤖 Generated with Claude Code