Skip to content

fix(workspace): keep thread header tabs within available space - #737

Merged
nixuuu merged 2 commits into
devfrom
fix/workspace-header-overflow
Nov 14, 2026
Merged

nixuuu merged 2 commits into
devfrom
fix/workspace-header-overflow

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

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
nixuuu marked this pull request as ready for review November 14, 2026 16:46
@nixuuu
nixuuu merged commit 143e393 into dev Nov 14, 2026
13 checks passed
@nixuuu
nixuuu deleted the fix/workspace-header-overflow branch November 14, 2026 16:58
nixuuu added a commit that referenced this pull request Nov 14, 2026
The thread header now separates project and action chrome from a rounded
tab surface that continues into thread and file content. Tabs gain
quieter inactive surfaces, separators, reserved close slots, hover
feedback and reduced-motion-aware transitions while retaining #737
overflow behaviour.

Windows and Linux use custom window controls (`titleBarStyle: hidden`,
no native title-bar overlay); they inherit the chrome palette and retain
the existing reserved width. macOS keeps left traffic lights.
Summary-card internals and column centring are unchanged.

Related: #711, #737

Validation passed: `bun install`, `bun run typecheck`, `bun run lint`,
`bun run format:check`, and `bun run --filter @canopy/web build`. The
final CSS adjustment was rechecked with web typecheck, lint,
format:check and the web build. Checks ran with `nice` and private
temporary files outside the repository.

Browser review used a disposable remote stack, isolated database and
synthetic files, constrained to one CPU. Light/dark, Thread + three file
tabs, active file, 390 px phone, 640/768/1024/1440 px, short/long names,
overflow selection, summary and Files were reviewed. Header bounds
stayed at y=0 / height=48 before and after tab switches at every
measured width; page scroll width matched the viewport. Hovering an
inactive tab preserved its label bounds. Opaque reverse corners were
reviewed at DPR 1 and actual DPR 2 (2880×1800 PNGs for a 1440×900
viewport). Browser development mode emitted the existing `derived_inert`
warnings on both base and changed code, with no errors in the completed
review.

Windows/Linux browser simulation rendered the actual custom controls:
header and controls resolved to the same chrome colour, with a 120 px
reserve. With Files open that reserve moved to the panel's header.
Computed app regions were `drag` on the header and `no-drag` on tab
buttons; the macOS simulation retained an 88 px left clearance with the
sidebar hidden. These checks do not exercise a native Electron window.

PNG screenshots are retained outside git in
`/var/tmp/canopy-tabs-shots/`:
`{before,after}-{light,dark}-{1440,390}-{thread,file}.png`, plus
`after-{light,dark}-1440-{thread,file}-2x.png`, summary/Files captures
and Windows/Linux/macOS simulations. The path index is `paths.txt` in
that directory. The disposable stack and review directory are cleaned
after capture.

No UI test suites were added or run. Copy audit: not applicable; no
user-facing text changed. The documentation update describes the new
surfaces only.

Native manual checks before merge:

1. Windows/Linux: drag from empty left/right chrome; tab buttons, close
buttons, menus and Files must stay clickable without dragging.
2. Minimize, maximize/restore and close; verify the Close red hover,
light/dark appearance changes and alignment after zoom/fullscreen
changes.
3. Open/close Files and the sidebar; window controls must retain chrome
backing and never overlap action buttons.
4. macOS: traffic-light alignment and dragging with the sidebar
open/closed, including zoom/fullscreen changes.
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