Skip to content

refactor: combined routerview with IPv4/IPv6 support#93

Merged
larkly merged 3 commits intomainfrom
refactor/routerview
Mar 29, 2026
Merged

refactor: combined routerview with IPv4/IPv6 support#93
larkly merged 3 commits intomainfrom
refactor/routerview

Conversation

@larkly
Copy link
Copy Markdown
Owner

@larkly larkly commented Mar 29, 2026

Summary

  • Replace separate routerlist + routerdetail with a single combined routerview, matching the networkview and secgroupview pattern
  • Multi-pane layout: Selector, Info, Interfaces, and Routes panes with Tab navigation and context-sensitive action bar
  • Split ExternalGatewayIP into separate ExternalGatewayIPv4/IPv6 fields so both are always visible
  • Router detail info shows gateway network name, IPv6, and IPv4 on labeled lines
  • Interfaces pane resolves network names via subnet lookups
  • Refresh tick chains after data arrives instead of firing on a fixed interval, preventing request pileup on slow connections

Test plan

  • Router tab shows combined view with selector + info + interfaces + routes panes
  • Tab key cycles through panes, arrow keys navigate within focused pane
  • Both IPv4 and IPv6 gateway addresses visible in info pane
  • Ctrl+N/Ctrl+D work from selector, Ctrl+A/Ctrl+T from interfaces pane
  • Narrow terminal (<80 chars) stacks panes vertically
  • No port exhaustion errors on slow API connections
  • go build ./... and go test ./... pass

larkly added 3 commits March 29, 2026 19:36
Consolidate the separate router list and detail views into a single
combined view matching the networkview and secgroupview pattern.

The new routerview uses a multi-pane layout with:
- Selector pane: router list with name, external network, and status
- Info pane: router properties including separate IPv4/IPv6 gateway
- Interfaces pane: table with network name, IP, and port ID
- Routes pane: static routes with destination and next hop

All panes are navigable via Tab, with context-sensitive action bar.
Responsive layout switches between wide (split) and narrow (stacked).
Move ListNetworks and ListSubnets into fetchRouters (list-level fetch)
instead of calling them on every fetchDetail tick. Detail fetch now only
calls ListRouterInterfaces — 1 API call instead of 3 per tick, matching
the networkview pattern. Also widen info pane label column for readability.
…llel

Start the refresh timer only after fetchRouters completes (success or
error), so the interval is measured from data arrival, not from the
previous tick. If a fetch takes 3s and the interval is 2s, the next
fetch now starts 5s after the previous one instead of overlapping.
@larkly larkly merged commit 0e82619 into main Mar 29, 2026
2 checks passed
@larkly larkly deleted the refactor/routerview branch March 29, 2026 17:37
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