Skip to content

feat(ui): collapse guardrails and gate advanced filters (#113) - #116

Merged
NicoGenti merged 1 commit into
mainfrom
feat/issue-113-webui-compaction
Nov 20, 2026
Merged

NicoGenti merged 1 commit into
mainfrom
feat/issue-113-webui-compaction

Conversation

@NicoGenti

Copy link
Copy Markdown
Owner

Closes #113

Summary

  • Guardrails advisory block is now a collapsible native <details> with a summary that keeps the Guardrails header, the N advisory count and the basis note visible.
  • Trajectory filter bar shows essentials only (Search, Kind, six chips, Advanced filters trigger with active-count badge). The remaining controls (Agent, Model, Provider, Tool, Status, From/To, Min/Max prompt tokens) moved into a single #advanced-filters modal.

Why

Reduce vertical space on the WebUI Trajectory and Statistics pages without touching the server-side filter contract or the guardrail evaluator.

What changed

  • src/ui/guardrails.js: rows render inside <details class="guardrails-block"> with aria-expanded/aria-controls.
  • src/ui/app.js: guardrails expansion state + advanced-filter modal lifecycle, focus trap, Esc/outside-click close, re-render-safe preservation.
  • src/ui/settings.js: per-browser preference keys guardrailsExpanded / guardrailsCollapsed.
  • src/ui/styles.css: minimal disclosure + advanced-filter grid styling.
  • docs/UI.md: updated filter/collapse wording.

Behavior

  • Guardrails toggles via keyboard/pointer; expanded/collapsed state survives re-renders and reloads.
  • Advanced filters are reachable from both view modes (the old advanced-only gating on filter fields is gone).
  • The modal closes on filter change, Esc or outside click and restores focus to the trigger.

Tests

  • npm run check — 829 tests green.

Notes

  • Rendering only; no change to src/server/http.ts, query formats, src/core/guardrails.ts or the TUI.
  • Follow-up: add UI tests for toggle/persistence, keyboard activation and the advanced-filter dialog.

@NicoGenti
NicoGenti merged commit 26b842b into main Nov 20, 2026
7 checks passed
@NicoGenti
NicoGenti deleted the feat/issue-113-webui-compaction branch November 20, 2026 19:30
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.

ui: collapsible Guardrails section and progressive-disclosure filter bar (Trajectory)

1 participant