Log the physical display disconnect and reconnect path - #100
Merged
Conversation
Every other display capability reports to the unified log, and this one did not, which is why issue #33 is still guesswork. The reporter's capture shows WindowServer freezing for 29.5 seconds and then dropping their Philips, with nothing from Crisp to say what had been asked for or how long the ask took. @ncchen99 noticed the same hole from the outside in #91, that restoreIfNoActiveDisplay logs nothing at all. A new "display" category covers the four things a capture needs: which action started a transaction (a user disconnect, a user reconnect, or a softReconnect blink, which look identical at the transaction level), what SkyLight and CoreGraphics returned, how long the commit took, and whether restoreIfNoActiveDisplay acted. The timing is split on purpose. CGCompleteDisplayConfiguration is timed inside the operation, and the wait for it is timed outside, because those are different numbers: the 10 second wrapper only stops Crisp waiting, it cannot cancel the call, so on a timeout the outer line reports a failure at about 10000 ms while the commit is still running and reports its real duration later. If #33 is the commit blocking inside WindowServer, that pair of lines says so outright instead of leaving a silence to be guessed at. The 500 ms slow threshold matches DDCService so the two categories read alike. No behaviour change. Every interpolated value is marked public, since a capture full of <private> would be no better than the silence this replaces. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016NDzD18GySiCwEGfWJiT4J
This was referenced Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every other display capability reports to the unified log and this one did not, which is why #33 is still guesswork.
The reporter's capture shows WindowServer going silent for 29.5 seconds and then dropping their Philips, with nothing from Crisp to say what had been asked for or how long the ask took. @ncchen99 found the same hole from the other side in #91, noting that
restoreIfNoActiveDisplaylogs nothing at all.A new
displaycategory covers the four things a capture needs: which action opened a transaction (a user disconnect, a user reconnect, or asoftReconnectblink, which are indistinguishable at the transaction level), what SkyLight and CoreGraphics returned, how long the commit took, and whetherrestoreIfNoActiveDisplayacted.The timing is split on purpose.
CGCompleteDisplayConfigurationis timed inside the operation and the wait for it is timed outside, because those are different numbers. The 10 second wrapper only stops Crisp waiting, it cannot cancel the call, so on a timeout the outer line reports a failure at about 10000 ms while the commit is still running and reports its real duration later. If #33 turns out to be that commit blocking inside WindowServer, this pair of lines says so outright rather than leaving a silence to be guessed at. The 500 ms slow threshold matchesDDCServiceso the two categories read alike.No behaviour change.
Verification:
make compileand whole-treeswiftlint --strictare green;make testruns here in CI. All ten log lines mark every interpolated value.public, checked mechanically, since a capture full of<private>would be no better than the silence this replaces. Not yet exercised live: every path in this file needs two displays or a panel click to reach, so the emitted output still wants one run on hardware before it is relied on.Note for merge order: this and #99 both touch
restoreIfNoActiveDisplay, so whichever lands second needs a one-line conflict resolved.🤖 Generated with Claude Code
https://claude.ai/code/session_016NDzD18GySiCwEGfWJiT4J