Skip to content

Engine: a shared-mode click whose activation clicked its in-window point holds the screen until the window order reads back, capped at 200 ms (#321) - #325

Merged
SSFSKIM merged 4 commits into
mainfrom
fix/321-hold
Nov 8, 2026

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Summary

In shared mode, a click in a background Safari or TextEdit window often raised that window above the person's own window for a moment (102 of 220 Safari clicks showed it). Now the screen stays frozen until the window order is back as it was, so the raise happens out of sight: 3 of 220 on this branch, 0 of 30 on the final head.

Closes #321

The rule (design session rulings e48e53de, 90ec27dd and 3f99bd19; the spec's #321 Decision Log entry)

  • Scope: every shared-mode pointer action whose activation clicked the target's in-window activation point, whatever the app. Every other delivery is unchanged and pays nothing, Chromium's included (its activation point lies outside the window).
  • The hold:
    • screen updates stay held until the window order reads back as it was before the click;
    • the guard samples for at least 150 ms after the events (activationPointGuardMinimumMs), because a raise can come 4–160 ms after the down;
    • the hold is capped at 200 ms (activationPointHoldCapMs), up from 100. The cap's timer releases the hold whatever the order, so nothing can freeze the screen longer; a unit test proves it while each repair blocks for 300 ms.
  • The hold belongs to its own action (review round 1). A hold an activation leaves open is taken only by the action that ran that activation (deliver(ranBy:)). Another connection's action sharing the activation takes a hold of its own, classified by itself.
  • transientRaise {seen, ms?, outlivedHold} is on every delivery record. raiseLeft is unchanged.
  • Dedicated mode is unchanged: no hold, and the target rises and stays.
  • Plugin 0.27.5.

Cost

Per affected click:

  • about 200 ms of frozen screen, against 100 before. In practice the hold is a flat ~200 ms, since the activation's ~60 ms plus the 150 ms least wait reach the cap;
  • about 90 ms of extra answer latency. The action waits for the guard, which now runs at least 150 ms. Measured: +64 ms at p50 on Safari, +92 ms on TextEdit.

Limits: "invisible, not absent"

  • The reorder still happens. The target window still orders itself above the person's, and the guard repairs it inside the hold. Neither candidate sequence that might have avoided the reorder works: (a), skipping the activation-point click, delivers 0 of 220; with (b), an inert click outside the frame, it still raises, 110 of 220.
  • A click can still flash briefly: 3 of 220 on 6c96be2. Every one came after a slow activation, 133–201 ms before the click's events. The 200 ms cap counts from the activation's hold start, which left those clicks 65 ms or less of hold after their events.
  • The residue is Shared-mode posted click still reorders the target window above the person's; #321's hold only hides it #324: the real reorder, the cap's starting point, and guards over 250 ms on the first click of a fresh Safari and engine.

Live proof (GitHub-hosted macOS; main 602b709 against the branch)

The evidence is in docs/evidence/2026-11-07-shared-raise/.

Check Main Branch
Safari shared, 220 clicks: delivered 219/219 220/220
Safari shared: visible raise after the hold 109 3, exactly those marked outlivedHold
Safari shared: screenHoldMs p50 / capped 100 / 190 200 / 15
TextEdit as the target, 10 clicks: visible after the hold 0 (7 inside it) 0
Chrome for Testing, control no raise, no delivery record identical
Front app and key window held all all
Dedicated mode target rises and stays unchanged
Confirmation on 3436cfa, Safari 30 clicks 14 visible 0 visible

transientRaise checked against the watcher:

  • it missed no reorder the watcher saw;
  • outlivedHold matched the visible raises 3 of 3.

Runs:

The kit is probe/321-ab (01130b9), off main.

Tests and review

Sminos-Session: cursor235#b93055dd (cua on macbook)

…int holds the screen until the window order reads back, capped at 200 ms, with transientRaise recorded (refs #321)

Ruling 90ec27dd. The delivery guard of a shared-mode pointer action whose activation (its own or the held one it
joins) clicked its in-window activation point reads the order for at least 150 ms after the events and releases the
hold once it reads back, or at the 200 ms cap by the timer whatever the order. Clicks without that activation click
(Chromium's) and the paste route keep the 100 ms cap and 60 ms least wait; dedicated mode is unchanged. Every
delivery record carries transientRaise {seen, ms?, outlivedHold}; raiseLeft is unchanged.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…d's transientRaise, the hold's cap amended (refs #321)

Sminos-Session: cursor235#b93055dd (cua on macbook)
… ran it, so a sharer's cap and least wait are its own (refs #321)

The review of 602b709..6c96be2 (one P2): another connection's action sharing the activation before the owning
action's events took its open hold and inherited its policy (a pointer joining a paste's got the 100 ms cap, a paste
joining a pointer's the 200 ms one). deliver(ranBy:) now takes the pending hold only for the action that ran the
activation; any other takes a hold of its own, classified by itself. Both interleavings covered; the Decision Log
entry records it.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…rder reads back (refs #321)

Sminos-Session: cursor235#b93055dd (cua on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T02:47:05.638259Z 299432c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit 3de863b into main Nov 8, 2026
5 checks passed
SSFSKIM added a commit that referenced this pull request Nov 8, 2026
The plugin version resolves to 0.27.6 (main took 0.27.5); the Decision Log keeps #321's entry before #314's.

Sminos-Session: cursor235#b93055dd (cua on macbook)
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.

Shared-mode posted click in Safari can raise Safari's window over the frontmost app's (raiseLeft false)

1 participant