Commit Graph

8 Commits

Author SHA1 Message Date
Brian Krabach abe6a97241 fix: use ResizeObserver for terminal refit after sidebar toggle
The previous transitionend approach (v0.4.5) had a { once: true } bug:
the sidebar transitions two CSS properties (width and min-width), and if
min-width fired first, the listener self-destructed before the width event
arrived — so _refitTerminal() was never called.

Replace the fragile event-based approach with a ResizeObserver on
#terminal-container. This automatically calls _fitAddon.fit() (debounced
50ms) whenever the container dimensions change, handling sidebar toggle,
browser resize, and any future layout change. Remove the now-unnecessary
window._refitTerminal global and the broken transitionend handler.

Bumps version to 0.4.6.
2026-05-02 07:45:11 -07:00
Brian Krabach 538d11165c fix: refit terminal after sidebar toggle animation completes
toggleSidebar() flipped the sidebar--collapsed CSS class but never told
xterm.js to recalculate its dimensions. The terminal canvas kept its old
column/row count until a new session was opened (which creates a fresh
terminal that measures correctly on first fit()).

Fix: expose window._refitTerminal() from terminal.js, then call it via
a transitionend listener in toggleSidebar() so the terminal refits once
the 250ms CSS width/transform transition finishes.

Bumps version to 0.4.5.
2026-05-02 07:08:18 -07:00
Brian Krabach 493eed5a60 test: update renderSidebar regex to match 3-parameter signature
The test regexes matched `renderSidebar(\w+,\s*\w+)` (exactly 2 params)
but the fix in 821c595 added a third `currentRemoteId` parameter.
Updated to use `\(.*?\)` which matches any parameter count.

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
2026-05-02 06:57:20 -07:00
Brian Krabach 783611d143 fix: filter hidden sessions in browser indicators + add federation plan 2026-04-08 20:32:19 -07:00
Brian Krabach 4b0718eff9 fix: terminal.js fontSize regression and stale test references
Issue 1 (CRITICAL): terminal.js createTerminal() read fontSize from
localStorage.getItem('muxplex.display'), which always returns null after
the server-settings migration. This caused terminal font size to permanently
default to 14 regardless of the server-side fontSize setting.

Fix: Pass getDisplaySettings().fontSize from app.js to window._openTerminal
as a third argument. Update openTerminal(name, remoteId, fontSize) and
createTerminal(fontSize) to use the parameter, removing all localStorage
reads from terminal.js.

Issue 2: Fix 9 stale test references in test_app.mjs that set
_localStorageStore['muxplex.display'] instead of app._setServerSettings().
Tests now correctly exercise the server-settings path.

Issue 3: Fix stale initSidebar test that used
delete _localStorageStore['muxplex.sidebarOpen'] — replaced with
app._setServerSettings(null) since initSidebar reads from _serverSettings.

Also update 5 Python tests in test_frontend_js.py that were checking the
old localStorage-based createTerminal() behavior:
- Renamed test_create_terminal_reads_font_size_from_localstorage to
  test_create_terminal_accepts_font_size_parameter
- Renamed test_create_terminal_parses_json_for_font_size to
  test_create_terminal_does_not_parse_json_from_localstorage
- Updated 3 remaining tests to use regex that matches createTerminal(fontSize)
  instead of createTerminal()

Verification:
- grep -rn 'localStorage' app.js: only tmux-web-device-id (3 lines)
- grep -rn 'muxplex\.display|muxplex\.sidebarOpen' frontend/: zero matches
- All 372 JS tests pass (44 terminal + 328 app)
- All 199 Python frontend_js tests pass
2026-04-08 12:39:08 -07:00
Brian Krabach 3494ca6f76 chore: update uv.lock with resolved cryptography transitive deps 2026-04-04 14:59:01 -07:00
Brian Krabach d0fe9cda67 chore: Phase 1 complete — all backend proxy tests pass 2026-04-01 12:33:17 -07:00
Brian Krabach ac0b84c1d9 feat: openSession — full remote routing via sourceUrl 2026-03-31 03:40:57 -07:00