feat(web): add resizable split view between threads #48291
main fromrefs/pull/48291/head·opened View on GitHub- 1
tanstack-source added labelsfeature
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
- @@ -164,0 +193,21 @@193+ splitActive &&194+ focusedPaneKey !== null &&195+ visibleSplitPanes.some((ref) => scopedThreadKey(ref) === focusedPaneKey)196+ ? focusedPaneKey197+ : null;198+ const isPrimaryFocused = effectiveFocusedKey === null;199+200+ const primarySplitConfig: ChatViewSplitPaneConfig | undefined = splitActive201+ ? {202+ role: "primary",203+ focused: isPrimaryFocused,204+ isFirst: true,205+ isLast: false,206+ onFocus: () => focusPane(null),207+ }208+ : undefined;209+210+ const handleResizeDelta = (leftIndex: number, deltaPx: number) => {211+ const containerWidth = splitContainerRef.current?.getBoundingClientRect().width ?? 0;212+ if (containerWidth <= 0) return;213+ const current = normalizePaneRatios(useSplitViewStore.getState().ratios, totalPanes);
🟡 Medium
components/ThreadRouteView.tsx:213Resizing is discarded when the primary thread is also in the stored split list:
visibleSplitPanesfilters it out, so these handlers pass two ratios tosetRatios, which normalizes against the three stored slots and resets them to equal weights. Keep the stored pane inventory and displayed ratio indexing aligned when the primary is already stored.🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/ThreadRouteView.tsx around line 213: Resizing is discarded when the primary thread is also in the stored split list: `visibleSplitPanes` filters it out, so these handlers pass two ratios to `setRatios`, which normalizes against the three stored slots and resets them to equal weights. Keep the stored pane inventory and displayed ratio indexing aligned when the primary is already stored.@@ -237,8 +302,18 @@302+ <SidebarInset303+ className="h-svh min-h-0 overflow-hidden overscroll-y-none md:h-dvh"304+ inert={background}305+ >306+ <BackgroundThreadContext value={background}>307+ <HiddenThreadContext value={background}>{view}</HiddenThreadContext>308+ </BackgroundThreadContext>309+ {background ? null : redirect}310+ </SidebarInset>311+ );312+ }313+237314 return (238315 <SidebarInset239316 className="h-svh min-h-0 overflow-hidden overscroll-y-none md:h-dvh"240317 inert={background}241318 >242- <BackgroundThreadContext value={background}>243- <HiddenThreadContext value={background}>{view}</HiddenThreadContext>244- </BackgroundThreadContext>319+ <div🟡 Medium
components/ThreadRouteView.tsx:319Opening the first split pane or closing the last one resets the primary
ChatView, losing pending branch and environment-mode selections. The non-split branch places its context providers directly underSidebarInset, while the split branch adds the split-container and pane wrappers, so React remounts the subtree whensplitActivechanges (including at the mobile breakpoint). Keep the primary view in the same tree position in both layouts.🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/ThreadRouteView.tsx around line 319: Opening the first split pane or closing the last one resets the primary `ChatView`, losing pending branch and environment-mode selections. The non-split branch places its context providers directly under `SidebarInset`, while the split branch adds the split-container and pane wrappers, so React remounts the subtree when `splitActive` changes (including at the mobile breakpoint). Keep the primary view in the same tree position in both layouts.@@ -2806,3 +2815,4 @@28062815 AuthOrchestrationOperateScope,28072816 ),28082817 canTriage: threadTriagePermitted(threadRef.environmentId),2818+ splitView: isInSplitView ? "is-open" : isPrimaryRouteThread ? null : "can-open",🟡 Medium
components/Sidebar.tsx:2818On mobile,
splitViewis `🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/Sidebar.tsx around line 2818: On mobile, `splitView` is `@@ -0,0 +87,21 @@87+ ) : (88+ <T>Thread no longer available</T>89+ )}90+ </EmptyTitle>91+ <EmptyDescription>92+ {renderState === "unreachable" ? (93+ <T>This thread is on an environment this app is not connected to.</T>94+ ) : (95+ <T>This thread was archived or deleted.</T>96+ )}97+ </EmptyDescription>98+ </EmptyHeader>99+ <EmptyContent>100+ <Button size="sm" onClick={onClose}>101+ <T>Close pane</T>102+ </Button>103+ </EmptyContent>104+ </Empty>105+ </div>106+ );107+ } else if (renderState === "ready" || (renderState === "loading" && serverThreadShell !== null)) {🟡 Medium
components/SplitThreadPane.tsx:107A thread hidden by the tag filter remains visible in a secondary pane, including after reload, exposing content the user chose to hide. This branch mounts
ChatViewbased onrenderStatewithout checkinghiddenByTagFilteroroffShellBlocked; apply the primary route’s visibility checks before mounting it.🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/SplitThreadPane.tsx around line 107: A thread hidden by the tag filter remains visible in a secondary pane, including after reload, exposing content the user chose to hide. This branch mounts `ChatView` based on `renderState` without checking `hiddenByTagFilter` or `offShellBlocked`; apply the primary route’s visibility checks before mounting it.🟡 Medium
In split view with an inline right panel, the thread-details toggle disappears, so users cannot open thread details with the mouse without closing the panel.
showThreadPanelControlis false wheninlineRightPanelOwnsTitleBaris true, whilethreadPanelHeaderControlis suppressed for split views; enable the toggle in the split-view controls.🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/ChatView.tsx around line 3716: In split view with an inline right panel, the thread-details toggle disappears, so users cannot open thread details with the mouse without closing the panel. `showThreadPanelControl` is false when `inlineRightPanelOwnsTitleBar` is true, while `threadPanelHeaderControl` is suppressed for split views; enable the toggle in the split-view controls.@@ -6388,3 +6388,5 @@63886388 }63896389 ]63906390 ],6391+ "4c24d6d81b927c16": "Move to main pane",6392+ "a01f1fc1b433fa1c": "Close split pane",🟢 Low
translations/pt-BR.json:6391The secondary-pane buttons show and announce “Move to main pane” and “Close split pane” in English for pt-BR users. These catalog values are untranslated; replace them with Portuguese labels.
Suggested change6391- "4c24d6d81b927c16": "Move to main pane",6392- "a01f1fc1b433fa1c": "Close split pane",6391+ "4c24d6d81b927c16": "Mover para o painel principal",6392+ "a01f1fc1b433fa1c": "Fechar painel dividido",Also found in 20 other location(s)
apps/web/src/i18n/translations/de.json:6458The two new German catalog entries remain in English (
Move to main paneandClose split pane).ChatView.tsxuses these messages for split-pane controls, so German users get English tooltips/accessibility labels for the new actions. Translate both values into German.apps/web/src/i18n/translations/de.json:7810Several new entries in the German catalog remain in English:
Resize split panes,Thread no longer available,This thread was archived or deleted.,Close pane,Open in split view, andClose from split view.initializeI18n.tsloads this JSON for the selected locale, so German-language users see untranslated split-view controls and unavailable-thread messages. Translate these values into German.apps/web/src/i18n/translations/de.json:10211The ten new split-view entries in
de.jsonare English rather than German.SplitViewButton.tsxuses these messages for the menu, buttons, tooltips and accessible labels, so users selecting German see the entire new split-view interface in English. Translate these values while retaining thecountandmaxplaceholders.apps/web/src/i18n/translations/es.json:6384The two new Spanish catalog entries remain in English (
Move to main paneandClose split pane).ChatView.tsxuses these messages for the secondary pane buttons' tooltips and accessible labels, so Spanish-language users get untranslated controls. Translate both values (for example,Mover al panel principalandCerrar panel dividido).apps/web/src/i18n/translations/es.json:7750Several new Spanish catalog entries are still English:
Resize split panes,Thread no longer available,This thread was archived or deleted.,Close pane, and the split-view menu actions at lines 8345–8346.initializeI18n.tsloads this catalog for Spanish, andSplitThreadPane.tsxrenders these empty-state messages and the close button. Spanish-language users therefore see untranslated split-view controls and recovery instructions. Translate these values to Spanish.apps/web/src/i18n/translations/es.json:10100The ten new split-view entries (lines 10100–10109) contain English rather than Spanish.
initializeI18n.tsloads this catalog for the Spanish locale, andSplitViewButton.tsxuses these messages for its tooltip and accessible label, so Spanish users receive untranslated controls and instructions. Translate these entries while retaining their interpolation placeholders.apps/web/src/i18n/translations/fr.json:6432The two new split-pane messages are English in the French catalog.
ChatView.tsxuses them for both tooltips and accessible button labels, so French-language users see/hear “Move to main pane” and “Close split pane” instead of French instructions. Translate both values, for example “Déplacer vers le volet principal” and “Fermer le volet secondaire”.apps/web/src/i18n/translations/fr.json:7795The new French catalog entries contain untranslated English:
Resize split panes,Thread no longer available,This thread was archived or deleted.,Close pane, and the split-view menu actions at lines 8392–8393.initializeI18n.tsloads this catalog for French, andSplitThreadPane.tsxuses these messages for unavailable threads, so French users see English controls and explanations in the new split-view UI. Translate these entries into French.apps/web/src/i18n/translations/fr.json:10177The ten new split-view entries in
fr.jsonare English rather than French. With French selected, the locale loader imports this catalog, so the split-view controls, filtering instructions and tooltips remain in English while the surrounding UI is French. Translate these values, preserving thecountandmaxplaceholders.apps/web/src/i18n/translations/ja.json:6045The two new entries in the Japanese catalog are still English (
Move to main paneandClose split pane).ChatView.tsxuses these messages for both tooltips and accessible labels on the split-pane controls, so Japanese users receive untranslated instructions for both actions. Translate both values into Japanese.apps/web/src/i18n/translations/ja.json:9611The ten new split-view messages remain English in the Japanese catalog. With Japanese selected, the split-view button, filtering instructions, and close/equalize actions therefore appear in English instead of Japanese.
SplitViewButton.tsxuses these messages directly, anddocs/internals/14_i18n.mdconfirms English catalog seeds render as English and must be translated by hand. Translate these values while preserving thecount/maxplaceholders.apps/web/src/i18n/translations/ko.json:5935The two new split-pane labels in the Korean catalog are still English (
Move to main paneandClose split pane).ChatView.tsxuses these messages for both button tooltips and accessible labels, so Korean-language users get untranslated controls. Translate both entries into Korean.apps/web/src/i18n/translations/ko.json:7270The six new split-view messages are still English in the Korean catalog (including
Resize split panes,Thread no longer available, and the open/close actions).initializeI18n.tsloads this JSON for the selected locale, andSplitThreadPane.tsxandSplitPaneResizeHandle.tsxuse these messages directly, so Korean users receive untranslated split-view controls and unavailable-thread explanations. Translate these new values into Korean.apps/web/src/i18n/translations/ko.json:9495The ten new split-view messages in
ko.jsonare English rather than Korean. With Korean selected, the split-view button (including its accessible label inSplitViewButton.tsx), filter, controls and shortcut help remain English while the surrounding UI is Korean. Translate these values while preserving thecount/maxplaceholders.apps/web/src/i18n/translations/pl.json:11075The ten new split-view entries in
pl.jsonare still English, includingFilter threads to split…,Equalize widths, andClose split view.SplitViewButton.tsxrenders these messages directly, so Polish-language users get an untranslated split-view menu and accessibility labels amid the Polish UI. Translate these entries into Polish while preserving the interpolation placeholders.apps/web/src/i18n/translations/pl.json:7103The two new split-pane labels remain English in the Polish catalog (
Move to main paneandClose split pane).ChatView.tsxuses these messages for the buttons' tooltips and accessible labels, so Polish-language users receive untranslated controls. Translate both values into Polish.apps/web/src/i18n/translations/pl.json:8503The new split-view strings are English in the Polish catalog:
Resize split panes,Thread no longer available,This thread was archived or deleted.,Close pane, and both split-view menu actions.initializeI18n.tsloads this catalog for Polish, andthreadActionMenu.logic.tsresolves these menu labels, so Polish users get untranslated controls and error messages. Translate these entries into Polish.apps/web/src/i18n/translations/ru.json:7035The two new split-pane messages are English in the Russian catalog.
ChatView.tsxusesMove to main panefor both the button's accessible label and tooltip, so Russian-language users receive untranslated controls. Translate both values into Russian (for example, «Переместить в основную панель» and «Закрыть разделённую панель»).apps/web/src/i18n/translations/ru.json:8430The new split-view messages are English in the Russian catalog:
Resize split panes,Thread no longer available,This thread was archived or deleted.,Close pane, and both split-view menu actions (lines 9156–9157). These are used bySplitPaneResizeHandle,SplitThreadPane, andthreadActionMenu.logic.ts, so Russian users see untranslated controls and error messages. Translate these six values into Russian.apps/web/src/i18n/translations/sv.json:6328The two new Swedish catalog entries remain in English (
Move to main paneandClose split pane).ChatView.tsxuses these messages for the split-pane tooltips and accessible button labels, so Swedish users receive untranslated controls. Translate both values into Swedish.🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/i18n/translations/pt-BR.json around lines 6391-6392: The secondary-pane buttons show and announce “Move to main pane” and “Close split pane” in English for pt-BR users. These catalog values are untranslated; replace them with Portuguese labels. Also found in 20 other location(s): - apps/web/src/i18n/translations/de.json:6458 -- The two new German catalog entries remain in English (`Move to main pane` and `Close split pane`). `ChatView.tsx` uses these messages for split-pane controls, so German users get English tooltips/accessibility labels for the new actions. Translate both values into German. - apps/web/src/i18n/translations/de.json:7810 -- Several new entries in the German catalog remain in English: `Resize split panes`, `Thread no longer available`, `This thread was archived or deleted.`, `Close pane`, `Open in split view`, and `Close from split view`. `initializeI18n.ts` loads this JSON for the selected locale, so German-language users see untranslated split-view controls and unavailable-thread messages. Translate these values into German. - apps/web/src/i18n/translations/de.json:10211 -- The ten new split-view entries in `de.json` are English rather than German. `SplitViewButton.tsx` uses these messages for the menu, buttons, tooltips and accessible labels, so users selecting German see the entire new split-view interface in English. Translate these values while retaining the `count` and `max` placeholders. - apps/web/src/i18n/translations/es.json:6384 -- The two new Spanish catalog entries remain in English (`Move to main pane` and `Close split pane`). `ChatView.tsx` uses these messages for the secondary pane buttons' tooltips and accessible labels, so Spanish-language users get untranslated controls. Translate both values (for example, `Mover al panel principal` and `Cerrar panel dividido`). - apps/web/src/i18n/translations/es.json:7750 -- Several new Spanish catalog entries are still English: `Resize split panes`, `Thread no longer available`, `This thread was archived or deleted.`, `Close pane`, and the split-view menu actions at lines 8345–8346. `initializeI18n.ts` loads this catalog for Spanish, and `SplitThreadPane.tsx` renders these empty-state messages and the close button. Spanish-language users therefore see untranslated split-view controls and recovery instructions. Translate these values to Spanish. - apps/web/src/i18n/translations/es.json:10100 -- The ten new split-view entries (lines 10100–10109) contain English rather than Spanish. `initializeI18n.ts` loads this catalog for the Spanish locale, and `SplitViewButton.tsx` uses these messages for its tooltip and accessible label, so Spanish users receive untranslated controls and instructions. Translate these entries while retaining their interpolation placeholders. - apps/web/src/i18n/translations/fr.json:6432 -- The two new split-pane messages are English in the French catalog. `ChatView.tsx` uses them for both tooltips and accessible button labels, so French-language users see/hear “Move to main pane” and “Close split pane” instead of French instructions. Translate both values, for example “Déplacer vers le volet principal” and “Fermer le volet secondaire”. - apps/web/src/i18n/translations/fr.json:7795 -- The new French catalog entries contain untranslated English: `Resize split panes`, `Thread no longer available`, `This thread was archived or deleted.`, `Close pane`, and the split-view menu actions at lines 8392–8393. `initializeI18n.ts` loads this catalog for French, and `SplitThreadPane.tsx` uses these messages for unavailable threads, so French users see English controls and explanations in the new split-view UI. Translate these entries into French. - apps/web/src/i18n/translations/fr.json:10177 -- The ten new split-view entries in `fr.json` are English rather than French. With French selected, the locale loader imports this catalog, so the split-view controls, filtering instructions and tooltips remain in English while the surrounding UI is French. Translate these values, preserving the `count` and `max` placeholders. - apps/web/src/i18n/translations/ja.json:6045 -- The two new entries in the Japanese catalog are still English (`Move to main pane` and `Close split pane`). `ChatView.tsx` uses these messages for both tooltips and accessible labels on the split-pane controls, so Japanese users receive untranslated instructions for both actions. Translate both values into Japanese. - apps/web/src/i18n/translations/ja.json:9611 -- The ten new split-view messages remain English in the Japanese catalog. With Japanese selected, the split-view button, filtering instructions, and close/equalize actions therefore appear in English instead of Japanese. `SplitViewButton.tsx` uses these messages directly, and `docs/internals/14_i18n.md` confirms English catalog seeds render as English and must be translated by hand. Translate these values while preserving the `count`/`max` placeholders. - apps/web/src/i18n/translations/ko.json:5935 -- The two new split-pane labels in the Korean catalog are still English (`Move to main pane` and `Close split pane`). `ChatView.tsx` uses these messages for both button tooltips and accessible labels, so Korean-language users get untranslated controls. Translate both entries into Korean. - apps/web/src/i18n/translations/ko.json:7270 -- The six new split-view messages are still English in the Korean catalog (including `Resize split panes`, `Thread no longer available`, and the open/close actions). `initializeI18n.ts` loads this JSON for the selected locale, and `SplitThreadPane.tsx` and `SplitPaneResizeHandle.tsx` use these messages directly, so Korean users receive untranslated split-view controls and unavailable-thread explanations. Translate these new values into Korean. - apps/web/src/i18n/translations/ko.json:9495 -- The ten new split-view messages in `ko.json` are English rather than Korean. With Korean selected, the split-view button (including its accessible label in `SplitViewButton.tsx`), filter, controls and shortcut help remain English while the surrounding UI is Korean. Translate these values while preserving the `count`/`max` placeholders. - apps/web/src/i18n/translations/pl.json:11075 -- The ten new split-view entries in `pl.json` are still English, including `Filter threads to split…`, `Equalize widths`, and `Close split view`. `SplitViewButton.tsx` renders these messages directly, so Polish-language users get an untranslated split-view menu and accessibility labels amid the Polish UI. Translate these entries into Polish while preserving the interpolation placeholders. - apps/web/src/i18n/translations/pl.json:7103 -- The two new split-pane labels remain English in the Polish catalog (`Move to main pane` and `Close split pane`). `ChatView.tsx` uses these messages for the buttons' tooltips and accessible labels, so Polish-language users receive untranslated controls. Translate both values into Polish. - apps/web/src/i18n/translations/pl.json:8503 -- The new split-view strings are English in the Polish catalog: `Resize split panes`, `Thread no longer available`, `This thread was archived or deleted.`, `Close pane`, and both split-view menu actions. `initializeI18n.ts` loads this catalog for Polish, and `threadActionMenu.logic.ts` resolves these menu labels, so Polish users get untranslated controls and error messages. Translate these entries into Polish. - apps/web/src/i18n/translations/ru.json:7035 -- The two new split-pane messages are English in the Russian catalog. `ChatView.tsx` uses `Move to main pane` for both the button's accessible label and tooltip, so Russian-language users receive untranslated controls. Translate both values into Russian (for example, «Переместить в основную панель» and «Закрыть разделённую панель»). - apps/web/src/i18n/translations/ru.json:8430 -- The new split-view messages are English in the Russian catalog: `Resize split panes`, `Thread no longer available`, `This thread was archived or deleted.`, `Close pane`, and both split-view menu actions (lines 9156–9157). These are used by `SplitPaneResizeHandle`, `SplitThreadPane`, and `threadActionMenu.logic.ts`, so Russian users see untranslated controls and error messages. Translate these six values into Russian. - apps/web/src/i18n/translations/sv.json:6328 -- The two new Swedish catalog entries remain in English (`Move to main pane` and `Close split pane`). `ChatView.tsx` uses these messages for the split-pane tooltips and accessible button labels, so Swedish users receive untranslated controls. Translate both values into Swedish. Approvability#
Verdict: Would Approve
Macroscope's review found this PR approvable — Adds opt-in resizable thread panes with persistent widths, focus handling, and sidebar controls. The change is confined to client layout behavior; the reported correctness findings remain subject to the separate blocking gate.
Needs human approval because:
- 5 blocking correctness issues found at or above your repo's Minimum Blocking Severity
- 2
Pushed75f4af0
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed