[PR #4453] [CLOSED] [GUI] Reserve the preview column only when there is something in it #5055

Closed
opened 2026-11-07 16:32:20 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4453
Author: @xvcezrqpbxtpzblrt
Created: 10/28/2026
Status: ❌ Closed

Base: main ← Head: gui/preview-pane-027


📝 Commits (1)

  • 28b62cd [GUI] Reserve the preview column only when there is something in it

📊 Changes

1 file changed (+23 additions, -5 deletions)

View changed files

📝 apps/host/src/screens/Chat.tsx (+23 -5)

📄 Description

## Problem

A preview column could stay reserved with nothing in it. The split's width came from selectedPreview alone, while the panel renders nothing when that id matches no artifact, run or plan (an artifact removed from the session, a plan that was rejected, a Time-skip run whose files are gone). The result: a blank 627px column on the right, and the conversation squeezed into the remaining 545px.

Measured in the installed app (1440x920 window, the chat from the screenshot): .chatsplit had grid-template-columns: minmax(0,1fr) 627px and data-preview="true", elementFromPoint(1100, 400) returned the split itself (nothing painted there), and .chat__inner was 535px wide.

Result

  • The column is reserved only when the panel has something to render: the selected Time-skip run, the plan, or an artifact the chat knows about (from its messages or the open previews).
  • A selection whose artifact, run or plan is gone is cleared once the chat's own artifacts are known, so the toolbar does not point at a tab that is not there.

Validation

  • Same chat, same stored selection, new build, window 2560x1369: data-preview is absent, splitStyle is null, .chat__inner is 920px wide, centered (681px each side), and the assistant paragraph sits at its 56ch measure inside it.
  • npm run typecheck → clean; node --test tests/ui4-fixes.test.mjs tests/card-labels.test.mjs tests/context-ui.test.mjs → 15 pass, 0 fail.
  • Full host suite: 1,292 tests, 1,182 pass, 2 fail (the known Windows symlink EPERM cases), 108 skipped.

Limits

  • A chat whose selection is restored from storage shows the pane only after its messages are known (one render); before this change the empty column appeared at once, so the pane now appears a frame later when it has content.
  • Not tested: a Time-skip run deleted while its panel is open, and the expanded (full-screen) preview state.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4453 **Author:** [@xvcezrqpbxtpzblrt](https://github.com/xvcezrqpbxtpzblrt) **Created:** 10/28/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `gui/preview-pane-027` --- ### 📝 Commits (1) - [`28b62cd`](https://github.com/Niko1221/Strata/commit/28b62cd535ce6d6a21a40c4fc387e77584a8f051) [GUI] Reserve the preview column only when there is something in it ### 📊 Changes **1 file changed** (+23 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `apps/host/src/screens/Chat.tsx` (+23 -5) </details> ### 📄 Description ## Problem A preview column could stay reserved with nothing in it. The split's width came from `selectedPreview` alone, while the panel renders nothing when that id matches no artifact, run or plan (an artifact removed from the session, a plan that was rejected, a Time-skip run whose files are gone). The result: a blank 627px column on the right, and the conversation squeezed into the remaining 545px. Measured in the installed app (1440x920 window, the chat from the screenshot): `.chatsplit` had `grid-template-columns: minmax(0,1fr) 627px` and `data-preview="true"`, `elementFromPoint(1100, 400)` returned the split itself (nothing painted there), and `.chat__inner` was 535px wide. ## Result - The column is reserved only when the panel has something to render: the selected Time-skip run, the plan, or an artifact the chat knows about (from its messages or the open previews). - A selection whose artifact, run or plan is gone is cleared once the chat's own artifacts are known, so the toolbar does not point at a tab that is not there. ## Validation - Same chat, same stored selection, new build, window 2560x1369: `data-preview` is absent, `splitStyle` is null, `.chat__inner` is 920px wide, centered (681px each side), and the assistant paragraph sits at its 56ch measure inside it. - `npm run typecheck` → clean; `node --test tests/ui4-fixes.test.mjs tests/card-labels.test.mjs tests/context-ui.test.mjs` → 15 pass, 0 fail. - Full host suite: 1,292 tests, 1,182 pass, 2 fail (the known Windows symlink `EPERM` cases), 108 skipped. ## Limits - A chat whose selection is restored from storage shows the pane only after its messages are known (one render); before this change the empty column appeared at once, so the pane now appears a frame later when it has content. - Not tested: a Time-skip run deleted while its panel is open, and the expanded (full-screen) preview state. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:32:20 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#5055
No description provided.