Repository navigation
fix(new-workspace): search and offer Linear on the same host in Create worktree - #33270
Merged
Merged
Conversation
Create worktree searched Linear on the selected repo's host but offered the Linear tab from the focused host's status. With Linear connected only on the desktop and a project on a paired server, the tab appeared and every search silently came back empty. The repo-derived Linear source now reads its own host's status, as explicit sources already did, so the tab and the selected workspace follow the host that will answer.
…d treat loading as unknown The host status read is keyed by host, not project scope, and a same-host re-read (repo switch, workspace change, reconnect) keeps the last status instead of reading as disconnected, so the Linear tab and the chosen mode no longer reset. While the first read is pending, a chosen Linear tab stays selected and a pasted Linear URL keeps blocking Enter. The credential-error test now stubs the repo host's status read it depends on.
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
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. Comment |
8 of 9 tasks
nwparker
added a commit
to SimonSQLML/orca
that referenced
this pull request
Oct 27, 2026
Since stablyai#33270, Create worktree reads Linear status from the repo's host (linear:status IPC) instead of the store, so the store-only fixture left Linear disconnected in the composer and the pasted URL was never looked up. Stub the linear:status handler with the same connected status.
nwparker
added a commit
that referenced
this pull request
Oct 27, 2026
…hanges (#30115) * test(e2e): repair specs that missed intentional product changes Align still-stale e2e expectations with shipped product behavior: - the Cmd+J placeholder names workspaces and tasks - the worktree meta dialog is titled "Workspace details" - OS-opened CSV/TSV files are editable and render as an ARIA grid - the delayed-save notice carries the app toaster's close button Fixes #30114 Co-authored-by: Neil <neil@stably.ai> * test(e2e): stub host Linear status in linear-url-workspace-entry spec Since #33270, Create worktree reads Linear status from the repo's host (linear:status IPC) instead of the store, so the store-only fixture left Linear disconnected in the composer and the pasted URL was never looked up. Stub the linear:status handler with the same connected status. --------- Co-authored-by: Neil <neil@stably.ai>
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.
ELI5
Create worktree searches Linear on the machine the selected project lives on. It decided whether to offer the Linear tab by asking a different machine: the one focused in the app. If Linear was connected on your desktop but not on the paired server that holds the project, the tab appeared, and every search came back silently empty. The dialog now asks the same machine it searches.
What Changed
Mechanism:
useWorkItemSourceFoundationreads the Linear connection for the repo-derived source throughuseLinearSourceConnection, which explicit sources already used, instead of the focused host's store status.useLinearSourceConnectionnow keys its read by host, not by project. A re-read on the same host (repo switch, workspace change, reconnect) keeps the last status instead of briefly reading as "disconnected", so the tab and the chosen mode don't reset.This covers Create worktree and the attach/edit workspace links search, which shares the hook.
Why
The search already ran on the right host (
buildTaskSourceContextFromRepouses the repo's execution host). Only the availability check was on the wrong host. Making both read the same host removes the split. The alternatives were:ref-oss check: this needed three review rounds, so I compared how editors with per-host integrations model connection state. They keep the last known per-host state while re-checking, and treat "not known yet" as separate from "not connected". The final design does the same, so the approach didn't change; only the pending state got cleaner.
Linked Issue
Fixes #32924
Thanks to the reporter for the detailed trace through
use-work-item-source-foundation.tsand the server-sidelinear_not_connectedcheck.Visual Proof
N/A: no new UI. The Linear tab now appears only when the searched host can answer, and that is checked by tests rather than a recording.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
New: "reads Linear on the selected repo's host, not the focused one ([Bug]: Create worktree Linear search silently returns nothing when the repo's host has no Linear connection #32924)". The focused host is connected, the repo's server is not; Linear must be read on the repo host and not offered. It fails on origin/main.
New: "holds a pasted Linear URL while the repo host's status is still loading". It fails without the presentation change.
New: "keeps the loaded status when the selected repo changes on the same host", plus a stale-while-revalidate assertion in the same-host workspace refresh test. Both fail without the hook change.
SmartWorkspaceSourceResultList.linear-read-error.test.tsxnow stubs the repo host's status read that the credential-error flow depends on.All of
src/renderer/src/components/new-workspace/,sidebar/WorkspaceAttachment*andactivity/pass, single-worker (62 files, 494 tests).The full local static job passes, except
orcad-terminal-smoke. It ran only because the change-scope check couldn't read the dependency graph here, and it needs anout/mobile-webbuild. This PR touches only renderer new-workspace files.Not verified live: a paired server without Linear. The behavior is covered by the hook tests above.
Review
Focus:
use-linear-source-connection.ts(the per-host, stale-while-revalidate state) and thelinearStatusPendingmode retention inuse-smart-workspace-field-availability.ts.Known P3 follow-ups:
aria-busy.Agent skill upstream boundary
Notes
linear.statusreads as disconnected, which matches what its search would return.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)