feat: step 1 update dev navbar, remove reports, alerts and other Cloud features#9359
feat: step 1 update dev navbar, remove reports, alerts and other Cloud features#9359
Conversation
Hide sharing, bookmarks, alerts, reports, and settings entries when viewing a non-primary branch. The branch view is intended as a preview surface, so cloud-only features that operate on production (sharing the project, creating alerts, managing settings, etc.) are gated off to keep the experience focused on previewing the branch. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Drop the plan-based gate on Cluster Size so it always renders when slots are reported, and hide the Branches sub-tab from the status page nav. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Show the Branches tab in production view; hide it only when viewing a non-primary branch (`/@branch/...`), where the section is not relevant. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Visiting `/-/alerts`, `/-/reports`, `/-/status`, or `/-/settings` on a branch view now redirects to the branch home, since these sections are hidden from the project nav on branch views. Also hides the Status tab on branch views for consistency. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Clicking Edit on a branch view now navigates directly to the branch's edit URL instead of opening the picker dialog. The dialog was the right flow on production view (pick or create a dev branch), but on a branch view the target is already known. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
8666a4d to
60cb49e
Compare
…tion` Reverts the `DeploymentSection.svelte` portion of c89f4f3; the `Cluster Size` row goes back to checking the user's billing plan via `createAdminServiceGetBillingSubscription` instead of `currentSlots > 0`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
ericpgreen2
left a comment
There was a problem hiding this comment.
Centralize "is this a branch preview" as a derived URL-state store, not per-component checks. Three different definitions are now in play:
ProjectHeader.svelte:80—!!activeBranch && activeBranch !== primaryBranch(production-aware)ProjectTabs.svelte:19—branchPrefix !== ""(any@branchin URL)routes/[organization]/[project]/+layout.ts:22andstatus/+layout.svelte:10— truthyextractBranchFromPath(...)(any@branchin URL)
In the common flow BranchSelector strips @branch for production, so they tend to agree. But a deeplink or bookmark to /<org>/<project>/@<primaryBranch>/-/alerts would hit the redirect (hiding alerts) while ProjectHeader renders production-mode chrome — a real user could land in an inconsistent state.
The cleanest resolution is a single derived store, e.g. isBranchPreview colocated with the rest of the branch utilities:
// web-admin/src/features/branches/branch-state.ts
export const isBranchPreview = derived(
[page, primaryBranchStore],
([$page, $primary]) => {
const active = extractBranchFromPath($page.url.pathname);
return !!active && active !== $primary;
},
);Components gate with !$isBranchPreview; the layout-level redirect uses the same underlying predicate. This places the concept where it belongs (URL state, not a deployment-capability feature flag), and the inconsistency above collapses into one definition. Worth doing here rather than as a follow-up — every additional call site added before the consolidation is one more thing to migrate.
Bundled scope: EditButton.svelte ownership-check removal. The PR title and description are about hiding cloud features on branch views, but this PR also drops the createAdminServiceGetCurrentUser lookup and the ownerUserId / editable / status filtering on activeBranchDeployment. Now any branch view direct-edits regardless of ownership, deferring to maybeRedirectToEditableDeployment to handle non-owners. This is a meaningful behavior change — either split it into a dedicated PR with its own description, or call it out explicitly here so reviewers know to evaluate it.
Follow-up worth filing separately: several adminServer call sites in web-common are using the flag as a proxy for distinct concepts that will diverge once Rill Developer in Cloud and branch previews both land — most notably chat/core/context/picker/data/index.ts:24 (isRillDev = !$adminServer) and DashboardStateDataLoader.ts:265 (empty-data error copy). Tightening adminServer to mean strictly "admin service is available" and migrating these sites to more accurate predicates is out of scope here, but worth queuing.
Developed in collaboration with Claude Code
Dev deployments should not show reports and alerts and any cloud features in dev cloud preview;

Status For Editors will be added in follow up PR
Status for Admins shows
Checklist: