close
Skip to content

feat: step 1 update dev navbar, remove reports, alerts and other Cloud features#9359

Open
royendo wants to merge 9 commits intomainfrom
worktree-feat-preview-pr-1-update-dev-navbar
Open

feat: step 1 update dev navbar, remove reports, alerts and other Cloud features#9359
royendo wants to merge 9 commits intomainfrom
worktree-feat-preview-pr-1-update-dev-navbar

Conversation

@royendo
Copy link
Copy Markdown
Contributor

@royendo royendo commented May 1, 2026

Dev deployments should not show reports and alerts and any cloud features in dev cloud preview;
Screenshot 2026-05-01 at 11 52 01

Screenshot 2026-05-01 at 11 51 57
  • Reports,
  • Alerts,
  • Dashboard
    • Bookmarks
    • Creating Alerts
    • Home Bookmark
    • Share
  • Settings

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

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

royendo and others added 6 commits May 1, 2026 11:17
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>
@royendo royendo marked this pull request as ready for review May 1, 2026 15:55
@royendo royendo requested a review from a team as a code owner May 1, 2026 15:55
@royendo royendo changed the title feat: update dev navbar, remove reports, alerts and other Cloud features feat: step 1 update dev navbar, remove reports, alerts and other Cloud features May 1, 2026
@royendo royendo force-pushed the worktree-feat-preview-pr-1-update-dev-navbar branch 2 times, most recently from 8666a4d to 60cb49e Compare May 1, 2026 19:57
royendo and others added 3 commits May 1, 2026 16:04
…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>
Copy link
Copy Markdown
Contributor

@ericpgreen2 ericpgreen2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:19branchPrefix !== "" (any @branch in URL)
  • routes/[organization]/[project]/+layout.ts:22 and status/+layout.svelte:10 — truthy extractBranchFromPath(...) (any @branch in 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants