2.0 KiB
herdr-web-ui: mirror cursor visibility fix (local patch)
Problem
In the herdr-web-ui remote PC mirror (Windows without terminal attach), the mirror
emitted \x1b[?25l to hide the terminal cursor. As a result, the cursor was not
visible in the browser terminal for mirrored panes.
Root cause
server/mirror.ts explicitly hides the cursor in:
mirrorFrame()— initial/whole framesmirrorRows()— incremental row diffs
The mirror paints the last row last, leaving the cursor position at the end of the last
painted row, but \x1b[?25l prevents xterm.js from drawing it.
Fix (local hack, minimal)
Changed cursor visibility from hidden → visible:
mirrorFrame():\x1b[?25l→\x1b[?25hmirrorRows():\x1b[?25l→\x1b[?25h
This is purely a DECTCEM visibility toggle. Cursor positioning and the client's "pan to cursor" behavior are unchanged. For a shell prompt (last row is the prompt), the cursor appears exactly at the end of the prompt.
Files patched
- sapphira plugin source:
/home/oqyude/.config/herdr/plugins/github/devswha.herdr-web-ui-*/server/mirror.ts - vetymae bundle (running bridge):
%LOCALAPPDATA%\herdr-web-ui\remote-v27\server\mirror.ts- backup:
%LOCALAPPDATA%\herdr-web-ui\remote-v27\server\mirror.ts.bak-20261016-164122
- backup:
Verification
- Bridge on vetymae restarted (auto-respawned) and loaded patched code.
- User reported: cursor is visible and responsiveness improved.
Trade-offs / caveats
- Local hack on vendored bundle; may be overwritten on plugin update or bundle re-upload.
- For full-screen TUIs (btop, opencode TUI), a cursor may now be visible at the end of the last row (bottom) even if the app hides/owns its own cursor — acceptable in practice for this setup.
- Positioning is not explicitly computed as "end of last non-empty row" (kept minimal); works well for shell prompts.
Recommendation
Keep as-is. If cursor disappears after a plugin update, reapply the same two changes. Consider documenting in repo notes if this plugin is forked/maintained locally.