Skip to content

v0.2.0: Drops tab, conntrack state bars, connections sub-tabs, UI polish#1

Merged
ibehren1 merged 8 commits into
mainfrom
v0.2.0
Jun 25, 2026
Merged

v0.2.0: Drops tab, conntrack state bars, connections sub-tabs, UI polish#1
ibehren1 merged 8 commits into
mainfrom
v0.2.0

Conversation

@ibehren1

Copy link
Copy Markdown
Owner

Summary

UI and layout improvements for fwtop, targeting the v0.2.0 release.

Changes

Drops heatmap → its own tab

  • Promoted the smoke→fire drops heatmap out of the Overview right column into a dedicated full-screen Drops tab (key 4), so it can use the whole window for more rules and history.

Conntrack panel

  • TCP states now render as a bar graph instead of a cramped text line, color-coded like the Connections tab (ESTABLISHED green, transient/closing orange).
  • States and protocols use a fixed display order — only bar lengths change tick to tick, never row order.
  • Protocol and state bar graphs share field widths so the two sets line up exactly.

Connections tab

  • Replaced the side-by-side two-column layout with WAN and LAN sub-tabs (keys w / l), each a full-width table with a live flow count in its label.
  • Both source and destination (and the NAT reply) are reverse-DNS resolved when resolution is enabled.
  • Columns stretch to fill the terminal width — fixed widths for Proto/State/Packets/Bytes, with Source/Destination/NAT dividing the remainder by weight, recomputed on resize and on sub-tab reveal.

Interfaces panel

  • Rates are now always shown in Mbps in fixed-width columns sized for up to 100,000 Mbps (100 Gbps), so columns no longer resize as values change.
  • RX/TX rate column headers right-justified over their values.

Notes

  • Version bumped to 0.2.0.
  • Screenshots regenerated (Overview, Drops, Connections).
  • README and keybindings updated throughout.
  • Verified each change headlessly via Textual's run_test (tab navigation, column widths at multiple terminal sizes, static bar ordering, resolution of both endpoints).

ibehren1 added 8 commits June 25, 2026 10:21
The drops heatmap was crammed into the Overview tab's right column,
capped at 12 rows. Promote it to a dedicated full-screen Drops tab
(key '4') so it can use the full window for more rules and history.

- Overview right column now just charts + Interfaces table
- New 'drops' TabPane + '4' keybinding
- tcss: heatmap joins the full-bleed tab panels (1fr height)
- Regenerated Overview screenshot (heatmap removed); added drops.svg
- README: new Drops tab section, keybinding, screenshot
- Bump version to 0.2.0
The RX/TX rate cells auto-scaled (bps/Kbps/Mbps/Gbps), so their text
width changed with the value and columns resized tick to tick.

- Add format_mbps(): always Mbps, numeric field right-justified to fit
  100,000.00 (100 Gbps) so the string is constant width
- Pin all InterfaceTable columns to fixed widths (auto_width=False);
  update_cell uses update_width=False so they never grow
- Regenerate Overview screenshot

The Summary panel keeps the auto-scaling format_bits_rate for its
compact at-a-glance throughput readout.
The rate headers sat left-aligned over right-aligned Mbps values.
Set justify=right on the RX rate / TX rate column labels so the
headers line up with the numbers below them.
The state breakdown was a cramped single text line (STATE=n  STATE=n).
Show it as color-coded bars like the protocol breakdown above it,
scaled to the busiest state, with counts right-aligned.

- ESTABLISHED green, transient/closing states orange (matching the
  Connections tab's state coloring)
- Capped at 5 states so the panel fits on shorter terminals
- Regenerate Overview screenshot; update README
- Render protocols and states in fixed orders so rows never reshuffle;
  only bar lengths change tick to tick. Missing states show an empty bar.
- Share label/count/bar field widths between both graphs via a common
  _bar_row helper so the two sets of bars line up exactly.
- Regenerate Overview screenshot.
- Replace the side-by-side two-column layout with nested WAN and LAN
  sub-tabs (full-width tables, live count in each tab label)
- Add app-level w/l bindings to jump to the Connections tab and select
  the WAN/LAN sub-tab; show_sub() on the widget drives the nested tabs
- Give the top-level TabbedContent id=main-tabs and scope all queries to
  it, since there are now two TabbedContents in the tree
- Source and destination (and the NAT reply) are all reverse-DNS
  resolved when resolution is enabled
- Regenerate connections screenshot; update README + keybindings
The DataTable columns auto-sized to content, leaving dead space on the
right. Pin the small columns (Proto/State/Packets/Bytes) to fixed
widths and divide the remaining width among Source/Destination/NAT by
weight, recomputed on resize so the table always fills the terminal.

Regenerate connections screenshot.
The LAN table was size 0 while its sub-tab was hidden, so its flex
columns stayed pinned at the minimum and didn't stretch when the tab
was first shown.

- Recompute column widths on TabActivated (deferred via
  call_after_refresh so the table has its real laid-out width)
- Also re-stretch in _fill each tick, and skip size-0 tables in the
  general resize path
- Extract _size_table() to size a single DataTable
@ibehren1 ibehren1 self-assigned this Jun 25, 2026
@ibehren1
ibehren1 merged commit 6b48f0a into main Jun 25, 2026
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