Repository navigation
fix(tasks): keep preset highlights in sync with filters - #34216
Conversation
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>
|
No actionable comments were generated in the recent review.
|
There was a problem hiding this comment.
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
Files selected for processing: 3-
src/renderer/src/components/task-page/github/Filters.preset-highlight.test.tsxsrc/renderer/src/components/task-page/github/Filters.tsxsrc/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.
-
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>
|
GitHub Tasks cleared its remembered preset after filter/search edits, so an applied 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 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 Windows branch screenshots on For Brennan's review After adding a label while preserving After changing the author, no preset is highlighted: Light theme: equivalent filter · changed author. Judgment spots: query-to-preset rules and presentation-only consumer. |


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:opencleared Mine.The filter bar now derives its highlight from the applied query's state, task kind, and
@metokens. 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 on849b533d0ee588263d86400d8b2d6fe3bbf3215a. 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