Skip to content

Keep the disconnect record right when a display change lands after its timeout - #219

Merged
didriksg merged 1 commit into
mainfrom
fix/late-display-commits
Oct 10, 2026
Merged

didriksg merged 1 commit into
mainfrom
fix/late-display-commits

Conversation

@didriksg

Copy link
Copy Markdown
Owner

What & why

setEnabled stops waiting for CGCompleteDisplayConfiguration after 10 s, but the commit can still land later (#33 saw 29.5 s). Three things went wrong when it did. A disconnect that timed out stored no record, so a late landing left the display dark with no Reconnect row and no blackout rescue. A reconnect that timed out kept its record, so a late landing met that record in reconcile and was switched straight back off. And the DDC hold ended when the wrapper gave up, so DDC traffic could start again under a commit that was still in WindowServer.

Both timeouts now keep the record and watch the display for 30 s, reconcile leaves it alone meanwhile, and enumeration decides. The hold now ends when the transaction returns. After a late reconnect the input is not written back. Stacked on #218, which changes the same functions. Found while reading the backend in #209 and #210.

How tested

  • make check.
  • A dev build with the wrapper set to 0.01 s, so every commit "times out" and lands about 100 ms later, on a MacBook with one external: the disconnect kept its record and logged landed late, and the reconnect logged landed late, record dropped and stayed connected, with no re-apply from reconcile.
  • The DDC hold change has nothing to see from outside. It only changes when the hold ends.

Checklist

  • Builds locally
  • Added/updated Crisp/Resources/Localizable.xcstrings for any new user-facing strings (none)
  • Screenshot or short clip for any UI change (none)

…s timeout

setEnabled stops waiting for CGCompleteDisplayConfiguration after 10 s, but the commit can still land later (#33 saw 29.5 s). A user disconnect that timed out stored no record, so a late landing left the display dark with no Reconnect row and no blackout rescue. A reconnect that timed out kept its record, so a late landing met that record in reconcile and was switched straight back off. Both now keep the record and watch the display for 30 s, with reconcile leaving it alone meanwhile, and enumeration decides. The DDC hold is now released when the transaction returns, not when the wrapper gives up, so DDC stays parked under a late commit.
@didriksg
didriksg deleted the branch main October 10, 2026 23:18
@didriksg didriksg closed this Oct 10, 2026
@didriksg didriksg reopened this Oct 10, 2026
@didriksg
didriksg changed the base branch from feature/connection-switches to main October 10, 2026 23:19
@didriksg
didriksg merged commit 00c1c63 into main Oct 10, 2026
4 checks passed
@didriksg
didriksg deleted the fix/late-display-commits branch October 10, 2026 23:24
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