AI Agents SDE Task Viewer
      • Context
      • Plan
      • Prd
  1. Home
  2. AgentSDE
  3. agent-core-control-center
  4. gh-51
  5. plan
  6. context.json
context.json(2.4 KB)· Apr 2, 2026
{
  "meta": {
    "agent": "planner",
    "task_id": "51",
    "title": "Fix pipeline page repo and directive filters",
    "created_at": "2026-04-02T12:00:00Z"
  },
  "inputs": [
    {
      "name": "issue-51",
      "type": "context",
      "ref": "https://github.com/AgentSDE/agent-core-control-center/issues/51",
      "notes": "Repo and directive text inputs on /pipeline do not filter tasks"
    },
    {
      "name": "pipeline-page",
      "type": "file",
      "ref": "app/pipeline/page.tsx",
      "notes": "Current implementation uses window.location.href and defaultValue inputs"
    },
    {
      "name": "tasks-api",
      "type": "file",
      "ref": "lib/api/tasks.ts",
      "notes": "getTasks already passes repo/directive/status params to API"
    }
  ],
  "outputs": [
    {
      "name": "plan",
      "type": "plan",
      "format": "md",
      "content": "plan.md"
    }
  ],
  "files": [
    {
      "path": "app/pipeline/page.tsx",
      "action": "modify",
      "reason": "Replace window.location.href with useRouter().push(), add blur guard for text inputs, improve empty state message"
    }
  ],
  "steps": [
    {
      "id": "S1",
      "summary": "Replace window.location.href with useRouter().push() and add blur guard to prevent double navigation on Enter+blur for text inputs",
      "acceptance": [
        "All window.location.href assignments in PipelinePageInner replaced with router.push()",
        "useRouter imported from next/navigation and instantiated",
        "enterPressedRef prevents onBlur from navigating when Enter already triggered navigation",
        "Typing a repo name and pressing Enter navigates to ?repo=<value>&page=1",
        "Typing a directive and blurring navigates to ?directive=<value>&page=1",
        "Both filters combine with AND logic — tasks must match both",
        "Filter values persist in URL across pagination",
        "Clearing a filter removes the query param",
        "Empty state shows 'No tasks match the current filters' when filters are active",
        "Status dropdown continues to work correctly",
        "npm run build passes",
        "npm run lint passes"
      ],
      "depends_on": []
    }
  ],
  "risks": [
    {
      "risk": "router.push() may not trigger re-render if URL is identical",
      "mitigation": "Only navigate when value actually changes (blur guard handles this)"
    }
  ],
  "assumptions": [
    "The API backend already supports repo and directive query params for filtering (getTasks sends them)",
    "The filtering bug is purely frontend — navigation not triggering properly"
  ],
  "open_questions": []
}
Plan