Repository navigation
Show shared notes at once in both starters - #470
Merged
Merged
Conversation
The SvelteKit starter reads and saves notes with remote functions; the TanStack Start starter keeps them in TanStack Query. A shared note appears immediately, is marked until the server confirms it and returns to the form with a toast if saving fails. The save response carries the updated list, and the note keeps showing the local photo until the uploaded copy has loaded. Photos larger than 1600 pixels are reduced to JPEG in the browser before upload. Both starters get an app icon, which the CLI package now includes, and the title no longer comes from an APP_NAME variable.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | af0bacd | Nov 28 2026, 04:46 PM |
tnkuehne
added a commit
that referenced
this pull request
Nov 28, 2026
## Summary Since #470 the SvelteKit starter saves notes with a remote form (`createNote` in `notes.remote.ts`) instead of a page action. The runtime deployment test still posted the note as a form to `/`, which now returns 405, so `main-checks / rust-runtime` fails on `main` from e073296 onward. The test now reads the form's ID from the page's `action="?/remote=…"`, posts the note and photo to `/_app/remote/<id>` with the field names the form renders (`message/<id>`, `photo/<id>`), and checks that the result has no validation issues. The existing checks that the page shows the note and serves the photo byte for byte stay unchanged. ## Testing - Built the SvelteKit starter and ran it with `wrangler dev` and local D1/R2: `POST /` returns 405 (the CI failure); the new request returns `{"type":"result"}` with the note ID, the page then lists the note, and the stored photo is identical to the upload. An empty message returns a result with `issues`. - `oxfmt --check`, `oxlint --type-aware --deny-warnings` and `svelte-check` for the changed file. - The runtime suite itself runs in CI.
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.
Summary
Both starters now show a shared note immediately instead of waiting for the server.
src/lib/notes.remote.ts):getNotesis rendered on the server,createNoteadds the note throughwithOverride, andrequested(getNotes, 1)returns the updated list with the same response.vite.config.tsenablesexperimental.remoteFunctionsand Svelte'sexperimental.async, as the control plane does.@tanstack/react-query5.107.1 with@tanstack/react-router-ssr-query1.167.3).src/router.tsxcreates one query client per router, the route loader fills it during server rendering, and the mutation adds the note inonMutate.saveNotereturns the updated list.static/favicon.svg,public/favicon.svg);tools/package-cli.tsnow copies these folders into the CLI package. The title no longer comes from anAPP_NAMEvariable.Screenshots
The page at rest is unchanged; the difference is what happens when a note is shared. TanStack Start is shown with a delayed and then an aborted save; SvelteKit behaves the same way. (Before this change, SvelteKit submitted the form natively and reloaded the page.)
Testing
pnpm check(root and both starters).RUN_CAPTURE_TESTS=1 pnpm exec vitest run apps/control-plane/tests/runtime/error-capture.test.ts apps/control-plane/tests/runtime/tanstack-start.test.ts.apps/control-plane/tests/local/quickstart.test.tsis updated for the new flow but was not run; it needs the full local stack.