AI Agents SDE Task Viewer
      • Context
      • Plan
      • Prd
  1. Home
  2. AgentSDE
  3. agent-core-control-center
  4. gh-51
  5. plan
  6. plan.md
plan.md(1.8 KB)· Apr 2, 2026· 2 min read
  • Summary
  • Files
  • Steps
  • Verification
  • Risks

Plan: Fix Pipeline Page Repo and Directive Filters#

Summary#

The repo and directive text inputs on /pipeline use window.location.href for navigation, which causes full page reloads and double-fires when onBlur triggers after onKeyDown (Enter). Replace with useRouter().push() for proper Next.js client-side navigation and guard against redundant blur navigations.

Files#

FileActionDescription
app/pipeline/page.tsxmodifyReplace window.location.href with useRouter().push() for all navigation; add blur guard to text inputs to prevent double navigation on Enter+blur

Steps#

  1. Import useRouter from next/navigation in app/pipeline/page.tsx and instantiate it in PipelinePageInner.
  2. Replace all window.location.href = buildUrl(...) calls with router.push(buildUrl(...)) — this covers repo input (lines 297, 302), status dropdown (line 310), directive input (lines 327, 332), showE2e checkbox (line 342), and pagination (lines 422, 425).
  3. Add an enterPressedRef (React ref) to prevent onBlur from double-navigating after Enter is pressed — set the ref in onKeyDown, check and reset it in onBlur for both text inputs.
  4. Improve empty-state message — update the existing EmptyState on line 363 to say "No tasks match the current filters" when any filter is active, vs the current generic "No tasks found".

Verification#

  • Typing a partial repo name and pressing Enter navigates to ?repo=<value>&page=1 and filters results.
  • Typing a directive and blurring filters correctly; both filters combine with AND logic.
  • Clearing a filter input removes the query param and shows unfiltered results.

Risks#

  • The onBlur guard via ref is a standard React pattern; no risk of stale state since the ref resets synchronously.
ContextPrd