feat: branch deployment selector with @branch path segments#9011
Draft
ericpgreen2 wants to merge 3 commits intomainfrom
Draft
feat: branch deployment selector with @branch path segments#9011ericpgreen2 wants to merge 3 commits intomainfrom
@branch path segments#9011ericpgreen2 wants to merge 3 commits intomainfrom
Conversation
Add a branch selector chip to the project header that lets admins switch between branch deployments directly in the cloud UI. Gated on `readDev` permission. - New `BranchSelector` component (chip + dropdown, modeled after `ViewAsUserChip`) - Read `?branch=X` query param in project layout, pass to `GetProject` API - Warning banner when viewing a non-production branch deployment - Branch param preserved across tab navigation via `branchSearchSuffix` - "Start deployment" button for stopped branch deployments - Deduplicates `ListDeployments` by branch; live status from `GetProject` - "View As" composes with branch context
Move `BranchSelector` from a standalone header chip into the avatar button dropdown as a submenu (like "View as"), reducing visual clutter when viewing branch deployments. Replace `ProjectAccessControls` wrapper in `AvatarButton` with a `projectPermissions` prop passed from `ProjectHeader`, eliminating a redundant `GetProject` query. Clean up branch-related props from `SlimProjectHeader` and `ProjectHeader`.
…ments Replace `?branch=X` query params with `@branch` path segments for branch deployment previews (e.g., `/org/project/@feature-x/explore/dashboard`). - Add `reroute` hook to strip `@branch` before route matching - Add `beforeNavigate` hook to inject `@branch` into branch-unaware links - Add `branch-utils.ts` with path manipulation helpers - Use `~` encoding for `/` in branch names (git disallows `~` in refs) - Branch menu items render as `<a>` tags for href preview on hover - Back/forward browser history works correctly (skip injection on popstate)
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.
Let project admins preview branch deployments in Rill Cloud via
@branchpath segments in the URL (e.g.,/org/project/@feature-x/explore/dashboard).readDev)Checklist:
Developed in collaboration with Claude Code