Repository navigation
Conversation
… toggle group, sheet and form primitives
…s pages; remove rail controls
…s across activation
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.
Note
🤖 GPT-6.1-Sol on behalf of Oliver
Why
Oliver asked for a more modern dashboard built from familiar shared components, and picked option A ("Console", in the Vercel/Geist style) from three mockups. This PR stacks on #135. It restyles the app on shadcn-svelte (bits-ui) primitives and removes the hand-rolled rail controls. Chart rendering is unchanged apart from theme tokens.
What changed
Shell. The top bar now reads Logo / dataset switcher (a Popover with a searchable Command list), then a ⌘K command menu and the theme toggle on the right. Below it is a row of underline tabs: Dashboard, Files, Alerts. On the home page the tabs are Datasets and Files.
One filter toolbar instead of the left rail. The toolbar holds:
YYYY-MM-DDfields. The presets are Last day, Last 7 days, Last 30 days and All available.Each control shows its current value in muted text and wraps at narrow widths.
KPI row. Four cards show totals for the selected window: Flows (with TCP share), Packets (per flow), Bytes (per packet), and Complete buckets (with partial/unknown counts). They're computed from the
/api/netflow/statswindow the traffic card already uses. No new query and no "vs prior" deltas. Unique-IP counts aren't summed.Chart cards. Each header has the drag handle and title on the left. The right side holds segmented ToggleGroups, a Metrics/Ranges checklist popover, and a
⋯DropdownMenu (Move up/down, Taller/Shorter). These replace the old title-bar buttons and keep drag reorder and native resize. Cards stay in the packed single column.Visual system. Neutral Geist-like greys, 1px borders, an 8px radius, a small card shadow and tabular numbers. Blue
#2563ebis used only for selection, focus and data. Light and dark themes both got full token sets, and the chart grid/axis tokens were retuned for the new surfaces.Other pages use the same shell:
?datasetin sync with the top bar.Removed: AnalysisLayout, FilterSheet, ControlPopover, SegmentedControl, CardLayoutControls, DragGrip, PrimaryFilters, RouterFilter, DateRangeFilter, MetricSelector, Direction/MAAD filters and DatasetTabs. Filter and metric semantics still live in the existing modules (
schemas.ts,chart-utils.ts, thetypes.tsoptions).Logic and accessibility review
GPT-6.1-Sol reviewed the full diff against
feat/redesignand hardened the following paths:The shared page-load stats request and date-preset decisions are retained. Immediate KPIs need that request, and activating the Traffic card reuses it. Selected-end-date presets support historical captures. "All available" keeps the existing configured dataset-start-to-today window; dataset summaries currently provide no last-available date.
Regression coverage in
console-accessibility.spec.tsandconsole-window.spec.tschecks menu Tab order, slow list loading, dialog naming and cancellation, focus after placeholder activation, reversed windows and cached-window totals. Keyboard command-menu focus was also checked at 390px and 1280px using the fixture dataset. No deployment was changed during the review.Design screenshots (Playwright fixture data, viewport captures)
Each sheet shows Before (#135) next to the console design before the logic review, in light and dark. The review moves the narrow card menu after its controls so visual order matches keyboard order.
Human review guide
Setup:
bun install, thenbun run dev:webagainst any dataset. Alternatively,bun run test:e2eseeds the Playwright fixture (playwrightandplaywright-external-maad). The perf stage on :8090 runs the initial console design on uoregon-v5 (read-only). The review commits have not been redeployed there.Flows to try
2025-02-31(the field is flagged and the URL is unchanged).⋯menu on several cards: move up/down and taller/shorter by keyboard. Focus should return to the menu trigger after a move or resize, and the order should persist across reloads. Tab and Shift+Tab should leave the menu normally, in the same order as the visible controls. Drag reorder and the native resize corner should still work.202503010200→ file detail: change the MAAD toggles and use Next File.Edge cases
⋯menu, and moving a card mounts it.Decisions to review
netflow-stats-data.svelte.ts, asserted indashboard-lazy-charts).Verification
Automated (all passing)
bun run format,bun run lint(eslint, infra and clippy) andbun run typecheck(svelte-check: 0 errors, 0 warnings).bun run test:web: 246 tests. New:tests/lib/console-ui.test.tscovers date presets and validation, window totals and shell routing. The stats route test also covers exclusive end bounds, complete zero-valued buckets, partial observations and unknown coverage.bun run test:e2erun serially (--workers=1) against the production build: 110 passed.console-ui.spec.tscovers:/api/netflow/statsresponse;⋯menu move and resize with focus retained;tests/e2e/toolbar-helpers.ts.redesign.spec.ts(which tested the old rail and sheet) was replaced.bun run perf:bundlefor feat(web): redesign analysis as an Ops console #135 and this branch, measured withmeasureBundles(gzip)://datasets/[dataset]/datasets/[dataset]/alerts/netflow/files/netflow/files/[slug]The cost is bits-ui:
@internationalized/dateare split into chunks that load on first open.The first cut was +21.5 KiB on
/and +45 KiB on the dashboard. Lazy-loading the palette, the lists and the calendar brought that down to about +10 KiB and +19 KiB. The CSS growth comes from component utility classes.Manual checks done
teststage container was verified unchanged.Remaining manual checks
Design and implementation by Claude Opus 5.5 in Claude Code. Review fixes by GPT-6.1-Sol through the Codex harness in T3 Code.