feat: branch deployment previews via @branch path segments#9011
Draft
ericpgreen2 wants to merge 9 commits intomainfrom
Draft
feat: branch deployment previews via @branch path segments#9011ericpgreen2 wants to merge 9 commits intomainfrom
@branch path segments#9011ericpgreen2 wants to merge 9 commits intomainfrom
Conversation
@branch path segments@branch path segments
6543e45 to
cb6a7cf
Compare
… utilities - Migrate `+layout.svelte` from Svelte 4 to Svelte 5 runes (`$derived`, `$effect`, `$props`) - Extract `baseGetProjectQueryOptions` polling config to `project-query-options.ts` - Extract `resolveRuntimeConnection` to `project-runtime.ts` with unit tests - Remove duplicate mock query chain from `ProjectHeader` (layout already passes mock-aware permissions) - Add section comments and component-level doc block to layout
- Delete `invalidations.ts` (dead code, zero consumers) - Delete `ResourceError.svelte` (dead code, shadowed by `web-common` version) - Move `constants.ts` to `user-management/constants.ts` (closer to its only consumer)
724c618 to
d13e3bf
Compare
d13e3bf to
8eddf35
Compare
Replace three positional mock params (userId, credentials, permissions) with a single `mockUser` object. The caller constructs it or passes undefined, so the "all or nothing" relationship is enforced by the type system rather than a runtime check.
8eddf35 to
2b26c7a
Compare
8 tasks
Remove `pageData`, `pathname`, and `projectError` — pure aliases that add indirection without simplifying anything. Use `page.data`, `page.url.pathname`, and `$projectQuery.error` directly.
Branch deployment UI: - Add BranchSelector component in project header breadcrumbs - Extract branch from URL's @Branch path segment via `extractBranchFromPath` - Inject active branch into intra-project navigations via `handleBranchNavigation` - Pass branch param to GetProject and GetDeploymentCredentials queries - Add BranchDeploymentStopped component for stopped/stopping states - Keep BranchSelector's ListDeployments query in sync on status transitions - Poll during STOPPING status Deployments page: - Add Deployments management page under Status tab - Add `createSmartRefetchInterval` for filtered resource polling - Add branch deployment hint to Deployments page - Extract shared deployment utilities to `deployment-utils.ts`
2b26c7a to
081ddb4
Compare
When the user selects a branch in the dropdown, seed the GetProject query cache with the deployment data already available from ListDeployments. This lets the layout's RuntimeProvider re-key immediately instead of waiting for the network round-trip.
…oject cache" This reverts commit ad43959.
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.
Adds the ability for project admins to preview branch deployments in Rill Cloud. Branches are addressed via
@branchpath segments in the URL (e.g.,/acme/analytics/@eric~revenue-metrics/explore/dashboard).Also adds a Deployments management page under Project Status.
Closes APP-776
Depends on #9140
User-facing changes:
Implementation:
reroutehook strips@branchbefore route matching, so existing routes work transparently/are encoded as~(which git disallows), making them safe for URL pathscreateSmartRefetchIntervalscopesListResourcespolling to relevant resource types, preventing perpetual polling whenProjectParserstays RUNNING on branch deploymentsdeployment-utils.tswithinvalidateDeployments()andisActiveDeployment()used by bothBranchDeploymentStoppedandDeploymentsSectionTest coverage:
branch-utils.tsrefetch-interval-store.tsChecklist:
Developed in collaboration with Claude Code