Repository navigation
Show the Canvas leave guards above the note panel - #372
Merged
Merged
Conversation
The discard and saving dialogs in canvas.tsx were always mounted, so the note panel's portal landed over them and hid "Discard changes". Mount them on demand, as DocumentSidePanel does for its own guard. Update canvas-note-panel.spec.ts for the non-modal panel, autosave, and the saveDocContent action. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Without a page route, request.postData() was null for server-action requests, so the check could not fail. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Owner
Author
|
Review (code-review, medium): no blocking findings. Left as is:
|
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.
On Canvas, the "Discard unsaved changes?" and "Note is saving" dialogs now show above the open note. The two Canvas panel browser tests that timed out now pass.
Before: The note panel covered the right side of the dialog, including most of Discard changes.
After: The whole dialog is on top, and both buttons work.
Cause
canvas.tsxkept both dialogs mounted from page load, so the note panel opened over them. They now mount only when shown, as the panel's own guard already does.The tests were also out of date, which hid this:
fe83ffd9made it non-modal on purpose, so the click reached the sidebar's People link. They now try to leave by opening another note from search.updateDoc. The editor now saves withsaveDocContent.request.postData()isnullwithout a page route. With autosave let through, it counted 0 saves without a route and 1 with one.Proof
Same step in the spec at 1280×720: type, then open another note from search.
The "before" image has the updated spec and the old
canvas.tsx. The spec clicks Discard changes, so it fails if the panel covers the dialog again.playwright test canvas-note-panel --repeat-each=3 --workers=1against the audit harness (pnpm dev):pnpm lintexits 0,pnpm type-checkpasses,pnpm test: 925 passed, 86 skipped.Limits
The path editor test that also timed out is fixed in #373.
🤖 Generated with Claude Code