Open
Conversation
Add <svelte:boundary> to the app layout to handle async pending/error states for remote function queries. Without this boundary, pages using $derived(await query()) would fail on full-page reload because there was nothing to catch the pending state during hydration. Fix lead deletion crash by using submit().updates() (single-flight mutation with no queries) instead of bare submit(). The default auto-invalidation was re-running getLeadData() for the just-deleted lead, causing a 404 error before goto() could navigate away. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add 12 new tests (263 total, 0 failures): - Layout boundary structural tests (5): verify svelte:boundary exists with pending and failed snippets, and that children render inside it. Prevents accidental removal of the boundary. - Lead detail page tests (7): verify page renders correctly, and critically test that deleteLead.enhance() calls submit().updates() (not bare submit()) to prevent auto-invalidation crash. Also tests navigation to /leads after delete and error handling on failure. Enhance createFormMock to capture enhance callbacks via _enhanceCallback property, and add issues() support to field proxy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ion tests Replace _enhanceCallback hack with DOM-based interactions and remove all as-any casts to satisfy @typescript-eslint/no-explicit-any. Make addFormApi generic to preserve Mock type through Object.assign. Improve layout structural guard tests with regex matchers and better comments.
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.
Add svelte:boundary to the app layout to handle async pending/error states for remote function queries. Without this boundary, pages using $derived(await query()) would fail on full-page reload because there was nothing to catch the pending state during hydration.
Fix lead deletion crash by using submit().updates() (single-flight mutation with no queries) instead of bare submit(). The default auto-invalidation was re-running getLeadData() for the just-deleted lead, causing a 404 error before goto() could navigate away.