feat: branch deployment previews via @branch path segments#9011
Merged
ericpgreen2 merged 17 commits intomainfrom Apr 10, 2026
Merged
feat: branch deployment previews via @branch path segments#9011ericpgreen2 merged 17 commits intomainfrom
@branch path segments#9011ericpgreen2 merged 17 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.
- Migrate to Svelte 5 runes ($props, $derived, $state) - Extract cache manipulation into deployment-actions.ts - Replace 4 tracking Sets with single pendingId string - Replace deletedIds with optimistic cache removal - Consolidate delete dialog state into single nullable object - Fix CopyableCodeBlock on:click -> onclick (Svelte 5) - Fix parseInt missing radix, redundant isProdDeployment call - Fix status overview showing "main" instead of deployment branch - Fix polling gap: keep polling when only ProjectParser exists during startup - Show loading spinner instead of "no dashboards" during initial build
Replace the static yellow dot with a `LoadingCircleOutline` spinner for in-progress states (Pending, Updating, Stopping, Deleting) in both the Deployments table and overview card.
When a branch deployment's runtime is running but the project failed to load (e.g., git branch doesn't exist), the overview page was misleadingly showing "Ready" with stale data. Now: - Deployment card shows parser error in a Callout, replacing project-level rows (Last synced, OLAP, AI) that would be defaults - Infrastructure status stays truthful (separate from project health) - Resources/Tables/Errors sections hidden when project failed to load - Download Project button disabled instead of hidden - ErrorsSection no longer has a confusing parent click handler
…add deployment-utils tests
- Replace `TRANSIENT_STATUSES` Set with existing `isTransitoryStatus()` in `DeploymentsSection`
- Use semantic `border-border` instead of `border-gray-200` on data rows
- Use index fallback for `{#each}` key when `deployment.id` is undefined
- Add `deduplicateDeployments` unit tests
- Document web-admin vitest usage in CLAUDE.md
AdityaHegde
requested changes
Apr 6, 2026
Collaborator
AdityaHegde
left a comment
There was a problem hiding this comment.
Adding 1st round of comments.
…nts` Restructure branch-utils tests to use shared test data array per reviewer suggestion. Remove `deduplicateDeployments` since the backend guards against duplicates at creation time (a DB constraint follow-up is needed for race conditions).
fdb951a to
c2d0283
Compare
AdityaHegde
approved these changes
Apr 10, 2026
Collaborator
AdityaHegde
left a comment
There was a problem hiding this comment.
Apart from a couple nit this looks good. We can take the confirmation improvement separately based on requirement.
… branches alphabetically
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). Navigating between pages preserves the active branch, and stopped deployments show a "Start deployment" button with optimistic UI updates.Also adds a Deployments management page under Project Status with start/stop/delete actions, slot usage, and author info.
Closes APP-776
Implementation highlights:
reroutehook strips@branchbefore route matching, so existing routes work transparently/are encoded as~(which git disallows), making them safe for URL pathscreateSmartRefetchIntervalscopes polling to relevant resource types, preventing perpetual polling whenProjectParserstays RUNNING on branch deploymentsChecklist:
Developed in collaboration with Claude Code