Skip to content

Add column sorting and per-column filters to dashboard#2

Open
rocklambros wants to merge 5 commits into
zenitysec:mainfrom
rocklambros:dashboard-column-sort-filter
Open

Add column sorting and per-column filters to dashboard#2
rocklambros wants to merge 5 commits into
zenitysec:mainfrom
rocklambros:dashboard-column-sort-filter

Conversation

@rocklambros
Copy link
Copy Markdown

Summary

  • Column sorting: Click any column header to cycle through ascending, descending, and unsorted. Active sort shows an accent-colored arrow indicator.
  • Per-column filters: A new filter row below the headers provides text inputs for each column (time, action, stage, tool, session, reason, latency). Filters are case-insensitive substring matches.
  • Both features work alongside the existing toolbar filters (action checkboxes, stage dropdown, search box).

Test plan

  • Load dashboard with existing events and verify all columns render
  • Click each column header and confirm sort cycles: asc -> desc -> none
  • Type in column filter inputs and verify rows filter in real-time
  • Combine column filters with toolbar filters (action checkboxes, stage, search)
  • Verify SSE live events still append correctly when sorting is active
  • Check auto-scroll behavior with active sort/filters

🤖 Generated with Claude Code

rocklambros and others added 5 commits April 1, 2026 06:35
Every column header is now clickable to cycle through ascending,
descending, and no-sort states. A filter row below the header
provides per-column text filtering. Both work alongside the
existing toolbar filters (action checkboxes, stage dropdown,
search).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All events in the store have action=allow, but the allow checkbox
was unchecked by default, causing every event to be filtered out
and the dashboard to appear empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Root cause: the history API capped at 500 events and the frontend
requested exactly 500. When the most recent 500+ events are all
"allow" (with allow unchecked by default), the non-allow events
(blocked, redacted, detected) fell outside that window and never
reached the browser — even though stats reflected the full store.

Fix: raise the API max to 10,000 (matching the store ring buffer
size) and request all events from the frontend. Also reverts the
incorrect allow-checkbox-checked change from the prior commit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The history API previously returned the N most recent events
regardless of filters, then the frontend filtered client-side.
When the most recent events were all one action type, other action
types never reached the browser despite existing in the store.

Now the API accepts multi-value `actions`, `stage`, `start_ts`,
and `end_ts` query parameters and filters before applying the
limit. The frontend re-fetches when these toolbar filters change,
keeping search and column filters as fast client-side post-filters.

Also restores the datetime range picker and date+time column
display from the dashboard-datetime-filter branch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The history API now accepts multi-value `actions`, `stage`,
`start_ts`, and `end_ts` query parameters.  Filters are applied
before the limit slice so the 500-event window always contains
matching results.  The frontend re-fetches when toolbar filters
change; search and column filters remain client-side.

Also adds seed-dashboard.py to generate 100 synthetic events
covering all action types (block, redact, detect, allow) with
varied tools, sessions, stages, and timestamps across 30 days.

Restores datetime range picker and date+time column display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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