Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

feat(browser): spin up browser cells from the command center - #3182

Merged
MattPua merged 2 commits into
posthog-code/browser-tabfrom
posthog-code/browser-command-center
Jul 17, 2026
Merged

feat(browser): spin up browser cells from the command center#3182
MattPua merged 2 commits into
posthog-code/browser-tabfrom
posthog-code/browser-command-center

Conversation

@MattPua

@MattPua MattPua commented Jul 6, 2026

Copy link
Copy Markdown
Member

Problem

Stacked on #3181. The command center can spin up tasks and terminals in grid cells, but not the new browser — you should be able to drop a browser next to a running task the same way.

Changes

CleanShot.2026-07-06.at.13.14.47.mp4
  • Browser option in the empty-cell picker, next to Terminal and Brainrot (same posthog-code-browser-tab flag)
  • Cells encode as __browser__:<url> (mirrors __terminal__:<id>) so the page restores on app reload
  • BrowserCell reuses BrowserPanel from feat(browser): in-app browser tab with webview security hardening #3181; header shows the page title, falling back to the url hostname
  • updateBrowserCellUrl is guarded so a stale debounced navigation callback can't clobber a cell that was reassigned

No new security surface: the webview and all main-process guards are the ones shipped in #3181.

How did you test this?

  • Grid helper round-trip tests (incl. urls containing the prefix delimiter, empty-string cells)
  • command-center + browser suites pass (125 tests), typecheck + biome clean

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 65282d9.

@greptile-apps

greptile-apps Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "feat(browser): spin up browser cells fro..." | Re-trigger Greptile

Comment thread packages/ui/src/features/command-center/components/TaskSelector.tsx Outdated
@MattPua
MattPua force-pushed the posthog-code/browser-tab branch from b4db740 to 7ca9a4e Compare July 6, 2026 15:01
@MattPua
MattPua force-pushed the posthog-code/browser-command-center branch 6 times, most recently from 9ff83d8 to eba66a5 Compare July 6, 2026 17:10
@MattPua
MattPua force-pushed the posthog-code/browser-tab branch from 82f4907 to deae0e5 Compare July 6, 2026 17:10
@MattPua
MattPua force-pushed the posthog-code/browser-command-center branch from dff59a3 to af47528 Compare July 6, 2026 20:35
@MattPua
MattPua marked this pull request as ready for review July 6, 2026 20:36

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This review was skipped because it would exceed your organization's monthly flex usage limit. Raise the limit in billing settings or wait until the next billing period resets limits.

@charlesvien charlesvien added the Stamphog This will request an autostamp by stamphog on small changes label Jul 10, 2026
github-actions[bot]
github-actions Bot previously approved these changes Jul 10, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clean additive feature: browser cell type wired up alongside the existing terminal/task/brainrot cells using the same prefix-encoding pattern. Core logic stays in @posthog/core, UI in @posthog/ui, store actions are correctly guarded, and the one resolved inline bot comment was a minor useCallback style concern with no correctness impact on native buttons.

MattPua added 2 commits July 17, 2026 12:57
- Browser option in the command center empty-cell picker, next to
  Terminal and Brainrot (same feature flag as the browser tab)
- Cells persist as __browser__:<url> and restore their page on reload
- Cell header shows page title, falling back to the url hostname
- Guarded url persist so stale navigation callbacks can't clobber a
  replaced cell

Generated-By: PostHog Code
Task-Id: e40b2af6-d887-4ee5-8b0e-46ea3e1f0b7d
BrowserCell copied TerminalCell's frame verbatim (header icon + title +
remove button, body wrapper). Extract CellFrame so each cell keeps only
its distinctive parts.

Generated-By: PostHog Code
Task-Id: e40b2af6-d887-4ee5-8b0e-46ea3e1f0b7d
@MattPua
MattPua force-pushed the posthog-code/browser-command-center branch from af47528 to 65282d9 Compare July 17, 2026 16:57
@github-actions
github-actions Bot dismissed their stale review July 17, 2026 16:58

New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clean additive feature following the established prefix-encoding pattern for cell types. Core logic stays in @posthog/core, UI in @posthog/ui, store guards are correct (bounds check in setBrowserCell, type guard in updateBrowserCellUrl), the null vs falsy distinction for empty-string URLs is handled properly, and the tests cover the tricky delimiter-in-URL edge case.

@MattPua
MattPua merged commit 78d5d91 into posthog-code/browser-tab Jul 17, 2026
27 checks passed
@MattPua
MattPua deleted the posthog-code/browser-command-center branch July 17, 2026 19:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants