Skip to content

Desktop: keep windows in place across composer focus and pointer loss - #239

Merged
brsbl merged 29 commits into
mainfrom
bb/desktop-window-snapback-thr_xitrpg5vep
Oct 4, 2026
Merged

brsbl merged 29 commits into
mainfrom
bb/desktop-window-snapback-thr_xitrpg5vep

Conversation

@brsbl

@brsbl brsbl commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Desktop windows jumped when the home composer gained focus or pointer capture was lost. Unrelated drags also hid native browsers.

What changed

  • Composer focus preserves window positions and leaves overlapping windows grabbable.
  • Native browsers stay visible during disjoint window drags and restore after overlap clears.
  • Pointer release clears the input shield; moved capture loss commits, while removed targets cancel.

Validation

  • Remote CI passed at e8d75a00d56a820dc69e434af85fe1252b7f6067.
  • Slop Cop and focused cleanup review found no unresolved P0/P1 issues; two P2 follow-ups remain.
  • Electron 44.3.0 passed move, resize, overlap/restoration, composer-focus, and release-cleanup checks.
Regression evidence and remaining follow-ups
  • Prior native interaction coverage remains applicable; the final base update retains the separately reviewed fullscreen-preview guard.
  • Final-head composer-focus check passed; prior disjoint-drag and overlap checks remain valid.
  • Chrome for Testing 151 covered notes, icons, folder drops, fast flicks, and detached-card cancellation.
  • Outside-target release failed before the correction: red regression run.
  • P2 follow-ups: apply the final release coordinates and suppress drag-associated double-clicks.
  • Commit-on-capture-loss intentionally differs from bb’s split dividers.

Native screenshots

Before: 1a931a5129f9697ab86efe10fb6d5dc79a531b1a · After: e8d75a00d56a820dc69e434af85fe1252b7f6067.

Same isolated Electron dev app, core 1e2cee69ade40d437e169f712bd6599dfa1d58db, fixture, route and initial window positions. Home composer focused in both. Native window 1280×900; Retina captures 2560×1800. Before moves the Desktop QA folder window downward; after preserves its position.

State Before After
Home composer focused Before: focus pushes the window downward After: focus preserves the window position

BB-Thread-ID: thr_xitrpg5vep

before

after

brsbl and others added 2 commits October 2, 2026 21:16
Clearance slid windows off bb's home composer while it had focus and slid them back on blur. The slide kept
fighting drags and resizes, and pressing a window that had been pushed partly off-screen made it jump. Windows now
never move on their own. This replaces the previous commit's fitShift limit.

Removes ComposerClearance, clearanceShift, the nudge store, the frame's settle-on-press and nudge transform, and
the transform transition that animated the slide.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@brsbl brsbl changed the title Desktop: thread windows no longer snap back after making room for bb's composer Desktop: remove composer clearance so windows stay where you put them Oct 3, 2026
An interrupted drag (the browser window losing focus, a viewport resize, lost pointer capture, a pointer cancel)
used to put the window back where it started on release. It now keeps where the window got to. trackPointer tells
onEnd whether Escape ended the gesture; its other callers are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
brsbl added a commit that referenced this pull request Oct 3, 2026
…over bb Explorer

- The home composer was raised above every window while focused, on the assumption that clearance had moved
  windows off it. With clearance gone, a title bar under the composer couldn't be grabbed. The composer now stays
  above desktop icons only.
- bb Explorer's native page hid only under windows with a higher inline z-index, so note pads (their own layer,
  above all windows, no inline z) didn't hide it and the page drew over them.

Found by a desktop-app sweep with real pointer input.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
brsbl added a commit that referenced this pull request Oct 3, 2026
brsbl and others added 2 commits October 3, 2026 07:25
trackPointer now does what bb's SplitThreadArea/SidebarSplitContainer resizers do: capture the pointer on the
pressed element and listen there for move, up, cancel and lost capture. Release commits; a cancelled or lost pointer
(or unmount) reverts. Focus loss, viewport resizes, the page hiding, context menus, keys and a second press no longer
end a drag, which is what made windows and note pads spring back. Moves apply immediately instead of once per frame.

Kept beyond bb's dividers because Desktop needs them: the 4 px click/drag threshold (bb's dnd-kit drags use the same),
swallowing the click after a drag, the text-selection guard, and the shield over native web views.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
brsbl added a commit that referenced this pull request Oct 3, 2026
…pback-thr_xitrpg5vep

# Conflicts:
#	plugins/desktop/README.md
brsbl added a commit that referenced this pull request Oct 3, 2026
Windows (move and resize) jumped back on release in the bb desktop app, which drops pointer capture around release;
the bb-style tracker treated that as a cancel and reverted. Once a gesture has moved, pointercancel and
lostpointercapture now end it like a release. Unmount, or losing the pointer before any movement, still cancels.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
brsbl added a commit that referenced this pull request Oct 3, 2026
@brsbl brsbl changed the title Desktop: remove composer clearance so windows stay where you put them Desktop: keep windows in place across composer focus and pointer loss Oct 3, 2026
@brsbl
brsbl merged commit b63aed7 into main Oct 4, 2026
26 checks passed
@brsbl
brsbl deleted the bb/desktop-window-snapback-thr_xitrpg5vep branch October 4, 2026 20:59
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