refactor: move fetchDeployment into Deployment component#3340
Merged
rossnelson merged 4 commits intomainfrom Apr 22, 2026
Merged
refactor: move fetchDeployment into Deployment component#3340rossnelson merged 4 commits intomainfrom
rossnelson merged 4 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
da311c8 to
0aa5438
Compare
The Deployment component now owns the fetch call via a $derived expression, so callers don't need to pass a deploymentPromise prop. loadDeploymentPage retains only the depends() registration for SvelteKit invalidation. This avoids the routeForApi timing issue where +page.ts runs before page.data.webUrl is populated by the parent layout.
3b97276 to
ab8af0a
Compare
deployment-page.ts was a thin wrapper just to call depends('data:deployment'),
which was never effective because deployment.svelte fetches its own data via
$derived rather than consuming load() data (fetchDeployment requires a
server-relative transport not available in cloud-ui's load layer).
Replace with:
- Inline depends() directly in +page.ts (and note it wires the invalidate
call in version-table-row, so keep it)
- Add a reloadCount $state in deployment.svelte so child actions can trigger
a same-page re-fetch without navigating away
- Add onVersionDeleted callback prop to VersionTableRow; call it instead of
invalidate('data:deployment') after a successful version delete
Nothing calls invalidate('data:deployment') anymore, so the load
function was entirely inert. Also tighten the comment in deployment.svelte.
Alex-Tideman
approved these changes
Apr 22, 2026
rossnelson
added a commit
that referenced
this pull request
Apr 22, 2026
Auto-generated version bump from 2.49.0 to 2.49.1 Bump type: patch Changes included: - [`fccd87f9`](fccd87f) Bump Go toolchain to 1.26.2 for CVE fix (#3336) - [`0361e3e9`](0361e3e) Add manual refresh of call stack (#3330) - [`17293020`](1729302) refactor: move fetchDeployment into Deployment component (#3340) Co-authored-by: rossnelson <146089+rossnelson@users.noreply.github.com>
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
Moves deployment data fetching into the
Deploymentcomponent rather than SvelteKit's load layer, and cleans up the related page infrastructure that was no longer doing anything useful.Why
fetchDeploymentrequires a server-relative base URL that isn't available at load time for package consumers. Running it inside the component ensures the transport is fully initialized before the call is made.Test plan