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
perf(linear): remove unused team lookups before metadata reads - #28708
Before moving a Linear card, Orca fetched the whole team, discarded that response, then fetched its statuses. It now fetches the statuses directly, removing one sequential provider round trip before the card updates.
What Changed
UUID team metadata reads use the same generated Linear SDK relation queries without the unused parent-team lookup. A one-page status read goes from 2 provider requests to 1; a cold states/labels/members load goes from 6 to 3. Team keys keep the original lookup so pagination still uses their canonical IDs.
The existing page readers, projections, ordering, error handling and request limiter remain in place. The SDK stays lazily loaded.
Why
This removes external API work in ordinary board moves and cold issue-editor metadata loads, independently of team size. Reusing the SDK's existing queries keeps its models, pagination and error classes without introducing new GraphQL documents or changing cache freshness.
Merge risk: Low. Negative user-facing tradeoffs: NONE identified. Request counts were verified with the real SDK transport intercepted locally. Live-provider latency was not measured; this PR claims neither milliseconds saved nor a percentage UI speedup. The later status mutation is separate from these counts.
NONE identified. Metadata, ordering, pagination, freshness and host ownership are preserved.
Linked Issue
Internal performance maintenance; no linked issue.
Visual Proof
N/A — this changes main-process provider reads; the returned metadata and rendered content are equivalent.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
On macOS arm64, with ORCA_BACKGROUND_LAUNCH=1:
51 tests passed across teams.test.ts, team-metadata-requests.test.ts and client.test.ts. The 24 new cases exercise the actual lazy SDK loader and HTTP transport: UUIDs, aliases, all three lists, continuation, projections, auth/token clearing, provider errors and permit release.
The new cold three-list regression fails against the original source: expected 3 requests, received 6. A separate ignored 30-case comparison verified before/after result and error parity.
Full node typecheck passed with workspace package paths rooted in this worktree; changed-code quality checks reported no new findings; the production main build and git diff --check passed.
No stored credentials or live provider calls were used. Measurement tooling is excluded from the diff. Linux, Windows and live SSH were not run; CI will cover the broader suite.
CI on this head is blocked by inherited main lint errors: the PR-generation file exceeds its line limit (from #28596), and a mobile Jira test uses two broad object parameters (from #28616). Exact failing-file blobs match the CI base; both narrow checks pass on the PR head. No unrelated repair is included.
Review
Independent review of the exact production and regression-test files found no blockers. Existing open #11060 changes assignee ordering and does not implement this request reduction.
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 same credential-owning host and selected Linear workspace execute the requests. Local/SSH/folder routing and RPC parameters/results retain their existing contracts. Cold metadata retains its existing cache; this is not a gain on every cached drawer opening.
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)
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)
Full repository lint, typecheck, tests and build pass; focused local checks passed, CI will cover the full suite.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: c3b0f62e-d882-4b07-80e3-6ef9dd01e9b5
📥 Commits
Reviewing files that changed from the base of the PR and between d194712 and 243bdc1.
📒 Files selected for processing: 3
src/main/linear/linear-sdk.ts
src/main/linear/team-metadata-requests.test.ts
src/main/linear/teams.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
📝 Walkthrough
The SDK module now exposes team query constructors and parseLinearError. For UUID team IDs, readTeamResource uses direct paginated requests for states, labels, and members. Non-UUID team keys continue to use the SDK team lookup. Tests cover these request paths, pagination, error handling, and disconnected workspaces.
Priority: ⬇️ Low
Merge Risk:⚪ Minimal · up to 243bd
No actionable merge-blocking issue is identified; the change is mergeable after normal checks.
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. Analyzed 4 functions across 3 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
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.
Title check
The title clearly and concisely describes the main performance change: removing unused Linear team lookups before metadata reads.
Description check
The description follows the repository template and explains the user impact, mechanism, rationale, testing, limitations, review status, and checklist state. It also explains why no linked issue is in…
Fix all pre-merge checks with AI
✨ 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.
Closing: the saved Linear round trip is on the fire-and-forget board-sync path (not user-visible), and only ~1 round trip on cold editor loads since the reads already run in parallel. It's unmeasured, and not enough gain for coupling to the SDK's generated query classes.
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
Before moving a Linear card, Orca fetched the whole team, discarded that response, then fetched its statuses. It now fetches the statuses directly, removing one sequential provider round trip before the card updates.
What Changed
UUID team metadata reads use the same generated Linear SDK relation queries without the unused parent-team lookup. A one-page status read goes from 2 provider requests to 1; a cold states/labels/members load goes from 6 to 3. Team keys keep the original lookup so pagination still uses their canonical IDs.
The existing page readers, projections, ordering, error handling and request limiter remain in place. The SDK stays lazily loaded.
Why
This removes external API work in ordinary board moves and cold issue-editor metadata loads, independently of team size. Reusing the SDK's existing queries keeps its models, pagination and error classes without introducing new GraphQL documents or changing cache freshness.
Merge risk: Low. Negative user-facing tradeoffs: NONE identified. Request counts were verified with the real SDK transport intercepted locally. Live-provider latency was not measured; this PR claims neither milliseconds saved nor a percentage UI speedup. The later status mutation is separate from these counts.
Performance qualification
Negative user-facing tradeoffs
NONE identified. Metadata, ordering, pagination, freshness and host ownership are preserved.
Linked Issue
Internal performance maintenance; no linked issue.
Visual Proof
N/A — this changes main-process provider reads; the returned metadata and rendered content are equivalent.
Testing
On macOS arm64, with
ORCA_BACKGROUND_LAUNCH=1:teams.test.ts,team-metadata-requests.test.tsandclient.test.ts. The 24 new cases exercise the actual lazy SDK loader and HTTP transport: UUIDs, aliases, all three lists, continuation, projections, auth/token clearing, provider errors and permit release.git diff --checkpassed.No stored credentials or live provider calls were used. Measurement tooling is excluded from the diff. Linux, Windows and live SSH were not run; CI will cover the broader suite.
CI on this head is blocked by inherited main lint errors: the PR-generation file exceeds its line limit (from #28596), and a mobile Jira test uses two broad
objectparameters (from #28616). Exact failing-file blobs match the CI base; both narrow checks pass on the PR head. No unrelated repair is included.Review
Independent review of the exact production and regression-test files found no blockers. Existing open #11060 changes assignee ordering and does not implement this request reduction.
Agent skill upstream boundary
Notes
The same credential-owning host and selected Linear workspace execute the requests. Local/SSH/folder routing and RPC parameters/results retain their existing contracts. Cold metadata retains its existing cache; this is not a gain on every cached drawer opening.
Checklist
N/Awith reason