Repository navigation
fix(desktop): keep the windows top bar draggable over scrolled chat - #32206
Conversation
f824c4b to
8476651
Compare
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing in this diff is visible on screen, so no screenshot was needed. It only adds invisible, [UX-REVIEWED] 499a812 Description read[DESCRIPTION-READ] 1ad2f828b168e907071fb69d0e631da695c569fa65437d3e15a8975425317131 That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: the change turns on an existing macOS mechanism ( What this change shipsInventory (5 items) — 5 justifiedIntent: let Windows desktop users drag or maximize the window from the top bar's empty spots while chat is scrolled behind it. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 499a812 Description read[DESCRIPTION-READ] bcf52770cb2038e1e175a05f7dadd0939c5d18f9b7e541a950a062e0e4841ae2 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The PR turns on the existing macOS gap-strip mechanism for Windows and reuses the zoom-aware reserve the main process already pushes. Windows hit-tests at three zoom levels back it, and the strips are invisible. Notes
[DESIGN-REVIEWED] 499a812 Description read[DESCRIPTION-READ] 5f9552946618edd070f70836bcdc8396599ec321017f216a536a8894886e8a07 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
|
[operator: bolichen97] |
8476651 to
499a812
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (7 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: the Windows desktop top bar gets the same drag strips as macOS so scrolled chat no longer blocks window drag, stopping short of the caption buttons.
Problem / Motivation
Goal: On the Windows desktop app the docked top bar moves the window from its empty spots, even where chat content is scrolled up behind it.
On the Windows desktop app the docked top bar does not move the window wherever chat content is scrolled behind it. A tall message kills the bar over its column, and a transcript row wrapper kills it from the Sessions panel's edge to the right edge of the window. Scrolled to the bottom, the same spot works.
Why it matters
The top bar is the window's title bar on Windows. When it stops moving the window, the user cannot drag or double-click to maximize from most of it while reading a long chat, which is the normal state of the app.
Not a goal
no-dragexemption list and its[tabindex]entry.tabIndexand its position under the glass header.What changed (motivation → approach → change)
Transcript content scrolled up under the glass header still reaches into the 42px band from layout. Its
no-dragrectangles come after the header's owndragrule, so they cut holes in it. macOS already fixes the same holes with.host-drag-stripgap strips painted after everything (from #26422). This PR turns those strips on for Windows too.focusChrome.ts--mc-win-drag-reservewidth the main process pushes for the current zoom (138 CSS px when unset).App.tsxheader-drag-strip.dragGaps.tsobserveDocumentLayoutwatches from<html>, so a new caption reserve after a zoom change re-measures the strips.desktop-app.mdand theshell-chrome.csscomment say Windows gets the strips too.A fixed 138 CSS px would reach over Minimize below 100% zoom, because the caption buttons have a fixed size in DIP. So the live reserve is used.
Backwards compatibility
Compatible: macOS, Linux, browsers and remote panes take the same path as before; Windows only gains strips over gaps the header already meant to be draggable.
Removes nothing: the only rename is a test id read by one test, updated in this diff.
Tests
website/src/test/App.winHeaderDrag.test.tsx(new): with the Windows flags, the docked header mounts one strip from 0 toinnerWidth - 138, it unmounts while focus mode hides the header, and a pushed--mc-win-drag-reservere-measures it toinnerWidth - 173.website/src/test/App.focusModeMacDrag.test.tsx: reads the renamed test id.Red on the parent: both new tests fail without the Windows gate (no strip found). The reserve test fails (
1262vs1227) whenobserveDocumentLayoutwatches only<body>.Determinism: the three related files (new test, macOS drag test,
dragGaps.test.ts) passed 3 runs in a shuffled order (--sequence.shuffle, seeds 1 to 3), 20 of 20 tests each run.Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Run on a source build of this branch on Windows Server 2025 (build 26100.33438), 100% display scale, Electron 44.9.1, with a scratch data home and its own port. Each spot was read with
WM_NCHITTESTagainst the real window, which reportsCAPTIONwhere a drag starts. No real mouse was used.Before (main) and after, window not maximized, 1600 wide, a 150-line message scrolled halfway behind the bar:
After the fix, at 100%, 80% and 125% zoom, both not maximized and maximized (6 setups, 99 spots): every header control stays CLIENT, every strip is CAPTION, and Minimize, Maximize and Close keep their own hit codes. The strips always end before the caption buttons. With focus mode on and the header hidden, no strip mounts and the top band over the chat stays CLIENT. Moving the pointer below the peeked header closes it and removes the strips. A double-click message on a strip spot maximizes and restores the window. Row E (remote crew) was not run.
Screenshots / video
Why no screenshot: the strips are invisible divs, so nothing on screen changes; the hit-test table above is the evidence.
Related Issues
Closes #29362
Refs #26422
Sibling sweep
Swept: git grep -nE 'host-drag-strip' -- website/src
Sibling: website/src/components/InstancesViewport.tsx -- not affected -- remote-pane strips already render on Windows; their fixed 138 CSS px clip below 100% zoom predates this PR and is out of its goal
Sibling: website/src/App.tsx -- changed here
Pattern harvest
Not generalizable: the fix extends one platform gate on an existing mechanism; no lint can tell which platforms a drag-region workaround needs.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)