GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(web): switching chat tabs keeps the right panel open by adampeterhiggins · Pull Request #82 · adampeterhiggins/t3code

Conversation

@adampeterhiggins

@adampeterhiggins adampeterhiggins commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Problem

Right-panel state is stored per thread, and every chat tab is its own thread. So with the right panel open, switching to a sibling tab showed that tab's panel state, which is usually closed. From the user's side, the panel just shut.

Fix

Whether the panel is open now carries across tabs in the same group. What's in it stays per tab: the tab you land on shows its own panel surfaces, or the panel's empty state if it has none.

  • useRightPanelFollowsTabSwitch (called from ChatView) remembers the tab group that was last on screen. When the next thread is a sibling in that group, it opens or closes that thread's panel to match. It runs in a layout effect, so the panel doesn't flicker shut before reopening. This one hook covers every way of switching tabs: the breadcrumb menu, sidebar tab rows, the group row going back to the last tab, and closing a tab so you land on its neighbour.
  • createTab and forkThreadTab carry the visibility over explicitly, because a brand-new tab isn't in the group list that was loaded before it existed.
  • useThreadTabGroup now starts from the last group it loaded. Leaving a thread that began as a draft remounts ChatView, and without this the group started empty, so the switch went unnoticed. The hook already ignores a group that doesn't contain the current thread. As a bonus, the tab breadcrumb no longer blinks on that remount.

Visibility carries in both directions, so a closed panel also stays closed when you switch to a tab whose panel was left open. That keeps the layout steady as you move between tabs.

Surfaces: web and desktop (desktop wraps web). Mobile has no right panel. Nothing depends on the provider or goes over the wire. docs/fork-differences.md has a line on this under Chat tabs.

Tested with vp test run apps/web/src/components/chat/ThreadTabs.test.tsx (new), plus web typecheck and lint on the changed files. Not checked in a real client.

Done by Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@adampeterhiggins @claude
fix(web): switching chat tabs keeps the right panel open
f3137a9
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@adampeterhiggins
adampeterhiggins merged commit a2150fb into main Sep 30, 2026
@adampeterhiggins adampeterhiggins mentioned this pull request Oct 27, 2026
merge upstream/main into fork #502
Merged
@adampeterhiggins adampeterhiggins mentioned this pull request Nov 7, 2026
chore: sync upstream through 202d5b5616 #560
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@adampeterhiggins
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.