Skip to content

feat(command-center): choose folder when opening a terminal#3275

Merged
MattPua merged 2 commits into
mainfrom
posthog-code/command-center-terminal-folder-picker
Jul 10, 2026
Merged

feat(command-center): choose folder when opening a terminal#3275
MattPua merged 2 commits into
mainfrom
posthog-code/command-center-terminal-folder-picker

Conversation

@MattPua

@MattPua MattPua commented Jul 8, 2026

Copy link
Copy Markdown
Member

Problem

When multiple folders are open, opening a terminal from the command center silently opens it in whichever folder was accessed most recently, with no way to choose.

Changes

CleanShot.2026-07-08.at.11.49.18.mp4
  • Opening a terminal from the command center's "Add task" popover now shows a folder picker when more than one folder is open.
  • With 0 or 1 folder, behaviour is unchanged (opens in the single / most-recent folder).
  • The chosen folder is persisted with the cell (survives reload) and shown in the terminal header badge.

How did you test this?

  • @posthog/core command-center unit tests (47 passed), including added round-trip tests for the terminal cell value encoding (id + optional cwd).
  • Typecheck clean on all touched files.

Automatic notifications

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

Created with PostHog Code

When multiple folders are open, opening a terminal from the command
center now prompts which folder to open it in. Falls back to the single
/ most-recent folder when there is only one.

Generated-By: PostHog Code
Task-Id: 196ab729-6bf1-4353-bf35-d21db2c9c190
@trunk-io

trunk-io Bot commented Jul 8, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 4441380.

@MattPua MattPua marked this pull request as ready for review July 8, 2026 15:49
Generated-By: PostHog Code
Task-Id: 196ab729-6bf1-4353-bf35-d21db2c9c190
@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "style: format setTerminalCell signature" | Re-trigger Greptile

{step === "folder" ? (
<Combobox.Content
items={folders}
getValue={(folder) => folder.name}

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.

P2 The folder picker filters only by folder.name, but each item displays folder.path as its description. A user who spots a path they want and tries to type a fragment of it will see "No matching folders" even though the folder is visible in the list. Matching both name and path would make the search behave consistently with what users see.

Suggested change
getValue={(folder) => folder.name}
getValue={(folder) => `${folder.name} ${folder.path}`}

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@MattPua MattPua requested a review from adamleithp July 9, 2026 17:11
@charlesvien charlesvien added the Stamphog This will request an autostamp by stamphog on small changes label 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 feature addition with correct URI-encoding for the colon-separator protocol and a test that validates the round-trip with a colon-containing path. The unresolved bot comment is a P2 UX suggestion (search filters by name but displays path), not a correctness or safety issue.

@MattPua MattPua merged commit aee1dac into main Jul 10, 2026
31 checks passed
@MattPua MattPua deleted the posthog-code/command-center-terminal-folder-picker branch July 10, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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