Skip to content

feat(dashboard/audit): move filters into right-docked drawer#3254

Merged
houko merged 1 commit into
mainfrom
feat/audit-filters-as-drawer
Apr 26, 2026
Merged

feat(dashboard/audit): move filters into right-docked drawer#3254
houko merged 1 commit into
mainfrom
feat/audit-filters-as-drawer

Conversation

@houko

@houko houko commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Summary

The audit page's filter card sat at the top above the results: sticky, ~80–250px tall depending on expand state. Above the fold meant fewer rows visible; below the fold the operator had to scroll back up to refilter. Move the form into a right-docked panel-right Modal that opens on the existing Filters button.

The slim inline strip kept above results carries:

  • Filters trigger with the same active-count badge
  • Drilled-in active filter chips (still removable in-place)
  • Clear-all shortcut

Drawer body restructured for its narrower width

  • Single-column field stack instead of the old 3-col grid — reads top-down without horizontal scanning.
  • Sticky Reset / Apply footer at the bottom so commits stay reachable on short viewports.
  • Quick-range presets close the drawer on click (apply-and-go).
  • Apply also closes the drawer (chip strip already shows what's active).

Why panel-right instead of drawer-right

panel-right (dim backdrop, click-outside closes) — the form is modal: tweaks aren't live, the operator commits via Apply. The dim backdrop signals that and gives Esc / click-outside as the standard dismiss paths. drawer-right makes more sense for inspector views where the underlying list stays interactive; the audit filter form is the opposite shape.

Test plan

  • Open /dashboard/audit → filter strip renders as a single inline row (no big card).
  • Click Filters → drawer slides in from the right with the form.
  • Pick a quick-range preset → drawer closes, results refilter.
  • Apply with custom fields → drawer closes, chips appear in the inline strip.
  • Click a chip ✕ or Clear all → filter drops without opening the drawer.
  • Esc / click backdrop → drawer dismisses without committing.

The collapsible filter card sat at the top of the page above the
results, sticky and ~80–250px tall depending on expand state. Above
the fold meant fewer rows visible; below the fold the operator had
to scroll back up to refilter. Move the form into a right-docked
panel-right Modal that opens on the existing 'Filters' button.

Inline strip kept above results carries:
- 'Filters' trigger with the same active-count badge
- Drilled-in active filter chips (still removable in-place)
- Clear-all shortcut

Drawer body restructured for its narrower width: single-column field
stack instead of the 3-col grid, sticky Reset / Apply footer at the
bottom so commits stay reachable on short viewports. Quick-range
presets close the drawer on click (apply-and-go), Apply also closes
the drawer (the chip strip already shows what's active).

panel-right (not drawer-right) because the form is modal — tweaks
aren't live, the operator commits via Apply, dim backdrop signals
that and Esc / click-outside dismiss.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@houko
houko merged commit 85b12fc into main Apr 26, 2026
15 checks passed
@houko
houko deleted the feat/audit-filters-as-drawer branch April 26, 2026 15:15
@houko houko mentioned this pull request Apr 26, 2026
@github-actions github-actions Bot added ready-for-review PR is ready for maintainer review no-rust-required This task does not require Rust knowledge size/L 250-999 lines changed and removed ready-for-review PR is ready for maintainer review labels Apr 26, 2026
houko added a commit that referenced this pull request Apr 27, 2026
…tons (#3289)

The 1h / 24h / today / 7d / 30d quick-pick buttons in the audit filter
drawer call `applyDatePreset(p)` (AuditPage.tsx:786) but the function
itself was never defined — so `pnpm typecheck` errored on
`Cannot find name 'applyDatePreset'` and the buttons crashed at
runtime when clicked.

Add the function inline next to `onClearAll`. Behavior matches the
spec already documented at line 297: snap `draft.from` to the
preset's `since()` value, clear `draft.to`, and push the change into
`active` so the audit query refetches without the operator having to
press Apply.

Closes the typecheck regression introduced when filters were moved
into the right-docked drawer (#3254).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-rust-required This task does not require Rust knowledge size/L 250-999 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant