feat(desktop): add a "Use Paradev anywhere" popover to the sidebar

Merged
AV
16d ago
+1122-112

Preview: Use Paradev anywhere: preview for PR #9587 (Paradev page, org only): the popover in Dark, Light and Monokai, the new-shell rail, and the screen each tile opens.

Summary

  • A devices button in the sidebar opens a Use Paradev anywhere popover with four tiles: Mobile, Cloud, CLI and Self-hosted. Each tile opens the place where you set up that surface.
  • Users can hide the button. Hide from sidebar in the popover removes it and shows a toast with Undo. The way back is a Use Paradev anywhere button switch in Settings → General.
  • Settings > Mobile no longer depends on the mobile-launch flag. That flag has been at 100% in production since the launch, but it is missing from dev PostHog projects, where the QR code page redirected to Account.
  • The Pro checklist's mobile step can complete again. Seeing the QR code now counts as trying it; #7697 removed the step's only trigger.

Why / Context

Paradev runs in more places than this window: a phone, cloud sandboxes, a terminal, and your own machines. Each one is set up in a different corner of Settings or the docs. The popover puts them in one place, next to the account menu.

How It Works

  • ParadevAnywhereButton (_dashboard/components/ParadevAnywhereButton/) renders the trigger and a Radix popover.
    • Legacy sidebar footer: the popover is anchored to the footer row through PopoverAnchor virtualRef. The anchor is rendered after the trigger, because the trigger also registers itself as the anchor on mount and the last registration wins.
    • New shell: the button sits at the foot of the rail and the popover opens to the right.
  • Tiles:
TileDestination
Mobile/settings/mobile (App Store QR code and Remote Access toggle)
Cloudcloud-workspaces flag on: the new-workspace composer with host cloud, the same as the sidebar Cloud "+". Flag known to be off: /settings/billing/plans. The flag is evaluated with the org's plan_tier, which is what limits it to Team and Ultra.
CLIresetDraft(), a prefilled prompt, then openNewSession(). The prompt asks the agent to run superset --help, superset schema and four read-only list commands, then suggest uses. Nothing runs until the user presses send.
Self-hostedgateFeature(REMOTE_ACCESS), then /settings/hosts
  • The tile illustrations are small vector mockups that use only theme tokens (card, muted, background, border), with --color-highlight as the accent. They follow Light, Dark and custom themes.
  • RailButton moves from NavigationRail/components up to _dashboard/components, because the popover's rail trigger now shares its classes.
  • New analytics events: paradev_anywhere_opened (variant) and paradev_anywhere_surface_clicked (surface).
  • Hiding sets showParadevAnywhereButton in the existing persisted settings store (the Dictation switch's store), so there is no new localStorage key. The switch sits in Settings → General, the page whose route is /settings/behavior, and settings search finds it. Hiding also sends paradev_anywhere_hidden.

Manual QA Checklist

Done in this branch's dev app over CDP with real clicks:

  • New shell: the button is at the rail foot and the popover opens to the right. Escape, ✕ and a tile click each close it. No console errors.
  • Legacy sidebar: the popover opens above the footer, aligned with the sidebar's left edge. Before the anchor-order fix it opened at the window's top-left.
  • Mobile opens Settings > Mobile with the QR code and the Remote Access toggle, with no flag override (dev PostHog has no mobile-launch).
  • Cloud with the flag on opens the composer with host Cloud and the machine-size picker. With the flag forced off it opens Billing > Plans.
  • CLI opens a "No project" session with the tour prompt. Clicking it twice still leaves one copy.
  • Self-hosted (Pro org) opens Settings > Hosts with "Set up a host over SSH".
  • Tiles checked in the Light, Dark and Monokai themes.
  • Hide from sidebar removes the button and shows "Hidden from the sidebar" with Undo. Undo brings it back.
  • With the button hidden, the Settings → General switch is off. Turning it on brings the button back.
  • Self-hosted on a non-Pro org shows the Remote Access paywall. Not tested: the dev org is on Pro.
  • Billing > Plans with real Team and Ultra plans. Dev billing only lists Free and Enterprise.

Testing

  • bun run typecheck (apps/desktop), tsc --noEmit (packages/shared)
  • bunx biome check on the changed files
  • bun test for the settings, GettingStartedCard, useOpenNewWorkspace and NavigationRail suites: 115 pass. The new Mobile route test fails on the old route.
  • bun run check:i18n: 7 new strings, translated in all 17 locales
  • packages/i18n tests (hardcoded strings, catalog integrity, display-only): 85 pass

Design Decisions

  • Remove the flag check instead of adding a dev-only bypass: mobile-launch is at 100% with no targeting conditions, so the check only hid the page in dev and when flags failed to load.
  • The CLI tile resets the draft: this follows the other prompt seeders (setup-script card, Linear and GitHub issue actions). Appending to an unrelated draft would mix the read-only tour into a project workspace.

Known Limitations

  • No unit tests for the tile routing or the CLI prompt. The manual QA above covers them.
  • Opening Cloud saves cloud as the composer's remembered host, as the sidebar Cloud "+" already does.
  • The code no longer reads the PostHog mobile-launch flag, so it can be retired separately.

Summary by cubic

Adds a "Use Paradev anywhere" popover to the sidebar that puts the four places Paradev runs — Mobile, Cloud, CLI, and Self-hosted — next to the account menu, each opening its setup surface.

  • Settings > Mobile no longer depends on the mobile-launch flag (100% on in production for months); the check only hid the page in dev, and the constant has been removed.
  • The Pro checklist's mobile step now completes when a Pro user sees the QR code on Settings > Mobile, restoring a trigger removed by #7697.
  • The CLI tile resets the workspace draft and opens a new session prefilled with a read-only tour prompt; nothing runs until the user sends it.
  • Adds paradev_anywhere_opened and paradev_anywhere_surface_clicked analytics events.

New Features

  • The popover can be hidden: a "Hide from sidebar" link removes the button from the sidebar and rail with an Undo toast, and a searchable "Use Paradev anywhere button" switch in Settings > General restores it. The preference persists in the existing settings store.

Summary by CodeRabbit

  • New Features
    • Added a “Paradev Anywhere” menu in the dashboard sidebar, with options for Mobile, Cloud, CLI, and Self-hosted experiences.
    • Added a guided CLI introduction and localized the new interface text across supported languages.
    • Added a Behavior setting to show or hide the sidebar menu, with an Undo option after hiding it.
  • Improvements
    • Mobile settings and getting-started steps no longer depend on the previous launch-flag checks.
    • Visiting mobile settings can mark the mobile setup step as tried.