From 3d27a1605e19b54cedeec7f54886b4248a42d8ca Mon Sep 17 00:00:00 2001 From: royendo <67675319+royendo@users.noreply.github.com> Date: Fri, 1 May 2026 11:17:58 -0400 Subject: [PATCH 1/9] feat: limit navbar on branch views 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 --- web-admin/src/features/projects/ProjectHeader.svelte | 7 ++++--- web-admin/src/features/projects/ProjectTabs.svelte | 8 +++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/web-admin/src/features/projects/ProjectHeader.svelte b/web-admin/src/features/projects/ProjectHeader.svelte index a04f968802a..783e685f931 100644 --- a/web-admin/src/features/projects/ProjectHeader.svelte +++ b/web-admin/src/features/projects/ProjectHeader.svelte @@ -77,6 +77,7 @@ $: onPublicURLPage = isPublicURLPage($page); $: activeBranch = extractBranchFromPath($page.url.pathname); + $: isBranchView = !!activeBranch && activeBranch !== primaryBranch; $: loggedIn = !!$user.data?.user; $: rillLogoHref = !loggedIn ? "https://www.rilldata.com" : "/"; @@ -214,7 +215,7 @@ {#if $cloudEditing && onProjectPage && projectPermissions.manageDev} {/if} - {#if onProjectPage && projectPermissions.manageProjectMembers} + {#if onProjectPage && projectPermissions.manageProjectMembers && !isBranchView} {/if} - {#if hasUserAccess} + {#if hasUserAccess && !isBranchView} {/if} - {#if hasUserAccess} + {#if hasUserAccess && !isBranchView} Date: Fri, 1 May 2026 11:27:50 -0400 Subject: [PATCH 2/9] feat: hide Branches status tab and always show Cluster Size 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 --- .../status/overview/DeploymentSection.svelte | 14 +------------- .../[project]/-/status/+layout.svelte | 2 +- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/web-admin/src/features/projects/status/overview/DeploymentSection.svelte b/web-admin/src/features/projects/status/overview/DeploymentSection.svelte index 2a19a002909..12bfdb755af 100644 --- a/web-admin/src/features/projects/status/overview/DeploymentSection.svelte +++ b/web-admin/src/features/projects/status/overview/DeploymentSection.svelte @@ -2,14 +2,8 @@ import { page } from "$app/stores"; import { createAdminServiceGetProject, - createAdminServiceGetBillingSubscription, V1DeploymentStatus, } from "@rilldata/web-admin/client"; - import { - isFreePlan, - isProPlan, - isTrialPlan, - } from "@rilldata/web-admin/features/billing/plans/utils"; import { extractBranchFromPath } from "@rilldata/web-admin/features/branches/branch-utils"; import { useDashboardsLastUpdated } from "@rilldata/web-admin/features/dashboards/listing/selectors"; import { useGithubLastSynced } from "@rilldata/web-admin/features/projects/selectors"; @@ -117,12 +111,6 @@ // Slots $: currentSlots = Number(projectData?.prodSlots) || 0; - - // Billing plan detection - $: subscriptionQuery = createAdminServiceGetBillingSubscription(organization); - $: planName = $subscriptionQuery?.data?.subscription?.plan?.name ?? ""; - $: showSlots = - isTrialPlan(planName) || isFreePlan(planName) || isProPlan(planName); @@ -159,7 +147,7 @@ - {#if !$subscriptionQuery?.isLoading && showSlots} + {#if currentSlots > 0}
Cluster Size diff --git a/web-admin/src/routes/[organization]/[project]/-/status/+layout.svelte b/web-admin/src/routes/[organization]/[project]/-/status/+layout.svelte index be33a56dc01..07a4d77adba 100644 --- a/web-admin/src/routes/[organization]/[project]/-/status/+layout.svelte +++ b/web-admin/src/routes/[organization]/[project]/-/status/+layout.svelte @@ -16,7 +16,7 @@ { label: "Branches", route: "/branches", - hasPermission: true, + hasPermission: false, }, { label: "Resources", From ad579d7f6498b759ce437ee024e529510513949d Mon Sep 17 00:00:00 2001 From: royendo <67675319+royendo@users.noreply.github.com> Date: Fri, 1 May 2026 11:28:45 -0400 Subject: [PATCH 3/9] feat: only hide Branches status tab on branch views 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 --- .../routes/[organization]/[project]/-/status/+layout.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web-admin/src/routes/[organization]/[project]/-/status/+layout.svelte b/web-admin/src/routes/[organization]/[project]/-/status/+layout.svelte index 07a4d77adba..92a59f57a0d 100644 --- a/web-admin/src/routes/[organization]/[project]/-/status/+layout.svelte +++ b/web-admin/src/routes/[organization]/[project]/-/status/+layout.svelte @@ -4,10 +4,12 @@ import { page } from "$app/stores"; import ContentContainer from "@rilldata/web-common/components/layout/ContentContainer.svelte"; import LeftNav from "@rilldata/web-admin/components/nav/LeftNav.svelte"; + import { extractBranchFromPath } from "@rilldata/web-admin/features/branches/branch-utils"; $: basePage = `/${$page.params.organization}/${$page.params.project}/-/status`; + $: isBranchView = !!extractBranchFromPath($page.url.pathname); - const navItems = [ + $: navItems = [ { label: "Overview", route: "", @@ -16,7 +18,7 @@ { label: "Branches", route: "/branches", - hasPermission: false, + hasPermission: !isBranchView, }, { label: "Resources", From 6cda11fee5e6fee60345da4f1171a60d07fe5ad7 Mon Sep 17 00:00:00 2001 From: royendo <67675319+royendo@users.noreply.github.com> Date: Fri, 1 May 2026 11:35:43 -0400 Subject: [PATCH 4/9] feat: redirect hidden sections to branch home on branch views 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 --- .../src/features/projects/ProjectTabs.svelte | 2 +- .../routes/[organization]/[project]/+layout.ts | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/web-admin/src/features/projects/ProjectTabs.svelte b/web-admin/src/features/projects/ProjectTabs.svelte index c3f87e27af7..a3e915f75df 100644 --- a/web-admin/src/features/projects/ProjectTabs.svelte +++ b/web-admin/src/features/projects/ProjectTabs.svelte @@ -52,7 +52,7 @@ { route: `/${organization}/${project}${branchPrefix}/-/status`, label: "Status", - hasPermission: projectPermissions.manageProject, + hasPermission: projectPermissions.manageProject && !isBranchView, }, { route: `/${organization}/${project}${branchPrefix}/-/settings`, diff --git a/web-admin/src/routes/[organization]/[project]/+layout.ts b/web-admin/src/routes/[organization]/[project]/+layout.ts index fddf4fc0aba..d888907c58f 100644 --- a/web-admin/src/routes/[organization]/[project]/+layout.ts +++ b/web-admin/src/routes/[organization]/[project]/+layout.ts @@ -1,17 +1,32 @@ import { type RpcStatus } from "@rilldata/web-admin/client"; import { hasBlockerIssues } from "@rilldata/web-admin/features/billing/selectors"; +import { + branchPathPrefix, + extractBranchFromPath, +} from "@rilldata/web-admin/features/branches/branch-utils"; import { fetchAllProjectsHibernating } from "@rilldata/web-admin/features/organizations/selectors"; import { error, redirect } from "@sveltejs/kit"; import { isAxiosError } from "axios"; import { maybeRedirectToEditableDeployment } from "@rilldata/web-admin/features/branches/deployment-utils.ts"; import { isEditPage } from "@rilldata/web-admin/features/navigation/nav-utils.ts"; +// Sections hidden on branch views; visiting them redirects to the branch home. +const BRANCH_HIDDEN_SECTIONS = /\/-\/(alerts|reports|status|settings)(\/|$)/; + export const load = async ({ params: { organization, project }, parent, route, url, }) => { + const activeBranch = extractBranchFromPath(url.pathname); + if (activeBranch && BRANCH_HIDDEN_SECTIONS.test(url.pathname)) { + throw redirect( + 307, + `/${organization}/${project}${branchPathPrefix(activeBranch)}`, + ); + } + const { organizationPermissions, issues } = await parent(); if (!organizationPermissions.manageOrg) return; From 4470427a820f2ed46df27debb4f3503b3310388d Mon Sep 17 00:00:00 2001 From: royendo <67675319+royendo@users.noreply.github.com> Date: Fri, 1 May 2026 11:43:18 -0400 Subject: [PATCH 5/9] feat: jump straight into edit mode from branch views 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 --- .../features/edit-session/EditButton.svelte | 28 ++++--------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/web-admin/src/features/edit-session/EditButton.svelte b/web-admin/src/features/edit-session/EditButton.svelte index 13364773ce6..b1afcdd4ca7 100644 --- a/web-admin/src/features/edit-session/EditButton.svelte +++ b/web-admin/src/features/edit-session/EditButton.svelte @@ -1,9 +1,5 @@ @@ -147,7 +159,7 @@
- {#if currentSlots > 0} + {#if !$subscriptionQuery?.isLoading && showSlots}
Cluster Size From 72086c5db19e7e950eb3e95ca3c53bd665f78fa0 Mon Sep 17 00:00:00 2001 From: Roy Endo <67675319+royendo@users.noreply.github.com> Date: Fri, 1 May 2026 16:07:14 -0400 Subject: [PATCH 8/9] Update ProjectTabs.svelte --- web-admin/src/features/projects/ProjectTabs.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web-admin/src/features/projects/ProjectTabs.svelte b/web-admin/src/features/projects/ProjectTabs.svelte index a3e915f75df..c3f87e27af7 100644 --- a/web-admin/src/features/projects/ProjectTabs.svelte +++ b/web-admin/src/features/projects/ProjectTabs.svelte @@ -52,7 +52,7 @@ { route: `/${organization}/${project}${branchPrefix}/-/status`, label: "Status", - hasPermission: projectPermissions.manageProject && !isBranchView, + hasPermission: projectPermissions.manageProject, }, { route: `/${organization}/${project}${branchPrefix}/-/settings`, From b6d3018cd10b267bf71e330d00bd0637afc68d71 Mon Sep 17 00:00:00 2001 From: Roy Endo <67675319+royendo@users.noreply.github.com> Date: Fri, 1 May 2026 16:07:52 -0400 Subject: [PATCH 9/9] Update +layout.ts --- web-admin/src/routes/[organization]/[project]/+layout.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web-admin/src/routes/[organization]/[project]/+layout.ts b/web-admin/src/routes/[organization]/[project]/+layout.ts index d888907c58f..3b7d29c9e27 100644 --- a/web-admin/src/routes/[organization]/[project]/+layout.ts +++ b/web-admin/src/routes/[organization]/[project]/+layout.ts @@ -11,7 +11,7 @@ import { maybeRedirectToEditableDeployment } from "@rilldata/web-admin/features/ import { isEditPage } from "@rilldata/web-admin/features/navigation/nav-utils.ts"; // Sections hidden on branch views; visiting them redirects to the branch home. -const BRANCH_HIDDEN_SECTIONS = /\/-\/(alerts|reports|status|settings)(\/|$)/; +const BRANCH_HIDDEN_SECTIONS = /\/-\/(alerts|reports|settings)(\/|$)/; export const load = async ({ params: { organization, project },