Skip to content

Keep new browser tabs in the current channel#3544

Open
jakesciotto wants to merge 1 commit into
mainfrom
posthog-code/new-tab-stays-in-current-channel
Open

Keep new browser tabs in the current channel#3544
jakesciotto wants to merge 1 commit into
mainfrom
posthog-code/new-tab-stays-in-current-channel

Conversation

@jakesciotto

Copy link
Copy Markdown

Problem

When working on a canvas inside a channel and opening a new tab (the "+" button or Cmd/Ctrl+T), the new tab jumped to the personal #me folder instead of staying in the channel currently in view. A new tab should be relative to the channel you're already working in.

Changes

landOnDefault in BrowserTabStrip.tsx now navigates to the current route's channelId when there is one, so a new tab opened from a channel canvas stays in that channel. It falls back to #me only when the user isn't in a channel, and to the Code new-task screen when channels are off.

How did you test this?

pnpm --filter @posthog/ui typecheck passes cleanly for the changed file. Not manually verified in the running app.

Automatic notifications

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

Created with PostHog from a Slack thread

A new tab opened while viewing a channel canvas now lands on that channel instead of jumping to the personal (#me) folder. landOnDefault now navigates to the current route's channelId when present, falling back to #me only when the user isn't in a channel.

Generated-By: PostHog Code
Task-Id: 314ad5e2-0f6c-4d71-90ff-c45396f2343c
@trunk-io

trunk-io Bot commented Jul 17, 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

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 0686155.

@jakesciotto jakesciotto self-assigned this Jul 17, 2026
@jakesciotto
jakesciotto marked this pull request as ready for review July 17, 2026 14:59
@jakesciotto
jakesciotto enabled auto-merge (squash) July 17, 2026 15:00
@greptile-apps

greptile-apps Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "Keep new browser tabs in the current cha..." | Re-trigger Greptile

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.

1 participant