feat(desktop): open chats in separate windows + narrower min width#39887
Closed
tim404x wants to merge 1 commit into
Closed
feat(desktop): open chats in separate windows + narrower min width#39887tim404x wants to merge 1 commit into
tim404x wants to merge 1 commit into
Conversation
badbe7e to
b32fb6c
Compare
Adds a menu-driven 'Open in New Window' action to the session right-click and dropdown menus so a user can work with multiple chats side by side, and lowers the window min width from 900 to 420 so several narrow chat windows can be tiled next to each other. How it works - A secondary window loads the same renderer at the session's hash route with a ?win=secondary flag (placed BEFORE the '#' so HashRouter does not swallow it as the route). The renderer reads the flag from location.search and skips the install/onboarding overlays and the global session sidebar, rendering a single focused chat. It still connects to the shared local gateway over WS, so there is no backend duplication. - The main process keys secondary windows by sessionId in a small registry: re-opening a chat focuses the existing window instead of duplicating, and each window self-cleans from the registry on close. The primary window is never tracked there. - Shared navigation guards (external-link handling, will-navigate confinement, preview/devtools/zoom/context-menu wiring) are factored into one helper so the secondary windows cannot drift from the main window's security posture. - The macOS dock-activate handler now guards on the main window directly, so a dock click restores the primary window even when only secondary windows are open. Tests - electron/session-windows.test.cjs (node --test): URL building (flag before hash, encoding, dev vs packaged) and the registry (focus-or-create, restore on re-open, cleanup on close, rebuild after destroy, input validation). - src/store/windows.test.ts (vitest jsdom): bridge detection and the open-in-new-window action (no-op without a bridge/session id, invokes the bridge, surfaces ok:false and thrown errors).
b32fb6c to
101a96d
Compare
Collaborator
|
Great feature, @tim404x — side-by-side chat windows are genuinely useful. I picked it up and shipped it as #43219, keeping you as co-author. Changes on the way through:
Closing in favor of #43219. Thanks for the work! |
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.
Adds a menu-driven 'Open in New Window' action to the session right-click and dropdown menus so a user can work with multiple chats side by side, and lowers the window min width from 900 to 420 so several narrow chat windows can be tiled next to each other.
How it works
Tests
What does this PR do?
Related Issue
Fixes #
Type of Change
Changes Made
How to Test
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs