Skip to content

feat: Add detached window with optional toolbar and hostname display#1187

Merged
adamshiervani merged 9 commits intojetkvm:devfrom
tvinhas:detach-window
Mar 17, 2026
Merged

feat: Add detached window with optional toolbar and hostname display#1187
adamshiervani merged 9 commits intojetkvm:devfrom
tvinhas:detach-window

Conversation

@tvinhas
Copy link
Contributor

@tvinhas tvinhas commented Feb 4, 2026

Summary

Adds a "Detach" button to open the KVM video stream in a separate window. The detached window can optionally show/hide toolbars (configurable in Settings > Appearance), with the window size automatically adjusting. The window title
displays "JetKVM: {hostname}" for easy identification.

Checklist

  • Ran make test_e2e locally and passed
  • One problem per PR (no unrelated changes)
  • Lints pass; CI green
  • Tricky parts are commented in code

@CLAassistant
Copy link

CLAassistant commented Feb 4, 2026

CLA assistant check
All committers have signed the CLA.

@tvinhas
Copy link
Contributor Author

tvinhas commented Feb 4, 2026

image

@tvinhas
Copy link
Contributor Author

tvinhas commented Feb 4, 2026

This PR adds a "Detach" button to the top bar that when clicked opens a browser popup with minimal UI so the user can have multiple KVMs open with minimal distractions, without wasting space in the monitor.

image

@tvinhas tvinhas force-pushed the detach-window branch 2 times, most recently from 5a2c9a2 to 70f8418 Compare February 17, 2026 16:33
Copy link
Contributor

@adamshiervani adamshiervani left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time implementing this!

Overall feedback - can be much simpler and duplicate less code. The Action bar will get too crowded with another button, but I'll fix that once this is merged, as I need to rethink the entire navigation.

Copy link
Contributor

@adamshiervani adamshiervani left a comment

Choose a reason for hiding this comment

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

  • Opening the Virtual Media modal, will make it go away from detached mode
  • Clicking on Connection Stats doesn't open the sidebar

@tvinhas
Copy link
Contributor Author

tvinhas commented Feb 26, 2026

  • Opening the Virtual Media modal, will make it go away from detached mode
  • Clicking on Connection Stats doesn't open the sidebar
  • Opening the Virtual Media modal, will make it go away from detached mode
  • Clicking on Connection Stats doesn't open the sidebar

Good catch! I never used neither of those functions so I didn't realize they were broken. Fixed both:

  1. Virtual Media: navigateTo was dropping the ?detached=true query param during navigation, and the modal was guarded by !isDetachedWindow. Fixed the navigation helper to preserve the detached param and removed
    the modal guard.
  2. Connection Stats: The sidebar container wasn't rendered in detached mode. Removed the guard so it renders.

Copy link
Contributor

@adamshiervani adamshiervani left a comment

Choose a reason for hiding this comment

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

Web Terminal doesn't work. Oddly enough, it works i you open the Virtual Media modal, but then the main big header pops up too.

@tvinhas
Copy link
Contributor Author

tvinhas commented Mar 5, 2026

Web Terminal doesn't work. Oddly enough, it works i you open the Virtual Media modal, but then the main big header pops up too.

Fixed both issues:

  1. Web Terminal: The Terminal components were guarded by !isDetachedWindow, preventing them from rendering in detached mode. Removed the guards.
  2. Header appearing after Virtual Media: The mount route used raw navigate("..") which drops the ?detached=true search param, causing isDetachedWindow to become false. Switched to navigateTo("/") which preserves the detached param, and refactored the Dialog's internal navigation to use its onClose callback for consistency.

tvinhas added 7 commits March 16, 2026 12:24
- Hide dotted background pattern in detached mode
- Remove margins around video container
- Remove min-width/height constraints and border/shadow on video
                                                                                                                                                                                                                     │
navigateTo() was dropping the ?detached=true query parameter during                                                                                                                                                 │
navigation, causing the Virtual Media modal to exit detached mode.                                                                                                                                                  │
The modal and sidebar containers were also hidden in detached mode                                                                                                                                                  │
via isDetachedWindow guards, preventing them from rendering.                                                                                                                                                        │
                                                                                                                                                                                                                     │
Fix navigateTo to preserve the detached query param across                                                                                                                                                          │
navigations, and remove the guards on Modal and SidebarContainer                                                                                                                                                    │
so both work in the detached window.
…mount route

  The Terminal components were guarded by !isDetachedWindow, preventing
  them from rendering. The mount route used raw navigate("..") which
  drops the ?detached=true query param, causing the navbar to reappear
  after closing the Virtual Media modal. Switched to navigateTo("/")
  which preserves search params, and use the onClose callback for the
  Dialog's internal navigation.
@tvinhas
Copy link
Contributor Author

tvinhas commented Mar 16, 2026

@adamshiervani I just rebased this against dev since you've been busy merging a lot of stuff to it.

@adamshiervani adamshiervani merged commit 23123f0 into jetkvm:dev Mar 17, 2026
3 of 4 checks 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.

4 participants