Skip to content

fix: restore the chat window after it is minimized - #180

Open
iis-MarkKuang wants to merge 1 commit into
yumiaura:mainfrom
iis-MarkKuang:fix/chat-window-minimize
Open

iis-MarkKuang wants to merge 1 commit into
yumiaura:mainfrom
iis-MarkKuang:fix/chat-window-minimize

Conversation

@iis-MarkKuang

@iis-MarkKuang iis-MarkKuang commented Nov 3, 2026 •

Copy link
Copy Markdown

Review the chat-window restore. Fixes #181.

Minimizing the chat panel left it small, with no Dock icon of its own, because the dialog belongs to the cat window. The Chat menu treated that minimized window as already open and hid it. The next show() did not clear the minimized state, so the panel stayed closed.

Chat now restores the panel with showNormal(). A minimized panel stays where it was. It is not moved back beside the cat.

Checked:

  1. ruff check .
  2. QT_QPA_PLATFORM=offscreen python -m pytest -q --timeout=60 --timeout-method=thread on Python 3.12: 496 passed, 11 skipped. --forked segfaults in this macOS Qt setup when the offscreen QApplication is created in the child, so that run is left to CI on Ubuntu.
  3. On macOS 15.8.2: open Chat, minimize with the window button, reopen from the cat menu, repeat once, then close. The panel came back both times at the same place and size (360×448, delta 0). The recording is in the PR comment and on Chat window cannot be restored from the menu after it is minimized #181.

Next: watch that recording on #181.

Minimizing the panel left it miniaturized without its own Dock tile, and the Chat menu then hid it instead of showing it again.

Co-authored-by: Cursor <cursoragent@cursor.com>

@fabianleonaressi95 fabianleonaressi95 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the implementation and the two added tests. The state handling is coherent: a minimized dialog is no longer treated as an ordinary visible/open dialog, showNormal() clears the minimized state, and the anchoring logic avoids moving the minimized window.

One validation item remains: the PR's manual test-plan checkbox is still unchecked. Because the reported failure is specifically macOS 15.5/AppKit behavior (including the absence of a separate Dock tile for this parented dialog), the offscreen Qt tests cannot fully establish the platform-level behavior. Please run and record the exact issue reproduction on macOS: open Chat → minimize via the window control → reopen from the cat menu → repeat once → close/hide. I would also retain the repeated-cycle check as a regression scenario.

I found no code-level blocker in the diff, but I would not treat the macOS-specific reproduction as verified until that manual check is recorded.

@iis-MarkKuang

Copy link
Copy Markdown
Author

Recorded the manual check on this Mac (macOS 15.8.2, mycat 0.1.38 from this branch).

Sequence: open Chat from the cat's menu, minimize with the yellow window button, open Chat again, repeat that once, then close with the red button. The cat stayed visible the whole time.

After each minimize the chat window left the screen. It does not get its own Dock icon, because the dialog belongs to the cat window. Choosing Chat brought it back both times, at the same place and size: 919,258, 360×448, delta 0. Close hid it again.

Chat minimize and restore on macOS

Copy link
Copy Markdown

Follow-up verification from my side: the macOS reproduction is now recorded in the PR discussion (two minimize/restore cycles, unchanged position and 360×448 size, close/hide works). The implementation and the two focused regression tests look coherent.

The remaining validation gap is CI on the PR head commit 4f31b2e8f5c9d7d00a085f2d20a1392ed89e9340: the associated CI and Auto Assign workflow runs currently show action_required and have no jobs, so the Ubuntu/Linux CI has not actually executed. Could a maintainer approve the pending workflow runs (or otherwise trigger the CI on the PR head)? If Linux CI is green, I see no remaining blocker to merging #180 and closing #181.

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.

Chat window cannot be restored from the menu after it is minimized

2 participants