Skip to content

fix(ai-chat-turbo-engine): adopt a flyout by where it is painted, not by when - #281

Merged
CYoJkoY merged 2 commits into
mainfrom
issue/280-peek-region
Dec 4, 2026
Merged

CYoJkoY merged 2 commits into
mainfrom
issue/280-peek-region

Conversation

@CYoJkoY

@CYoJkoY CYoJkoY commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Closes #280.

Result

The 0.23.18 hand-off still dropped the peek on real sites because it measured time, not place. A site that mounts the row menu under a resting cursor fires no pointer event at all, so no timestamp was ever refreshed; a menu parked a few dozen pixels from the panel also missed the neighbour test.

This replaces the 500ms budget with a geometric rule:

  • A flyout is adopted when its box sits within 32px of the region the peek paints (rail grown to the peek width, stretched shells, already-adopted layers) or when its box holds the pointer.
  • Adopted layers join that region, so a menu → submenu → next level chain keeps working across small gaps and after any resting time.
  • The filter that keeps page chrome out is unchanged in spirit: no wrapper that contains the rail, no flow-layout box, no popup that predates the peek, and nothing at least 60% of the viewport wide.
  • The hide deadline now tries adoption on the node under the pointer before deciding the pointer left, and pointerout adopts the box it is heading into.

Evidence

  • \pnpm check\ green: typecheck, 971 tests, build.
  • New/rewritten peek cases: menu painted just past the panel, menu mounted under a resting pointer with no move event, submenu across the gap after any resting time, far-away flyout rejected, viewport-sized fixed shell rejected.
  • Built header reads @Version 0.23.19; no \

@CYoJkoY
CYoJkoY merged commit bc7d215 into main Dec 4, 2026
1 check passed
@CYoJkoY
CYoJkoY deleted the issue/280-peek-region branch December 4, 2026 11:45
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.

Sidebar peek still collapses on the way into a history row submenu

1 participant