Skip to content

Comments

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

Open
tvinhas wants to merge 3 commits intojetkvm:devfrom
tvinhas:detach-window
Open

feat: Add detached window with optional toolbar and hostname display#1187
tvinhas wants to merge 3 commits intojetkvm:devfrom
tvinhas:detach-window

Conversation

@tvinhas
Copy link

@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
Author

tvinhas commented Feb 4, 2026

image

@tvinhas
Copy link
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

- Hide dotted background pattern in detached mode
- Remove margins around video container
- Remove min-width/height constraints and border/shadow on video
Prevents merge conflict with copy-and-paste-ocr branch by keeping
the import format consistent with dev.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

@@ -0,0 +1,73 @@
import { LuX } from "react-icons/lu";
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this and simply use the replace the fullscreen buttons in the Actionbar with a Close button

@@ -0,0 +1,550 @@
import { useCallback, useEffect, useRef, useState } from "react";
Copy link
Contributor

Choose a reason for hiding this comment

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

By creating a new /detached route, you're missing a bunch of important code and duplicating the most complex part of the application, which is the signaling. Just re-use the device.$id.tsx route and simply add a query parameter for the detached mode.

// Height constants for window sizing
const VIDEO_HEIGHT = 720;
const DETACHED_TOOLBAR_HEIGHT = 32; // h-8 = 32px
const ACTION_BAR_HEIGHT = 40; // min-h-[39.5px] ≈ 40px
Copy link
Contributor

Choose a reason for hiding this comment

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

This wont last long, I would suggest just set an arbitrary window size as it's the initial window size. The user can resize according to their needs if they don't like it.

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