You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mobile): fetch GitLab task details once per open - #37629
Opening a GitLab task on the phone now loads its details once. Refresh still fetches updated details and status.
What Changed
Item selection now distinguishes user actions from detail-response hydration. User actions still replace the request snapshot and cancel older reads; hydration updates the rendered item and task row without starting another request.
Why
The first GitLab response replaced actionItem, which was also an effect dependency and started a second request. Separating hydration at the selection owner removes that feedback while preserving same-item mutation invalidation through the existing detail effect.
N/A. The rendered details and status are unchanged; this removes a duplicate RPC request. Hook tests verify the loaded payload and selected/list status before and after refresh.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
On macOS, the regression failed before the fix with two requests instead of one. The focused mobile hydration, lifecycle, and reply-schema suites pass, 50 tests across three files with ORCA_BACKGROUND_LAUNCH=1 and --maxWorkers=2. They cover refresh, status hydration, item/repository/type/project/client/provider switches, close/reopen, stale replies, failures, and same-item action updates during a pending read. Seventeen focused pilot/family RPC recordings and two recording mutation checks also pass without changing goldens.
Changed-file lint/format, code quality, React Doctor, and all 15 selected pnpm check:changed --base=origin/main --maxWorkers=2 gates pass. Full tests, typechecks, packaging, native devices, and Linux/Windows execution are left to CI under the shared-machine constraints.
Risk
Level: Low. Incorrect selection or hydration updates could leave a detail sheet stale after an action; lifecycle tests exercise those boundaries and the existing stale-response cleanup remains the request owner. No saved data, wire contracts, platform calls, host routing, or UI styling change. A plain revert restores the previous behavior.
AI Disclosure
Review
Exactly two review rounds on the diff from aaf4a5d9539 to the working tree committed as 86e88a5c6bc:
Round
Codex
Claude
Outcome
1
No findings
Same-item mutation could lose cancellation with key-only fetching, accepted as P1
Replaced that approach with the selection reducer and demonstrated the race regression failing before the repair
2
No findings
No findings
No accepted unresolved findings
Review covered local/remote client ownership, all four task providers, stale replies, refresh and selection lifetimes, performance, security, and test/mock fidelity. Test-audit retained behavioral coverage at the real hook boundary; the final hydration regression also fails if hydration is changed to invalidate the request. No UI or platform-specific code changed.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
The shared mobile loader still handles GitHub, GitLab, Jira, and Linear. Existing client routing covers local and remote repositories, with no OS, filesystem, shortcut, folder-workspace, agent, or mixed-version protocol changes. The request count drops from two to one after GitLab hydration.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
No actionable comments were generated in the recent review.
Walkthrough
The task selection state now tracks an action item and a separate detail-request item. The detail-loading hook uses the request item to load details and the hydration setter to update the action item. Tests cover request counts, refreshes, changed targets, provider switches, stale replies, and provider-specific hydrated values.
Merge Risk: Minimal · up to 86e88
Task hydration avoids duplicate reads, with no material merge risk established.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: preventing duplicate GitLab task-detail fetches when opening a task on mobile.
Description check
The description follows the required template and explains the user impact, mechanism, motivation, linked issue, testing, risk, rollback, platform scope, and checklist status. It also documents which …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description follows the required template and explains the user impact, mechanism, motivation, linked issue, testing, risk, rollback, platform scope, and checklist status. It also documents which validation remains for CI.
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 with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 8 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
ast-grep (0.51.1)
ast-grep could not parse rule config: /ast-grep-rules/ast-grep-essentials/rules/python/security/python-mysqlclient-hardcoded-secret-python.yml
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
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
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.
ELI5
Opening a GitLab task on the phone now loads its details once. Refresh still fetches updated details and status.
What Changed
Item selection now distinguishes user actions from detail-response hydration. User actions still replace the request snapshot and cancel older reads; hydration updates the rendered item and task row without starting another request.
Why
The first GitLab response replaced
actionItem, which was also an effect dependency and started a second request. Separating hydration at the selection owner removes that feedback while preserving same-item mutation invalidation through the existing detail effect.Linked Issue
STA-13342
Visual Proof
N/A. The rendered details and status are unchanged; this removes a duplicate RPC request. Hook tests verify the loaded payload and selected/list status before and after refresh.
Testing
On macOS, the regression failed before the fix with two requests instead of one. The focused mobile hydration, lifecycle, and reply-schema suites pass, 50 tests across three files with
ORCA_BACKGROUND_LAUNCH=1and--maxWorkers=2. They cover refresh, status hydration, item/repository/type/project/client/provider switches, close/reopen, stale replies, failures, and same-item action updates during a pending read. Seventeen focused pilot/family RPC recordings and two recording mutation checks also pass without changing goldens.Changed-file lint/format, code quality, React Doctor, and all 15 selected
pnpm check:changed --base=origin/main --maxWorkers=2gates pass. Full tests, typechecks, packaging, native devices, and Linux/Windows execution are left to CI under the shared-machine constraints.Risk
Level: Low. Incorrect selection or hydration updates could leave a detail sheet stale after an action; lifecycle tests exercise those boundaries and the existing stale-response cleanup remains the request owner. No saved data, wire contracts, platform calls, host routing, or UI styling change. A plain revert restores the previous behavior.
AI Disclosure
Review
Exactly two review rounds on the diff from
aaf4a5d9539to the working tree committed as86e88a5c6bc:Review covered local/remote client ownership, all four task providers, stale replies, refresh and selection lifetimes, performance, security, and test/mock fidelity. Test-audit retained behavioral coverage at the real hook boundary; the final hydration regression also fails if hydration is changed to invalidate the request. No UI or platform-specific code changed.
Agent skill upstream boundary
Notes
The shared mobile loader still handles GitHub, GitLab, Jira, and Linear. Existing client routing covers local and remote repositories, with no OS, filesystem, shortcut, folder-workspace, agent, or mixed-version protocol changes. The request count drops from two to one after GitLab hydration.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)