Skip to content

Add PR triage filters#560

Open
mariusvniekerk wants to merge 12 commits into
mainfrom
codex/pr-triage-filters
Open

Add PR triage filters#560
mariusvniekerk wants to merge 12 commits into
mainfrom
codex/pr-triage-filters

Conversation

@mariusvniekerk

@mariusvniekerk mariusvniekerk commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator
  • Adds a PR Filters dropdown to narrow the queue by approval, draft/readiness, merge conflicts, failed CI, and kanban status.
  • Collapses narrow PR sidebars into one merged filter control for state, grouping, PR, and kanban filters.

Screenshot:

pr-filter-control-final.png

mariusvniekerk and others added 2 commits June 19, 2026 18:14
Maintainers need to narrow the PR queue by review state, draft/readiness, CI failure, merge conflicts, and workflow status without changing the provider-neutral pulls API. Keep these facets as local list filters so the existing sync and query contract stays stable while the sidebar can stack triage constraints quickly.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
The new PR filter should behave like the existing Activity filter menu instead of opening as an end-aligned menu. Using the shared default placement keeps the dropdown visually connected to its trigger in the narrow PR sidebar.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
@roborev-ci

roborev-ci Bot commented Jun 19, 2026

Copy link
Copy Markdown

roborev: Combined Review (9926f33)

Summary verdict: The PR has two medium issues to address; no high or critical findings were reported.

Medium

  • packages/ui/src/components/sidebar/PullList.svelte:68
    The compact breakpoint is still calibrated for the old full filter row, but this change adds another FilterDropdown. For sidebar widths above 395px but below the new required width, the full controls render inside .filter-bar with overflow: hidden, so right-edge controls can be clipped.
    Fix: Re-measure/update COMPACT_FILTER_MAX_WIDTH including the new dropdown, or derive compact mode from actual available width/overflow.

  • frontend/tests/e2e/pull-list-filters.spec.ts:54
    The new browser coverage replaces /api/v1/pulls with a hand-built mock response, so it does not exercise the real Go API/SQLite data that supplies ReviewDecision, CIStatus, MergeableState, and KanbanStatus for this user-visible PR workflow.
    Fix: Add full-stack coverage under frontend/tests/e2e-full or an API+SQLite full-stack test for the filter workflow.


Panel: ci_default_security | Synthesis: codex, 9s | Members: codex_default (codex/default, done, 3m40s), codex_security (codex/security, done, 15s) | Total: 4m4s

The PR sidebar can narrow enough that separate state/group and local PR filter controls either overflow or compete for the same compact space. Collapse state, grouping, PR attributes, and kanban status into one compact filter menu, and remeasure the floating menu after filter selections so the dropdown stays anchored to its trigger.

Validation: vp test run --project unit; vp run ui-package-typecheck; vp fmt --check packages/ui frontend/tests/e2e/pull-list-filters.spec.ts frontend/tests/e2e-full/sidebar-collapse.spec.ts; playwright pull-list-filters; playwright-e2e sidebar-collapse; live dev-ephemeral DOM measurement for compact overflow and dropdown left-edge alignment.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
@roborev-ci

roborev-ci Bot commented Jun 19, 2026

Copy link
Copy Markdown

roborev: Combined Review (62509a5)

Medium confidence with two medium findings; no high or critical issues reported.

Medium

  • packages/ui/src/stores/pulls.svelte.ts:402
    The Kanban status filter compares the API value directly, but PRs without an explicit kanban row can return an empty status and are treated elsewhere as "new". Selecting the "New" Kanban filter will hide those default-new PRs.
    Fix: Normalize empty status to "new" before checking kanbanStatusFilters, and add a regression case for empty/default kanban status.

  • frontend/tests/e2e/pull-list-filters.spec.ts:48
    The new PR triage filter coverage uses a mocked /api/v1/pulls response instead of the real HTTP API and SQLite-backed data path. This misses real wire-shape cases such as default empty kanban status values.
    Fix: Add full-stack e2e/API coverage that seeds real PR rows and exercises the attribute and Kanban filters through the actual server response.


Panel: ci_default_security | Synthesis: codex, 8s | Members: codex_default (codex/default, done, 4m59s), codex_security (codex/security, done, 14s) | Total: 5m21s

The compact PR filter menu had review-state labels that overlapped with Kanban and grouping labels, and its medium-width breakpoint lived outside the actual sidebar clamp. That made the UI harder to verify and left the scoped PR filter trigger inaccessible in supported widths.

Use distinct compact menu labels, keep the all-in-one reset scoped as a view reset, and cover both the reachable breakpoint and real API-backed compact filtering so future changes cannot drift back to positional selectors.

Validation: vp test run --project unit; vp run ui-package-typecheck; vp fmt --check packages/ui/src/components/sidebar/PullList.svelte frontend/tests/e2e/pull-list-filters.spec.ts frontend/tests/e2e-full/sidebar-collapse.spec.ts; playwright pull-list-filters; playwright-e2e sidebar-collapse; live dev-ephemeral screenshot/DOM measurement for compact dropdown alignment and overflow.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
@roborev-ci

roborev-ci Bot commented Jun 20, 2026

Copy link
Copy Markdown

roborev: Combined Review (34cec15)

No issues found.


Panel: ci_default_security | Synthesis: codex | Members: codex_default (codex/default, done, 5m6s), codex_security (codex/security, done, 47s) | Total: 5m53s

The compact PR filter menu now uses clearer labels than the expanded segmented controls. Existing full-stack helpers still looked for toolbar labels inside the compact dropdown, so Chromium CI selected the pull-state All option instead of the flat grouping option.

Map PR grouping helper labels to their compact-menu names so the tests cover the same user intent in both expanded and compact sidebars.

Validation: playwright-e2e grouping-toggle pull-list collapsible-repos; vp test run --project unit; vp run ui-package-typecheck; vp fmt --check affected filter and grouping specs.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
@roborev-ci

roborev-ci Bot commented Jun 20, 2026

Copy link
Copy Markdown

roborev: Combined Review (14799dc)

Summary verdict: one medium correctness issue needs attention; no security issues were found.

Medium

  • packages/ui/src/stores/pulls.svelte.ts:402
    The new kanban-status filter only matches explicit KanbanStatus values, but list responses can contain an empty or missing kanban status for PRs without a middleman_kanban_state row. Existing workflow grouping and the kanban board treat those PRs as new, so selecting the “New” filter will incorrectly hide PRs that the UI otherwise presents as New.

    Suggested fix: normalize pr.KanbanStatus the same way workflow grouping does before matching, treating falsy or unknown values as "new", and add a store test for the empty-status case.


Panel: ci_default_security | Synthesis: codex, 7s | Members: codex_default (codex/default, done, 8m2s), codex_security (codex/security, done, 13s) | Total: 8m22s

mariusvniekerk and others added 2 commits June 19, 2026 20:36
PRs without an explicit kanban row can arrive from the API with an empty KanbanStatus even though workflow grouping treats them as New. The local Kanban filter needs the same normalization, otherwise selecting New hides those default-new PRs.

Reuse the workflow normalization helper for local PR filter matching and add a store regression for the empty API value.

Validation: vp test run --project unit; vp run ui-package-typecheck; vp fmt --check affected store files; playwright pull-list-filters; playwright-e2e sidebar-collapse.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
Pull list responses can carry an empty or missing kanban status when no middleman_kanban_state row exists. Workflow grouping already presents those PRs as New, so the local status filter needs the same normalization instead of dropping them from the filtered list.

Validation: watched the new store regression fail before the fix, then pass through the frontend unit project; ran ui-package-typecheck and targeted formatting checks.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
@roborev-ci

roborev-ci Bot commented Jun 20, 2026

Copy link
Copy Markdown

roborev: Combined Review (8ab0b0c)

No issues found.


Panel: ci_default_security | Synthesis: codex | Members: codex_default (codex/default, done, 6m33s), codex_security (codex/security, done, 15s) | Total: 6m48s

mariusvniekerk and others added 2 commits June 19, 2026 20:49
The frontend filter fix still left the API contract ambiguous: SQLite can represent a missing kanban row as an empty status while the generated response schema promises a concrete enum. Normalize merge-request responses to New at the server boundary so clients see the documented shape.

Add a DB-backed API regression for a PR with no kanban row and full-stack compact filter coverage that selects New against the real pulls response.

Validation: go test ./internal/server -run TestAPIPullResponsesNormalizeMissingKanbanStateToNew -shuffle=on; vp test run --project unit; vp run ui-package-typecheck; vp fmt --check affected files; playwright-e2e sidebar-collapse.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
The PR branch had already received kanban normalization and API coverage while this local follow-up was committed. Merge origin/codex/pr-triage-filters so the push preserves those remote commits and keeps the broader local store regression for missing and unknown kanban statuses.

Validation: targeted frontend store tests and affected formatting check after conflict resolution; full frontend-check passed before retrying the hook.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
@roborev-ci

roborev-ci Bot commented Jun 20, 2026

Copy link
Copy Markdown

roborev: Combined Review (319f7b5)

No issues found.


Panel: ci_default_security | Synthesis: codex | Members: codex_default (claude-code/default, done, 7m8s), codex_security (claude-code/security, done, 52s) | Total: 8m0s

mariusvniekerk and others added 3 commits June 19, 2026 21:17
The API response contract presents missing kanban rows as New, but the list query still treated those same rows as empty when callers requested kanban=new. That made the documented response shape and server-side filtering disagree for PRs created before an explicit kanban row exists.

Use the same default only for the New predicate, keep other kanban filters tied to stored rows, and log unexpected stored statuses before coercing them into the response enum so data drift is visible instead of completely silent.

Validation: go test ./internal/db -run TestListPullRequestsFilterByKanban -shuffle=on; go test ./internal/server -run TestAPIPullResponsesNormalizeMissingKanbanStateToNew -shuffle=on; go test ./internal/server/e2etest -run TestFleetSnapshotEmptyTmuxServerE2E -short -shuffle=on; git diff --check.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
The compact PR and issue filter menus combine State, Group, and local filter controls so users can adjust more than one selector in a single pass. Closing the menu after clicking State or Group made that merged menu feel broken and forced repeated reopening for adjacent choices.

Let compact State and Group rows use the dropdown default of staying open after selection, matching the multi-select PR/Kanban entries, and cover the behavior in the full-stack sidebar collapse tests.

Validation: node ./node_modules/vite-plus/bin/vp exec svelte-mcp svelte-autofixer packages/ui/src/components/sidebar/PullList.svelte --svelte-version 5; node ./node_modules/vite-plus/bin/vp exec svelte-mcp svelte-autofixer packages/ui/src/components/sidebar/IssueList.svelte --svelte-version 5; node ./node_modules/vite-plus/bin/vp fmt --check packages/ui/src/components/sidebar/PullList.svelte packages/ui/src/components/sidebar/IssueList.svelte frontend/tests/e2e-full/sidebar-collapse.spec.ts; node ../node_modules/vite-plus/bin/vp test run --project unit; node ./node_modules/vite-plus/bin/vp run ui-package-typecheck; node ../node_modules/vite-plus/bin/vp exec -- playwright test --config=playwright-e2e.config.ts tests/e2e-full/sidebar-collapse.spec.ts; make frontend-check.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
The compact PR filter menu intentionally stays open for multi-filter workflows. The list-view e2e helpers were still treating state and grouping selections as one-shot actions, which left the dropdown over status headers or blindly toggled it into the wrong state in CI.

Dismiss the compact menu after these helper selections so the tests exercise the intended user path without changing product behavior.

Validation: cd frontend && node ../node_modules/vite-plus/bin/vp exec -- playwright test --config=playwright-e2e.config.ts --project=chromium tests/e2e-full/collapsible-repos.spec.ts tests/e2e-full/pull-list.spec.ts; cd frontend && node ../node_modules/vite-plus/bin/vp exec -- playwright test --config=playwright-e2e.config.ts --project=firefox tests/e2e-full/collapsible-repos.spec.ts tests/e2e-full/pull-list.spec.ts; cd frontend && node ../node_modules/vite-plus/bin/vp exec -- playwright test --config=playwright-e2e.config.ts --project=chromium; cd frontend && node ../node_modules/vite-plus/bin/vp exec -- playwright test --config=playwright-e2e.config.ts --project=firefox; cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit; cd frontend && node ../node_modules/vite-plus/bin/vp test run --project browser; node node_modules/vite-plus/bin/vp fmt --check frontend/tests/e2e-full/collapsible-repos.spec.ts frontend/tests/e2e-full/pull-list.spec.ts --threads=1; git diff --check.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
@roborev-ci

roborev-ci Bot commented Jun 20, 2026

Copy link
Copy Markdown

roborev: Review Unavailable (5257fe7)

The review agent repeatedly failed to run (likely an agent or configuration error). roborev will try again on the next commit.

Last error: agent: claude-code failed stream: stream errors: You've hit your session limit · resets 5:50am (UTC): exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant