Skip to content

feat(shell): add mini-pane window mode with hover-to-restore overlay - #1273

Merged
XingYu-Zhong merged 3 commits into
KunAgent:developfrom
130rockirt:feat/mini-window-pane
Sep 5, 2026
Merged

feat(shell): add mini-pane window mode with hover-to-restore overlay#1273
XingYu-Zhong merged 3 commits into
KunAgent:developfrom
130rockirt:feat/mini-window-pane

Conversation

@130rockirt

@130rockirt 130rockirt commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a title-bar mini-pane button that shrinks the desktop window to a 380x480 always-on-top pane. A draggable hover overlay offers a restore button that returns the window to its previous bounds and maximized state.

Changes

  • Wire the mini command and state events through the shared desktop contract and preload bridge.
  • Collapse secondary chrome while mini mode is active; add localized restore and drag controls.
  • Unmaximize before restoring normal bounds, and preserve the original minimum size and always-on-top setting.
  • Query the main process when mounting so renderer reloads recover the current mini state; newer toggle events take precedence over an older query response.
  • Use weak window references and a dedicated mini-window stylesheet to satisfy the 700-line limit.
  • Rebase onto develop after merging fix(composer): route dropped document uploads through the desktop bridge #1277 (08d8796fe).

Tests

  • 21 focused tests passed for window transitions, renderer state recovery, title-bar controls, overlay markup, and desktop IPC handling.
  • File-line gate passed.
  • npm run typecheck, npm run build, and npm run lint passed.
  • After the final rebase, all 42 combined attachment and mini-window regression tests passed.

@130rockirt

Copy link
Copy Markdown
Contributor Author

Added a follow-up fix (a2946c8): exiting mini mode while the window is maximized kept the mini-sized normal frame, because setBounds() is a no-op on a maximized window. The restore path now unmaximizes before applying the saved bounds, so restoring puts the window back at the pre-mini size. Covered by a new unit test and verified end-to-end with Electron on a 1280x800 @150% display.

10708 and others added 3 commits September 5, 2026 21:18
Add a mini-pane button to the desktop title bar that shrinks the main
window to a 380x480 always-on-top pane anchored to the bottom-right of
the work area. While active, secondary chrome (sidebar, menu bar) is
collapsed and a hover overlay offers one-click restore to the saved
bounds and maximized state.
The hover overlay is now a window drag region so the shrunken pane can
be moved anywhere by pressing on the dimmed layer; the restore badge
opts out with no-drag. Hover visibility is driven by body:hover because
pointer-events: none elements never receive :hover themselves.
setBounds() is a no-op on a maximized window, so when the user
maximized the window while in mini-pane mode, exiting mini mode kept
the mini-sized normal frame and any later restore jumped the window
back to the small pane rectangle. Unmaximize before restoring the
saved bounds.

@XingYu-Zhong XingYu-Zhong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the mini-window behavior and rebased it onto develop after #1277. Fixed renderer reload state recovery, query/event ordering, original minimum-size and always-on-top restoration, and the CSS line-limit failure. Corrected the unrelated PR description. Typecheck, build, lint, and all 42 combined attachment/mini-window regression tests pass; final shared renderer/preload/main typechecks also pass.

@XingYu-Zhong
XingYu-Zhong merged commit ea2e736 into KunAgent:develop Sep 5, 2026
1 check passed
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.

3 participants