Skip to content

feat: order Packets oldest-top/newest-bottom with up/down row navigation - #22

Merged
sg merged 1 commit into
mainfrom
feat/packets-order-keynav
Jun 16, 2026
Merged

sg merged 1 commit into
mainfrom
feat/packets-order-keynav

Conversation

@sg

@sg sg commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary

Two Packets-screen changes:

  1. Oldest at top, newest at the bottom (reverse of before). New packets append to the bottom and older rows scroll up — like a log/terminal tail.
  2. Up/Down arrow keys move to the previous/next row, selecting it and showing it in the Inspector.

Changes (web-ui/src/views/Packets.vue)

  • Initial load reverses the API's newest-first list and scrolls to the bottom.
  • WS packets now push to the bottom (was unshift); the 500-cap trims the oldest via shift (was pop).
  • Auto-tail: a new packet scrolls to the bottom only if the user is already at the bottom, so it won't yank focus while they're scrolled up reading an older packet.
  • Keyboard nav: a keydown listener (mounted only for this view) — Up = previous (older/above), Down = next (newer/below). Selects the row, loads it in the Inspector, and scrollIntoView({block:'nearest'}). Ignores arrows when focus is in input/select/textarea or with Ctrl/Cmd/Alt; preventDefaults page scroll. With nothing selected, the first arrow selects the newest row.
  • Rebuilt webapi/static/ assets.

Testing

Front-end only. npm run build clean (no JS test harness in the repo).

@sg
sg merged commit 39f70b6 into main Jun 16, 2026
1 check passed
@sg
sg deleted the feat/packets-order-keynav branch June 16, 2026 04:45
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