feat(dashboard): three-pane workspace + rebuilt analytics#38
Merged
Conversation
The old sidebar + main + modal-drawer worked when the dashboard was a list of recent requests, but the drawer hurts triage: opening it loses the table context, dismissing it loses the selection, and the animation adds friction to clicking row after row. Three-pane (icon rail · request list · persistent detail) keeps the selection alive in the right pane, which is the Mail.app / Linear pattern for this kind of workflow. Views in the rail are Inbox, Errors, Slow, Analytics, Environment. Errors filters to >= 400 and Slow filters to >= 200ms — they are triage destinations, not just nav. The list pane has a search input and status-class chips; the detail pane has Overview / Headers / Body / Trace / Performance tabs with inline Replay / Compare / Copy cURL. Analytics rebuild: - discrete bars per time bucket; the previous area path implied continuous data between buckets, which lies when traffic is bursty - errors stacked on each bar in red - p50 / p95 / p99 / max prominent in the hero, with amber tinting past 500ms / 1s - status donut and a latency-bucket histogram (color-coded by speed) - endpoints table sorted by p95, each row with a heat bar - export / import collapsed into a Data dropdown in the header, replacing the old ExportImport card Backend: handler.go SSE was seeding lastSeen as "" after writing the snapshot, so the first tick re-emitted the entire snapshot as an append event and the client prepended duplicates. lastSeen now seeds from the snapshot's newest ID. Removes the SimpleSidebar, RequestDrawer, RequestTable, StatsDashboard, Filters, ResponseTimeChart, ExportImport components and the ui/drawer / ui/sheet / ui/sidebar / ui/tooltip primitives, plus the unused use-mobile hook and react-compat shim. All superseded by the new panes or unused after the migration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The old sidebar + main + modal-drawer worked when the dashboard was just
"a list of recent requests", but the drawer hurts triage: opening it
hides the table, dismissing it drops the selection, and clicking through
ten requests is ten animations. Three-pane (rail · list · persistent
detail) keeps the selection alive on the right while the list stays
visible on the left. Same pattern as Mail.app, Linear, and the browser
DevTools Network panel.
Layout
Performance tabs, with inline Replay / Compare / Copy cURL
Errors and Slow are auto-filtered (status >= 400, duration >= 200ms) so
the rail isn't just navigation, it's a triage tool. Analytics and
Environment swap the list+detail for a full-width page.
Analytics rebuild
The old analytics page was a card with a chart and a card with export
buttons. The chart used an area path which silently smooths between
buckets — fine for continuous metrics, misleading for the bursty traffic
HTTP servers actually see. Switched to discrete bars stacked with error
counts in red. Plus:
Backend
One server fix in
handler.go: SSE was seedinglastSeen = ""afterwriting the initial snapshot, so the first tick re-emitted the whole
snapshot as an `append` event and the client prepended duplicates.
Now seeds from the snapshot's newest ID.
Removed
`SimpleSidebar`, `RequestDrawer`, `RequestTable`, `StatsDashboard`,
`Filters`, `ResponseTimeChart`, `ExportImport`, plus the
`ui/drawer` / `ui/sheet` / `ui/sidebar` / `ui/tooltip` primitives,
the `use-mobile` hook, and the `react-compat` shim. All superseded
by the new panes or unused after the migration.
Testing
in Playwright against the profiling example. Verified live SSE updates
no longer duplicate, the slow / errors filters land where expected,
and the Analytics charts populate correctly under sparse data.
Compatibility
UI-only change. The HTTP API the dashboard hits is unchanged. Anyone
running govisual upgrades transparently — they just see the new layout
the next time they load `/__viz`.