Skip to content

feat(ui): persistent 'Reset filters' control in the Agent Runs filter bar (#6818)#6951

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jaytbarimbao-collab:feat-runs-persistent-reset-filters-6818
Jul 17, 2026
Merged

feat(ui): persistent 'Reset filters' control in the Agent Runs filter bar (#6818)#6951
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jaytbarimbao-collab:feat-runs-persistent-reset-filters-6818

Conversation

@jaytbarimbao-collab

Copy link
Copy Markdown
Contributor

Closes #6818.

The Agent Runs filter bar (apps/loopover-ui/src/routes/app.runs.tsx) had no reset affordance while filters were active — a "Clear filters" button existed only inside the filtered.length === 0 empty state, which is unreachable whenever the active filters still match at least one run. An operator who narrows to e.g. status=ready then has no way back to all runs short of hand-editing the URL. AuditFilters (components/site/audit-feed.tsx) already solves this with an always-present Reset — this brings the Runs bar to parity.

Change

  • Persistent "Reset filters" control in the filter bar itself — always rendered, enabled only once some filter is away from its default (status/kindall, or a non-empty search).
  • Both it and the empty-state "Clear filters" button now call one shared resetFilters handler (clears status/kind/search in a single navigation + toast), so the two paths can't drift.
  • The bar is extracted into an exported, prop-driven RunsFilterBar (mirroring the existing DrawerSurface) so the behavior is unit-testable without mounting the routed page's session/API context.

Tests (regression for the exact gap)

Added to app.runs.test.tsx: the reset renders in the bar (not only the empty state), is disabled at defaults, enables on any non-default filter (status / kind / search), and clears through the shared handler on click. Full @loopover/ui gate green: typecheck, lint, build, tests.

Before / after

Top = filters at default (reset present but disabled); bottom = a filter active (reset enabled):

runs filter bar reset

… bar (JSONbored#6818)

The Agent Runs filter bar (Status/Kind chips + search) had no reset
affordance while filters were active — a 'Clear filters' button existed ONLY
inside the `filtered.length === 0` empty state, which is unreachable whenever
the active filters still match at least one run. An operator narrowing to
e.g. status=ready then had no way back to all runs short of editing the URL.

Add a persistent 'Reset filters' control in the bar itself, always rendered
and enabled only once some filter is away from its default — mirroring the
always-present Reset in AuditFilters (components/site/audit-feed.tsx). Both it
and the empty-state 'Clear filters' button now call one shared `resetFilters`
handler (clears status/kind/search in a single navigation + toasts), so the
two paths can't drift.

The filter bar is extracted into an exported, prop-driven `RunsFilterBar`
(like the existing `DrawerSurface`) so the reset behavior is unit-testable
without mounting the routed page. Adds regression tests: the reset renders in
the bar (not only the empty state), is disabled at defaults, enables on any
non-default filter, and clears through the shared handler.

Closes JSONbored#6818
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 17, 2026
@loopover-orb

loopover-orb Bot commented Jul 17, 2026

Copy link
Copy Markdown

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-17 15:11:56 UTC

2 files · 1 AI reviewer · no blockers · readiness 98/100 · CI green · unknown

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a straightforward, well-scoped refactor that closes #6818 by extracting the filter bar into a prop-driven `RunsFilterBar` component, adding a persistent Reset control gated on `hasActiveFilters`, and unifying both reset paths through a single shared `resetFilters` handler. The change is correct as shown: `hasActiveFilters` is derived directly from the same state driving the chips/search, and both the bar's Reset and the empty-state Clear filters button now call the identical handler, eliminating the drift risk the description calls out. Tests directly exercise the regression (disabled-at-default, enabled-on-any-non-default filter, click delegates to shared handler) rather than fabricating unreachable states.

Nits — 4 non-blocking
  • The extensive JSDoc comments on RunsFilterBar/resetFilters reference the issue number and rationale inline in code, which will rot as the codebase evolves — better suited to the PR description than persisted comments.
  • apps/loopover-ui/src/routes/app.runs.tsx: consider verifying `StateActionButton` forwards `disabled` correctly to the underlying button element for the disabled-state tests to be meaningful (likely fine given CI passed).
  • Consider trimming the multi-paragraph comments in app.runs.tsx down to one-liners per repo comment conventions.
  • The four test cases are a solid regression lock — no changes needed there.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #6818
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 178 registered-repo PR(s), 93 merged, 7 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jaytbarimbao-collab; Gittensor profile; 178 PR(s), 7 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Review context
  • Author: jaytbarimbao-collab
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 178 PR(s), 7 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/app/runs/test desktop before /app/runs/test
before /app/runs/test
after /app/runs/test
after /app/runs/test
/app/runs/test mobile before /app/runs/test (mobile)
before /app/runs/test (mobile)
after /app/runs/test (mobile)
after /app/runs/test (mobile)
/app/runs desktop before /app/runs
before /app/runs
after /app/runs
after /app/runs
/app/runs mobile before /app/runs (mobile)
before /app/runs (mobile)
after /app/runs (mobile)
after /app/runs (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 314373f into JSONbored:main Jul 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent Runs filter bar has no persistent "reset filters" control (only appears in the zero-results empty state)

1 participant