Skip to content

feat: give the ui some love - #12

Merged
boyvinall merged 8 commits into
mainfrom
ui
Sep 8, 2026
Merged

boyvinall merged 8 commits into
mainfrom
ui

Conversation

@boyvinall

@boyvinall boyvinall commented Sep 8, 2026

Copy link
Copy Markdown
Owner

bunch of ui updates:

  • add borders, improve colours
  • filter by IPv4, IPv6, RFC1918 remote, interface
  • default sort by PID - reduces the amount of bouncing around that rows do, so you can actually follow things more easily
  • add events panel

to support filter by interface, enable capturing on multiple interfaces and update the config/flags for that

Add a second bordered panel below Connections showing a time-sorted,
interleaved feed of the capture-only event streams already carried on
aggregate.Snapshot (SYN, RST, DNS query, DNS error), backed by a
500-entry ring buffer on Model since Snapshot itself drops these
streams on the next Refresh.

Tab cycles focus between the two panels (Connections focused by
default); Enter zooms the focused panel to full height, Esc restores.
Movement keys target whichever panel has focus. The divider between
the panels is mouse-draggable to resize; the unfocused panel's title
and border render in a dimmer color.
- New DNSAnswerFinding/AnswerPassiveInspector in dpi, mirroring the
  existing query/error findings; DNSAnswerInspector.InspectAnswer reports
  each successful A/AAAA answer record.
- capture gets a dnsAnswers ring buffer and DrainDNSAnswers, wired into
  inspectPassive alongside the existing query/error drains.
- aggregate.Snapshot carries DNSAnswers, drained each Refresh.
- TUI events panel gains a DNS A row kind, and now auto-scrolls: the
  cursor follows the most-recently-received event by default, and the
  highlighted row renders regardless of which panel has focus.
- The events panel's own scroll window (eventsWindowTop) now moves only
  as far as needed to keep the cursor visible, so arrow keys move the
  highlight freely within view instead of re-anchoring it to an edge on
  every render.
- dpi.DNSAnswerFinding carries TTL now, populated from the resource
  record; the events panel's DNS-answer info string includes it.
- Events panel gets a dedicated LVL column (INFO/ERR, green/red) instead
  of coloring the whole row by severity; every other cell stays plain.
- Receiver's SYN/DNS-query log records now set SeverityNumber/Text=Info,
  matching the same severity mapping.
- Fix: the selection highlight went dead for every column after LVL.
  Wrapping an already-rendered (and already-reset) LVL cell inside
  styles.Selected.Render(wholeLine) let the LVL cell's own SGR reset
  clear the outer Reverse for the rest of the line, since a terminal
  reset isn't scoped to the style that emitted it. renderEventRow now
  builds each cell with its own self-contained style (severity color
  combined with Reverse on LVL, plain Reverse elsewhere) instead of
  nesting a pre-rendered string inside another Render call.
@boyvinall
boyvinall merged commit a0152ca into main Sep 8, 2026
3 checks passed
@boyvinall
boyvinall deleted the ui branch September 8, 2026 19:23
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