Skip to content

HYDI-40: Filter dashboard items by Project#35

Merged
kameloov merged 2 commits into
mainfrom
agent/HYDI-40
May 25, 2026
Merged

HYDI-40: Filter dashboard items by Project#35
kameloov merged 2 commits into
mainfrom
agent/HYDI-40

Conversation

@oz-by-warp
Copy link
Copy Markdown
Contributor

@oz-by-warp oz-by-warp Bot commented May 22, 2026

Implements HYDI-40

Changes

  • Added a dashboard project dropdown filter (All Projects + discovered project keys from dispatch runs).
  • Added server-side filtering by project query parameter so only runs from the selected project are rendered.
  • Preserved filter state across the existing Hide Done toggle.
  • Added a Project column to the dashboard table for clarity.
  • Added route test coverage for project dropdown rendering and project-specific row filtering.
  • Updated dashboard docs to include the new project filter behavior.

Validation

  • npm test
  • npm run test:coverage
  • npm run typecheck

UI verification

This ticket touches dashboard UI rendering. Automated screenshot/snapshot iteration via Playwright MCP was not executed in this environment because Playwright MCP/browser control tools are not available in this run.

Conversation: https://app.warp.dev/conversation/657f393a-f151-4dcc-a24c-a92416acc122
Run: https://oz.warp.dev/runs/019e4ff5-2b36-7145-b07f-8b5ddba57893

Co-Authored-By: Oz oz-agent@warp.dev
This PR was generated with Oz.

Co-Authored-By: Oz <oz-agent@warp.dev>
@kameloov kameloov marked this pull request as ready for review May 25, 2026 07:45
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

PR Review — Principal Engineer Assessment

Verdict: Ready with fixes
Risk: Medium
Scope: 63dcad700026370a7a94a5cba8671ab37c4fc7ff..661db629cdacc002f0e1c651d729cc5726e4ccf0
Requirements: Jira HYDI-40 (Filter dashboard items by Project)

Strengths

  • Project filter is implemented as a cohesive route-level slice (query parsing, options derivation, filtering, rendering).
  • State preservation between project selection and hide-done toggle is handled cleanly via query params.
  • Added route test covers dropdown rendering and project-specific row filtering.
  • Dashboard docs were updated to reflect the new UI behavior.

Architecture Assessment

  • Vertical slice quality: Strong — route change includes UI, filtering logic, tests, and docs in one coherent slice.
  • Deep module quality: Mixed — rendering and aggregation logic remain centralized, but filtered-row behavior now diverges from summary counts, reducing conceptual cohesion.
  • Testability/reasoning quality: Mixed — row filtering is tested, but count semantics under project filtering are not validated.

Third-Party Contract Verification

  • No third-party API contract surface was changed in this PR.
  • Jira client usage remains on existing getIssue(..., ["status"]) path with unchanged request/response assumptions.

Unmapped Findings

(findings whose lines are not in the diff — inline comment not possible)

  • None.

Action Plan For Implementing Agent

  1. [REV-001] Recompute dashboard summary counts from the already-filtered run set (or introduce a query-aware count source) so stat cards match the selected project/hide-done filters.
actions:
  - id: REV-001
    severity: important
    location: src/routes/dashboard.ts:143
    change_required: Replace global `countRows`-based stat card values with counts derived from the active filtered set (`projectFilteredRuns` and hide-done state) or fetch counts with equivalent query constraints.
    acceptance_check: With mixed-project fixtures, requesting `/dashboard?project=HYDI` shows stat cards whose totals only reflect HYDI rows; with `hideDone=1`, done-category items are excluded from both table rows and stats.

Comment thread src/routes/dashboard.ts Outdated
@@ -131,6 +143,17 @@ dashboardRouter.get("/", async (c) => {
counts[row.status] = parseInt(row.count, 10);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[REV-001] Important — Stats cards ignore active project filter

Problem: The table rows are filtered by selectedProject, but summary stat cards are still populated from global countRows (all projects), so counts can disagree with what the table is showing.
Impact: Users can make incorrect operational decisions because dashboard totals do not represent the currently selected project view.
Required fix: Compute stats from the same filtered dataset used for rendering rows (or fetch query-aware counts keyed by project and hide-done state).
Acceptance check: For a dataset with multiple projects, /dashboard?project=HYDI must display running/queued/blocked/succeeded/failed/stale counts that match only HYDI runs; adding hideDone=1 must also remove done-category tickets from both rows and counts.

Compute dashboard stat card counts from the filtered dataset (visibleRuns)
instead of the global getRunCountsByStatus() query. This ensures stats
match the active project filter and hideDone toggle.

- Removed unused getRunCountsByStatus import from dashboard route
- Stats now derived by iterating visibleRuns (project + hideDone filtered)
- Added test covering stat card values under project and hideDone filters

Co-Authored-By: Oz <oz-agent@warp.dev>
@kameloov kameloov merged commit 0f13823 into main May 25, 2026
@kameloov kameloov deleted the agent/HYDI-40 branch May 25, 2026 09:27
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.

2 participants