Skip to content

fix(tasks): keep preset highlights in sync with filters - #34216

Merged
brennanb2025 merged 5 commits into
mainfrom
brennanb2025/tp-preset-highlight
Oct 27, 2026
Merged

brennanb2025 merged 5 commits into
mainfrom
brennanb2025/tp-preset-highlight

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Tasks cleared the remembered preset whenever filters or search changed, so Mine, Assigned to me, Needs review, and Open could lose their highlight even when the applied query still belonged to that preset. For example, adding a label while keeping author:@me is:open cleared Mine.

The filter bar now derives its highlight from the applied query's state, task kind, and @me tokens. Closed, merged, all-state, and queries without a state filter highlight no preset. Intended: a query naming your login explicitly doesn't light up a preset; presets use @me. Intended grouping: additional labels or text may narrow an open preset group while keeping its highlight; clicking the preset still reapplies its canonical query. Existing query execution, preset actions, saved/restored task-page state, task-kind behavior, and defaults stay the same.

Plan: derive presentation from the existing parsed query in one pure matcher. The final change adds no identity dependency, source scan, request, saved field, or wire change. It changes 34 production lines across two renderer files.

Review path: full. The initial change met the light-path size/local-effect/history criteria, but independent review reproduced omitted-state and ambient-account matching gaps. The fix requires explicit open state and removes identity matching entirely, following the intended token-only scope.

Verification: 11 tests passed in the named renderer and task-kind files. Coverage includes a label edit retaining @me, close/reopen, another person's query, personal issue/review filters, explicit-open/merged queries, omitted state, literal usernames versus @ME, and hydrated saved-query versus saved-preset restoration with real prefetch and persistence actions. Full precommit checks passed. Final CI is green on 849b533d0ee588263d86400d8b2d6fe3bbf3215a. Branch-only production filter-bar screenshots passed on that same head in dark and light themes; both flows were inspected. These are headless component-fixture screenshots, with no agents or live-provider test. The review status comment contains the images.

Builds on #11115 by @fsdwen — thank you! Contributor credit is preserved.

Tracked in #11113

Tracked in STA-2826

brennanb2025 and others added 3 commits October 26, 2026 19:21
Reuse the parsed query and already loaded viewer login for personal preset matching. Keep the stored preset field for resume and task-kind behavior.

Co-authored-by: 0668000615 <wen.xiaosong@xydigit.com>
@brennanb2025
brennanb2025 marked this pull request as ready for review October 27, 2026 02:35
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2a9f7668-1fbb-4733-b29a-4ad2e7024237
Commits

Reviewing files that changed from the base of the PR and between 3e12c58 and 0811573.

Files selected for processing: 3
  • src/renderer/src/components/task-page/github/Filters.preset-highlight.test.tsx
  • src/renderer/src/components/task-page/github/Filters.tsx
  • src/renderer/src/components/task-page/github/task-page-preset-highlight.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

Walkthrough

The GitHub task filters now derive the highlighted preset from the active task kind and applied query. The derivation checks query state and author, assignee, review-requested, and reviewed-by filters. Tests cover matching and non-matching queries, edits and submissions, viewer lookup failure, and restored saved queries and presets.

Priority: Pending latest changes

Merge Risk: Minimal · up to 08115

No actionable merge-blocking risk remains from the reviewed preset-highlighting change; normal checks can proceed.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title "fix(tasks): keep preset highlights in sync with filters" names the main change: the GitHub Tasks filter bar now derives preset highlights from the applied query instead of a remembered clic…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is detailed and covers the user impact, implementation, rationale, testing, visual verification, compatibility considerations, and tracked issues. It does not reproduce every template …
Full details: Title check

Explanation

The title "fix(tasks): keep preset highlights in sync with filters" names the main change: the GitHub Tasks filter bar now derives preset highlights from the applied query instead of a remembered click state. It is a conventional-commit style title, 55 characters, and it is specific enough for a teammate to scan history and understand the primary change.

Full details: Description check

Explanation

The description is detailed and covers the user impact, implementation, rationale, testing, visual verification, compatibility considerations, and tracked issues. It does not reproduce every template heading or checklist item, and it uses tracked issue references instead of an explicit "Fixes #" entry, but the required information is largely present.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 6 functions across 3 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c567b04c-300b-4e62-9878-e0beea1a7571
Commits

Reviewing files that changed from the base of the PR and between 07b5c08 and 3e12c58.

Files selected for processing: 3
  • src/renderer/src/components/task-page/github/Filters.preset-highlight.test.tsx
  • src/renderer/src/components/task-page/github/Filters.tsx
  • src/renderer/src/components/task-page/github/task-page-preset-highlight.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

brennanb2025 and others added 2 commits October 26, 2026 19:53
Require the effective open state and recognize personal presets by their @me query tokens. Remove viewer identity matching while preserving existing preset persistence and task-kind behavior.

Co-authored-by: 0668000615 <wen.xiaosong@xydigit.com>
@brennanb2025

Copy link
Copy Markdown
Contributor Author

GitHub Tasks cleared its remembered preset after filter/search edits, so an applied author:@me is:open query could lose Mine when a label was added. The filter bar now derives its highlight from the applied query.

Two review rounds and one fixer round completed. Fixed omitted-state queries incorrectly appearing Open and removed ambient-account equivalence entirely. No findings or changes are deferred. Intended: personal presets recognize @me; literal usernames do not highlight a preset. Labels/text may narrow an open preset group while keeping its highlight; clicking the preset still reapplies its canonical query.

Verified 11 renderer/task-kind tests, including hydrated saved-query/preset prefetch, restoration, and persistence boundaries. Existing saved state, queries, defaults, and actions are unchanged. Fresh source/performance readiness passed; no new scaling work. Final CI passed, including typecheck, tests, and both package jobs. Main was merged once in 849b533d0ee; the reviewed task files are unchanged from 0811573f947.

Windows branch screenshots on 849b533d0ee use real production controls/query actions with fixture data. Both flows passed in both themes with zero page/console/request errors. This is component-fixture visual evidence; no agents, whole-app or live-provider test was needed for this UI-only change.

For Brennan's review

After adding a label while preserving @me, Mine stays highlighted:

Mine remains highlighted after equivalent filter edit

After changing the author, no preset is highlighted:

Different author clears preset highlight

Light theme: equivalent filter · changed author.

Judgment spots: query-to-preset rules and presentation-only consumer.

@brennanb2025
brennanb2025 merged commit 203f4e7 into main Oct 27, 2026
34 checks passed
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.

1 participant