Skip to content

fix(window): restore state events after macOS Dock reopen - #61

Closed
teo-nex wants to merge 2 commits into
howdeploy:mainfrom
teo-nex:fix/window-state-reopen-20260923
Closed

teo-nex wants to merge 2 commits into
howdeploy:mainfrom
teo-nex:fix/window-state-reopen-20260923

Conversation

@teo-nex

@teo-nex teo-nex commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

On macOS, closing the main window and reopening from the Dock creates a new BrowserWindow, but window-state events remain subscribed to the old one. The reopened window can read its initial state yet misses later maximize and fullscreen notifications.

This rebinds the state observer for each new main window and disposes listeners when the old window closes. The regression closes and reopens fake windows, then checks that events reach only the new renderer.

Validation after merging current main (5998d494): 4 focused window/IPC tests, 783/783 full project tests, TypeScript typecheck, and git diff --check pass. Native macOS Dock reopening was not exercised because the live CanvasTTY session was kept running.

BIackFIame added a commit to BIackFIame/CanvasTTY that referenced this pull request Sep 23, 2026
# Conflicts:
#	src/main/index.ts
#	src/main/ipc/registerIpc.ts
BIackFIame added a commit to BIackFIame/CanvasTTY that referenced this pull request Sep 23, 2026
- howdeploy#55: the answer-capture grant is kept for a session's first start and
  passed through the prepared and measured-grid launch paths that every
  real agent launch uses; a restart never inherits it.
- howdeploy#62: a failed update clears the terminal manager's shutdown flag, so
  sessions can be created again; it restores only live sessions and drops
  orphaned subagents with the same rule as startup restore. Installing
  refuses while a server is being prepared or a capsule test runs. The
  update entry opens About through the shared Settings location.
- howdeploy#58 and howdeploy#61 need only mechanical resolutions; howdeploy#58's tests pass against
  the stack's settings store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 6527028)
BIackFIame added a commit to BIackFIame/CanvasTTY that referenced this pull request Sep 23, 2026
# Conflicts:
#	src/main/index.ts
#	src/main/ipc/registerIpc.ts
BIackFIame added a commit to BIackFIame/CanvasTTY that referenced this pull request Sep 23, 2026
- howdeploy#55: the answer-capture grant is kept for a session's first start and
  passed through the prepared and measured-grid launch paths that every
  real agent launch uses; a restart never inherits it.
- howdeploy#62: a failed update clears the terminal manager's shutdown flag, so
  sessions can be created again; it restores only live sessions and drops
  orphaned subagents with the same rule as startup restore. Installing
  refuses while a server is being prepared or a capsule test runs. The
  update entry opens About through the shared Settings location.
- howdeploy#58 and howdeploy#61 need only mechanical resolutions; howdeploy#58's tests pass against
  the stack's settings store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 6527028)
BIackFIame added a commit to BIackFIame/CanvasTTY that referenced this pull request Sep 23, 2026
# Conflicts:
#	src/main/index.ts
#	src/main/ipc/registerIpc.ts
BIackFIame added a commit to BIackFIame/CanvasTTY that referenced this pull request Sep 23, 2026
- howdeploy#55: the answer-capture grant is kept for a session's first start and
  passed through the prepared and measured-grid launch paths that every
  real agent launch uses; a restart never inherits it.
- howdeploy#62: a failed update clears the terminal manager's shutdown flag, so
  sessions can be created again; it restores only live sessions and drops
  orphaned subagents with the same rule as startup restore. Installing
  refuses while a server is being prepared or a capsule test runs. The
  update entry opens About through the shared Settings location.
- howdeploy#58 and howdeploy#61 need only mechanical resolutions; howdeploy#58's tests pass against
  the stack's settings store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 6527028)
howdeploy added a commit that referenced this pull request Sep 24, 2026
@howdeploy

Copy link
Copy Markdown
Owner

Integrated into main via #73. The window-state fix and your original authored feature commit are preserved in the merge history. Thank you, @teo-nex.

@howdeploy howdeploy closed this Sep 24, 2026
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.

2 participants