fix(frontend): keep the current branch when opening tasks from the header - #10110
Open
bilalabbad wants to merge 2 commits into
Open
fix(frontend): keep the current branch when opening tasks from the header#10110bilalabbad wants to merge 2 commits into
bilalabbad wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
No issues found across 3 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Bug fix: task-status link now uses the current branch from context instead of a stale URL value. The change is small, bounded, and covered by new tests.
Re-trigger cubic
bilalabbad
force-pushed
the
fix/task-status-link-keeps-current-branch
branch
from
August 3, 2026 14:40
602c821 to
1c77911
Compare
Contributor
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Focused frontend fix deriving the branch query param from current branch context instead of a stale URL value, with tests covering non-default and default branches. Bounded bug fix with no API, schema, or rollout impact.
Re-trigger cubic
…ader The header task-status link derived its `branch` query param from window.location via constructPath, but nuqs writes the branch into the URL one render after the branch context updates, so the memoized href carried the previous branch (none at all on the first switch). Navigating there dropped the branch and BranchesProvider fell back to the default one. Derive the param from currentBranch instead, excluding it on the default branch. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
.agents/rules/code-doc-style.md forbids naming other functions in comments. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
bilalabbad
force-pushed
the
fix/task-status-link-keeps-current-branch
branch
from
August 3, 2026 15:23
1c77911 to
12b214b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Clicking the task-status button in the header while working on a non-default branch took you to the tasks page but silently reset the branch selector to
main, so you lost your working branch just by checking on tasks.The link built its
branchquery param fromwindow.location, which nuqs updates one render after the branch context — so the href always lagged one branch switch behind (empty on the first switch), while itsfiltersparam carried the correct branch:What changed
branchparam when you are on the default branch.TaskStatusderives the param fromcurrentBranch— which it already holds — instead of inheriting it from the ambient URL.constructPathstill readswindow.locationduring render, so the same staleness can affect any link rendered outside auseLocationsubscriber. Left for a follow-up.How to review
Single behavioural change in
frontend/app/src/entities/tasks/ui/task-status.tsx. Theis_defaultbranchpoint exists becauseconstructPathignores anullvalue and needsexclude: trueto remove a param.How to test
Two new tests: the branch must come from the context (fails before this change), and the param must be absent on the default branch. Manually: switch to a non-default branch, click the task-status button, confirm the selector still shows your branch.
Impact & rollout