Skip to content

feat(tunnels): group tunnels page by machine + add search#81

Merged
smalex-z merged 1 commit intomainfrom
feat/tunnels-group-by-machine
Apr 30, 2026
Merged

feat(tunnels): group tunnels page by machine + add search#81
smalex-z merged 1 commit intomainfrom
feat/tunnels-group-by-machine

Conversation

@smalex-z
Copy link
Copy Markdown
Owner

Description

Resolves #__

A flat tunnel table forces users to scan the Machine column to mentally re-group rows; with multiple machines it gets unreadable fast. Group tunnels by machine into table sections, with a section header per machine showing name, status, tunnel count, and a per-section "+ Add tunnel" shortcut that pre-selects the machine in the create modal. The synthetic SSH-base row pins to the top of its machine's group; remaining tunnels sort alphabetically. Add a top-of-page search box that filters across tunnel name, subdomain, machine name, and either port — sections with no matches drop out automatically.

Changes Made

Testing

  • Tested locally
  • Added/updated unit tests
  • All tests passing

Screenshots (if applicable)

A flat tunnel table forces users to scan the Machine column to mentally
re-group rows; with multiple machines it gets unreadable fast. Group
tunnels by machine into table sections, with a section header per machine
showing name, status, tunnel count, and a per-section "+ Add tunnel"
shortcut that pre-selects the machine in the create modal. The synthetic
SSH-base row pins to the top of its machine's group; remaining tunnels
sort alphabetically. Add a top-of-page search box that filters across
tunnel name, subdomain, machine name, and either port — sections with no
matches drop out automatically.

Implementation notes:
- Multiple <tbody> elements per <table> keeps column alignment intact
  (single visual table, multiple row groups). Section header is a
  colSpan=5 row inside each tbody.
- Wrap tunnels/machines in useMemo so the grouping memo doesn't churn
  on every render — react-query gives us stable payloads but `?? []`
  was minting fresh arrays on each call.
- openAddModal now takes an optional machineId; the page-header button
  passes nothing (the modal's existing machine picker takes over),
  the per-section button pre-fills it.
@github-actions
Copy link
Copy Markdown

Unit tests run: 249
Unit tests passed: 249
Test coverage: 32.8%

@smalex-z smalex-z merged commit c604b4d into main Apr 30, 2026
5 checks passed
@smalex-z smalex-z deleted the feat/tunnels-group-by-machine branch April 30, 2026 11:24
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