chore(pages): remove the pages feature flag

Merged
SA
2mo ago
+122-423

Summary

  • Pages is GA, so the pages feature flag checks come out of desktop and web; pages are always on.
  • The web viewer's access check reduces to "signed in", and dropUnavailablePanes, which only existed to strip page panes when the flag was off, is deleted.

Why / Context

The PostHog flag has been at 100% with no conditions since 2026-09-07, so every gate on it is dead code.

How It Works

  • Desktop: removed useFeatureFlagEnabled(FEATURE_FLAGS.PAGES) from the sidebar, the pages routes, the workspace pages menu, the page pane registration, terminal/file/browser page-link handling and deep-link consumption. isPagesEnabled no longer gets passed through runUrlLinkAction / TerminalLinkActionDeps.
  • Web: getPagesAccess becomes a cached getSession. Signed in → full viewer; signed out → public view or PageUnavailable. That matches today's behaviour at 100%.
  • Shared: removed FEATURE_FLAGS.PAGES.

Manual QA Checklist

  • Desktop: sidebar Pages button opens /pages; /pages/<slug> renders
  • Desktop: workspace pages menu shows; page pane opens and restores after restart
  • Desktop: clicking a page URL in a terminal, a file and the in-app browser opens the page pane
  • Web: /page/<slug> signed in shows the full viewer; signed out shows the public view or a sign-in prompt

None of these have been run yet; typecheck and tests only so far.

Testing

  • bun run typecheck in apps/desktop (clean), tsc --noEmit in apps/web (clean)
  • bun test over the v2-workspace, OpenBrowserPageInAppButton and main/lib desktop suites: 1053 pass
  • biome check on changed files

Risks / Rollout

  • Don't delete the PostHog flag after merging. Desktop builds from before this change still evaluate it, and a deleted flag reads as off, which would hide Pages for them. Delete it once those builds have aged out. Web is safe as soon as it deploys.
  • Rollback: revert the PR. The flag is still at 100%, so nothing changes for users either way.

Summary by cubic

Removes the pages feature flag now that Pages is GA; the PostHog flag has been at 100% with no conditions since 2026-09-07, so every gate on it is dead code. Desktop and web now treat pages as always on, and the web viewer's access check reduces to signed in — signed-out users get the public view or PageUnavailable.

Rollout

  • Don't delete the PostHog flag after merging; pre-change desktop builds still evaluate it, and a deleted flag reads as off and would hide Pages for them. Delete it once those builds age out.

Summary by CodeRabbit

  • New Features
    • Pages are now available throughout the desktop app, including in the sidebar, workspace menus, and pane layouts. Page links open as pages without a feature-flag requirement.
    • Published pages now show a public view to visitors without a session when one is available; signed-in visitors continue to see the authenticated page.
  • Bug Fixes
    • Page metadata for visitors without a session now uses the sign-in title and description.