Skip to content

fix(workspace): keep the chat column centred around the summary - #734

Merged
nixuuu merged 1 commit into
devfrom
fix/workspace-summary-placement
Nov 14, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/workspace-summary-placement

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 14, 2026

Copy link
Copy Markdown
Member

Change

User feedback on #710: the summary card pushed the chat column around.

  • With the sidebar open, the column was shifted until it touched the card.
  • At narrower widths, opening the card moved and resized the column.
  • Below the lane threshold, the card covered message text with the composer misaligned under it.

The cause was the chat-column lane from #710. It shifted the column whenever the card could fit and left-aligned it when it could not. That lane is removed:

  • The chat column never moves or resizes for the summary. It is centred in the thread area with its own max width again (mx-auto max-w-(--chat-width) in VirtualFeed), as when the summary is collapsed. Messages and composer always share one column width and alignment. The sidebar and Files panel only change the area width.
  • The card only takes free space. SummaryLayout.docked is true when the right gutter beside the centred column holds the 20 rem card plus its 1 rem inset and a 1 rem gap. Then the device-wide choice (threadPanelCollapsed) decides between the card and the pill.
  • Elsewhere the summary is always the pill, whatever the stored choice. The pill opens the card as a popover anchored under it:
    • a stronger shadow in light and a lighter surface in dark, with scroll inside;
    • it closes on Escape (focus returns to the pill), Close thread details, a click outside (focus stays on the clicked target), a thread change or a layout change;
    • it never changes the stored choice, so text is never left covered.
  • Below 32 rem the pill still opens a sheet.
  • The effective state depends only on the stored choice and the available space, so switching threads or resizing never jumps.
  • Motion is unchanged: t-summary grows the card from the pill's corner (--duration-fast) and shrinks it back (--duration-quick), with no layout shift. Reduced motion is instant.

docs/workspace.md (Polish) describes the dock, popover and sheet rules and the always-centred column. Mobile does not use this layout, so it is unaffected.

Fixes: #710

Verification

  • bun install, full typecheck, lint, format:check and the web production build pass (with nice, temp in /var/tmp).
  • Review host, light and dark, bench stack. The seed had a long Polish title, a long branch (feature/sso-gakko-security-review-with-a-very-long-branch-name), PR #412 with checks, 19 subagents and 2 schedules. For widths 1100, 1280, 1440, 1600 and 1920, with the sidebar open and closed and Files open and closed (20 layouts per theme), a script measured the message column, the composer and the card before and after toggling:
    • Column fixed: in all 40 runs the message column and composer keep the same x and width when the card opens or closes, and their x and width always match each other.
    • Docked: the card docks only at 1600 (sidebar closed) and 1920 (except sidebar open with Files open). It always sits right of the column with a visible gap; at 1920 with the sidebar closed the column ends at x 1357 and the card starts at x 1584.
    • Popover: everywhere else the pill shows, and the popover opens under it and closes on an outside click.
    • Escape closes the popover and returns focus to the pill. Switching threads closes it.
  • Screenshots, described:
    • 1440 light, sidebar and Files open: the pill sits top-right and the column is centred. The popover opens under the pill with a clear shadow over the right part of the messages and ends just above the composer.
    • 1100 dark: the same popover uses a lighter surface than the canvas, so it reads as raised.
    • 1920 light, sidebar closed: the docked card sits in the empty right gutter. The column is centred exactly as with the pill, and nothing overlaps.

Copy audit (§8)

Before After Reason
(none) Close thread details (popover close button) The popover closes and does not change the stored choice. The docked card keeps Collapse thread details.

No other text changes.

The chat column no longer moves or resizes for the thread summary. It
stays centred in the thread area with its own width, and messages and
the composer always share it, as when the summary is collapsed.

The summary card stays open beside the column only where the right
gutter holds it with a margin. Elsewhere the summary is always the
pill, and the pill opens the card as a popover under it that closes on
Escape, a click outside, another thread or a new layout. The device-wide
choice is unchanged, so switching threads or resizing never jumps.

Fixes: #710
@nixuuu
nixuuu merged commit ef2b98b into dev Nov 14, 2026
11 checks passed
@nixuuu
nixuuu deleted the fix/workspace-summary-placement branch November 14, 2026 16:24
nixuuu added a commit that referenced this pull request Nov 14, 2026
nixuuu added a commit that referenced this pull request Nov 14, 2026
Long active file names could extend outside the workspace tab strip and
overlap Files at phone widths. The non-shrinking active tab was
introduced in #711.

The title now gives space to tabs first. Thread keeps its slot, file
names truncate within the available strip, and extra tabs collapse into
+N using a rem-based width budget. Files uses an icon with an accessible
name and tooltip below 40 rem. Its slot and the existing thread actions
stay fixed when tabs open or close. The responsive Files control is
extracted into WorkspaceFilesToggle; workspace documentation reflects
the behavior.

Fixes: #711

### Validation

- Passed with nice and TMPDIR under /var/tmp: bun install, bun run
typecheck (including Svelte: 0 errors/warnings), bun run lint, bun run
format:check, bun run --filter @canopy/web build. Ran bun run format
after edits.
- Browser review against a disposable remote stack: light and dark at
320, 390, 768, 1100 and 1440 px, plus 1920 px bounds. Checked
short/typical/164-character titles, 11 kept file tabs, the long active
filename, Thread and its summary pill. No page-level horizontal
overflow; active tabs stay inside the strip.
- Files x positions before/after closing/reopening a tab were unchanged:
280, 350, 684.5, 1016.5, 1356.5 and 1836.5 px respectively at
320/390/768/1100/1440/1920 px. The +N menu selects the long file and
returns focus to its visible tab.
- No UI test suites added or run. Review servers, database container,
tunnel and temporary directories cleaned up.

### Copy audit (§8)

Files text button → Files icon-only on phones; the same English
accessible name is preserved and becomes the tooltip. Desktop copy is
unchanged. No new error or empty-state text. Checked short and long
labels at phone and desktop widths; the icon is not the only accessible
cue.

Based on dev including #734. #735 was still open during validation; its
files-view changes are not included in this PR.
nixuuu added a commit that referenced this pull request Nov 14, 2026
nixuuu added a commit that referenced this pull request Nov 14, 2026
The compact composer used a fixed fade, while Jump to latest lived on a
separate fixed rail that could sit beneath the footer or disappear when
the composer expanded.

The fade now uses 12.5% of the measured footer height, clamped to 12–32
px, and the thread canvas token in both themes. Jump to latest shares
the composer's containing block, sits 8 px above the fade with an opaque
surface, border and shadow, and follows the measured footer in both
composer states. Its existing token-based rise transition remains
outside layout; the composer content keeps its clipping independently.

Mobile uses the existing JS/Reanimated stack: a 16–32 dp fade follows
the fold progress, and Show latest sits above the visible measured
stack, outside its clipping and scroll reserve. It remains available
while the composer is expanded. No dependencies, native configuration,
EAS commands or publication changed.

Fixes: #578

Related: #734

## Validation

- Passed: `bun install`, full workspace `bun run typecheck`, `bun run
lint`, `bun run format:check`, and `bun run --filter @canopy/web build`.
Commands used `nice` and temporary files under `/var/tmp`.
- Passed: Android and iOS `expo export` with Hermes bundles. These
validate JS packaging; native device behavior was not exercised.
- Browser review used an isolated review-host checkout and database,
with a synthetic 1000-turn thread. At 390, 640, 1024, 1280, 1600 and
1920 px, both themes and both composer states passed 24 baseline
geometry checks. Another 64 checks covered widths 1024–1920 with every
sidebar/Files open/closed combination, both themes and both composer
states, including docked and pill summaries.
- All 88 geometry checks measured 0 px difference between the button and
composer centre, an 8 px gap above the fade, no composer overlap, and an
unobstructed button centre. The compact fade measured 15 px; expanded
measured 29.75–31.75 px. Visual review at phone and desktop widths
showed matching canvas colors and no seam. Toggling the docked summary
preserved alignment; clicking Jump to latest reached the end and removed
the control.
- No UI test suites added or run. Review servers, database container,
tunnel and temporary files were removed after review.

CI on the first revision also reported a failure in the untouched
`tests/integration/proxy-accounts.test.ts:180` (expected five accounts
in state `ok`, received an empty response). The final head starts a
fresh CI run; its result is still pending at handoff. The initial
static-check failure was the mobile function-size/spacing finding,
corrected and verified by the final local lint run.

## Copy audit (§8)

No UI text changed. Existing action labels remain Jump to latest and
Show latest messages. Polish UI-scale and mobile documentation now
describe the proportional fade and measured anchor.
nixuuu added a commit that referenced this pull request Nov 14, 2026
…ry (#742)

## Change

User feedback on #734, with a video toggling the sidebar with the
summary card open, plus two screenshots.

**1. The docked card always runs to the bottom.** It is pinned to the
top and bottom of the thread area (12 px inset) and scrolls inside. Its
height no longer depends on its content or on the sidebar. With the
sidebar open it now looks and behaves exactly as with it closed.

**2. The chat column is centred on the window.** `SummaryLayout`
measures the column's space in viewport coordinates and places the
column with `--chat-offset` and `--chat-column`, read by `.chat-column`
in `VirtualFeed`. Messages and composer always share it.
- It centres on the window's middle, clamped between the area's left
edge (clear of the sidebar and the turn rail) and the docked card (1 rem
gap).
- When a side would collide, it moves only as far as needed, then
narrows, but never below 36 rem.
- Only when the card doesn't fit beside a 36 rem column does the summary
fall back to the pill and popover from #734.
- Opening or collapsing the docked card eases the column
(`--duration-slow`, `--ease-smooth-out`); reduced motion makes it
instant. Sidebar and window changes already move it frame by frame, and
nothing animates on first load.
- The preference is still one device-wide value, and the effective state
depends on it and the available space, so switching threads never jumps.
Without a placement (bot chats) `.chat-column` keeps the old centring.

**3. Connector rows.** The caption "Send a message to check tool
availability" is gone. A row shows only the connector name. A compact
badge appears only for a known status: `Available`, `Available next
turn`, `Access removed` (tooltip: "Tools update next turn"),
`Unavailable` (tooltip: "No tools available"), `Error` (with the reason
on a second line), or the account's own status (for example, reconnect
required). Mobile never showed this caption, so it is unchanged.

**4. Location and branch rows**, one 32 px line each, with no label row
and no word-breaking.
- **Location:** a worktree shows its name (the last path segment,
middle-truncated). A directory shows `~/…` with the leading part
shortened and the name middle-truncated. The full path is in the
tooltip. Clicking opens a menu with Copy path, Open folder (local) and
Manage worktree, which replaces the separate Manage worktree row.
- **Branch:** middle truncation keeps the distinguishing end, and the
switcher chevron (or the busy spinner) has a fixed slot. The upstream
appears only in the tooltip, and only when it names a different branch
(new `distinctUpstream` in domain).
- **Mobile Thread details** uses the same one-line rows
(`ThreadPanelLine`). The location opens a sheet with the full path, Copy
path and Manage worktree. The branch picker notes "Started from …" only
when the upstream differs.
- `PanelField` (web) and `ThreadPanelField` (mobile) are no longer used
and are removed.

Docs: `workspace.md` covers the window-centred column, the docked card
height and the 36 rem minimum. `ui-scale.md` covers the one-line
placement and connector rules.

Related: #734

## Verification

- `bun install`, full `typecheck` (web and mobile), `lint`,
`format:check`, the web production build, and `expo export` for Android
all pass (with `nice`, temp in `/var/tmp`).
- **Review host, light and dark, bench stack.** The seed had a long
Polish title, a long branch, PR #412, 19 subagents and 2 schedules. For
widths 1100, 1280, 1440, 1600, 1920 and 2560, with the sidebar open and
closed and Files open and closed (24 layouts per theme), a script
measured the column, the composer and the card, then collapsed the card:
- **Shared column:** messages and composer have the same x and width in
every run.
- **Clearance:** the column never starts left of the area (no overlap
with the sidebar) and always ends at least 15 px before the docked card.
- **Centring:** wherever it fits, the column is exactly window-centred,
for example 1600, 1920 and 2560 with Files closed and every 2560 layout.
Elsewhere it is clamped, for example 1440 with the sidebar open: 14 px
left of centre and narrowed from 768 to 764 px. It never goes below 576
px when docked.
- **Card height:** wherever docked, the card is 928 px tall and ends 12
px above the area's bottom, identical with the sidebar open or closed.
- **Collapsing:** collapsing the card moves the column only toward the
centre (0 px where it was already centred). Pill mode stays at 1100, at
1280 and 1440 with the sidebar and Files open, and at 1100 with Files
open.
- **Placement rows:** all three cases are one line, 32 px each, in light
and dark. The worktree
`canopy-implementujesz-docelowa-architekture-agenta-ai` shows as
`canopy-imple…ture-agenta-ai`. The directory
`/Users/nix/GIT/clients/itsol/very/deeply/nested/projects/gakko-monorepo-with-a-long-directory-name`
shows as `…ects/gakko-mon…ctory-name`. The branch
`feature/agent-resources-changes` shows as
`feature/agen…ources-changes`. The worktree menu shows Copy path and
Manage worktree; the directory menu shows Copy path.
- **Screenshots, described:**
- **1440 dark, sidebar open:** the column is next to the full-height
card with a clear gap. Closing the sidebar moves it 4 px.
- **1920 light, sidebar and Files open:** the card runs from the top bar
to the bottom, between the column and the Files panel.
- **1100 dark, sidebar open:** the pill sits top-right and the column
fills the area.
- **Not checked live:**
- Connector badges: the bench worker reports no connector accounts, so
only the "None" state was visible.
  - Mobile rows: type-checked and exported, but not run on a device.

## Copy audit (§8)

| Before | After | Reason |
| --- | --- | --- |
| `Send a message to check tool availability` (every connector row) |
removed | No information until a status is known. |
| `Available`, `Available next turn`, `Access removed · Tools update
next turn`, `No tools available` (second lines) | badges `Available`,
`Available next turn`, `Access removed`, `Unavailable`, `Error` (+
reason line) | One compact status per row; details in tooltips. |
| `Worktree` / `Directory` label rows, `Manage worktree` row, hover
`Open folder` / `Copy working directory` | one row; menu `Copy path`,
`Open folder`, `Manage worktree` | Verb-first menu items; the label
moves into the tooltip and accessible name. |
| `Branch` label row, `from origin/…` line | one row; tooltip `… · From
origin/…` only when the upstream differs | Shows the upstream only when
it adds information. |
| Mobile `Copy` button and `Manage worktree` button | location sheet
with `Copy path`, `Manage worktree`; branch picker note `Started from …`
| Same actions as web. |
nixuuu added a commit that referenced this pull request Nov 26, 2026
## Changes

The docked Thread details card switched to the popover position and
styling as soon as it began to fade. The pill appeared over the outgoing
header.

- Keep the card anchored in the top-right corner throughout the
transition. Fade the card and pill in sequence using the existing motion
tokens.
- Move keyboard focus to the card header when it opens and back to the
pill on Escape.
- Document the animation and reduced-motion behavior.

Fixes: #734

## Verification

- Checked the component in Chromium at desktop width in light and dark
themes. Sampled the transitions frame by frame for a stable anchor and
no overlap between labels. Verified Escape, focus return, and quick
reopening.
- Checked the popover at 700 px with a long branch label and the sheet
at 390 px. Verified the instant swap with the reduced-motion CSS rules
active.
- Web typecheck, lint on the edited Svelte components, formatting of the
edited code, and `git diff --check` passed locally. GitHub Actions runs
the full gate.
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