Skip to content

feat(gui): add Sessions & Connections section#154

Merged
kianwoon merged 1 commit intomainfrom
feat/gui-sessions-section
Apr 3, 2026
Merged

feat(gui): add Sessions & Connections section#154
kianwoon merged 1 commit intomainfrom
feat/gui-sessions-section

Conversation

@kianwoon
Copy link
Copy Markdown
Owner

@kianwoon kianwoon commented Apr 3, 2026

Summary

  • Add a new "Sessions" section to the Tauri GUI showing active sessions, connection counts per provider, request stats, and last-seen time
  • Uses existing sessionStats from WebSocket summary messages — no new backend endpoints needed
  • Keyed DOM diffing (sessionRows Map) for efficient real-time updates

Changes

  • index.html: Add #sessions-section between Providers and Recent Requests
  • app.js: Add renderSessions() with keyed DOM diffing, DOM refs, section ordering
  • styles.css: Add session card styles, fix flex layout (flex-shrink: 0 removed), fix compact mode transitions (max-height: none2000px), show 2 sections in compact mode
  • tauri.conf.json: Increase window height 800→960, compact height 420→560

Test plan

  • Launch GUI — Sessions section appears between Providers and Recent Requests
  • Active sessions show truncated ID, connection count badge, request count, last-seen time
  • Session rows update in real-time as requests flow through
  • Compact mode shows 2 sections (Models + Providers) with proper height
  • Toggle compact mode on/off preserves all section visibility

- Add sessions section between Providers and Recent, showing active
  session IDs, connection count per provider, request count, and
  last-seen time
- Use keyed DOM diffing (sessionRows Map) for efficient real-time
  updates via existing WebSocket summary messages
- Increase window height 800→960px and compact mode 420→560px to
  accommodate the new section
- Show 2 sections in compact mode instead of 1
- Fix compact mode toggle by using numeric max-height for CSS
  transitions instead of max-height: none
- Fix section flex layout by removing flex-shrink: 0 so sections
  properly distribute available viewport space
@kianwoon
Copy link
Copy Markdown
Owner Author

kianwoon commented Apr 3, 2026

CI Failure — Not related to this PR

The failing test emits SSE error event when body stalls after headers received (tests/proxy.test.ts:398) is a pre-existing flaky timeout test in the stall detection suite:

  • Node 20: PASS
  • Node 22: FAIL ❌ (20s timeout)

This test was not modified by this PR. The PR only changes GUI frontend files (HTML/CSS/JS + Tauri config) — no backend or test changes.

Rerunning the CI job should pass.

@kianwoon kianwoon merged commit c2067a2 into main Apr 3, 2026
6 of 7 checks passed
@kianwoon kianwoon deleted the feat/gui-sessions-section branch April 3, 2026 11:49
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.

1 participant