Skip to content

fix(linear): exclude label groups from assignable labels - #25843

Closed
kazu-42 wants to merge 1 commit into
stablyai:mainfrom
kazu-42:kazu-42/fix-linear-label-groups
Closed

kazu-42 wants to merge 1 commit into
stablyai:mainfrom
kazu-42:kazu-42/fix-linear-label-groups

Conversation

@kazu-42

@kazu-42 kazu-42 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

ELI5

Linear label groups are containers, not labels you can assign to an issue. Orca currently offers them in the label picker and Linear rejects the selection. This change removes those invalid choices while keeping ordinary labels and the labels inside each group.

What Changed

Filter SDK label nodes with isGroup: true from the shared team-label reader after fetching all pages. Both label-reading entry points now return only assignable labels, with the same { id, name, color } response shape and ordering as before.

Add regression coverage for both readers, including group-only pages, children on later pages, ordinary labels, and a collection containing only groups.

Why

The SDK already returns isGroup; the reader was discarding it without checking it. Filtering at this boundary fixes the shared data source without adding separate picker rules, changing the wire format, or issuing extra requests. Pagination still finishes even when a page contains only groups. This matches Linear's documented distinction between groups and assignable labels.

Linked Issue

Fixes #25603

Visual Proof

Pending: actual before/after picker screenshots. This PR is intentionally a draft until rendered verification is attached. The repository requires the electron skill for Orca UI checks; that skill was not available in this environment, including the local skill directories and orca skills get electron. No live Linear account or visible app window was used for testing.

Automated reproduction through both public label readers, using a paginated SDK fixture:

Fixture Before After
Groups Type, Area; ordinary Urgent; child labels Bug, Backend Type, Urgent, Bug, Area, Backend Urgent, Bug, Backend
Two pages containing only groups Both group IDs returned Empty assignable-label list

All four added regression cases failed against the original reader, then passed with the fix.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

On macOS, with ORCA_BACKGROUND_LAUNCH=1:

node config/scripts/ensure-native-runtime.mjs --runtime=node --check-only
node_modules/.bin/vitest run --config config/vitest.config.ts \
  src/main/linear \
  src/main/runtime/rpc/methods/linear.test.ts \
  src/main/runtime/rpc/methods/linear-agent-access.test.ts \
  src/renderer/src/hooks/useIssueMetadata.test.tsx --maxWorkers=4
node node_modules/typescript/bin/tsc --noEmit -p config/tsconfig.node.json
node config/scripts/check-changed-code-quality.mjs 4de9f9f85a858c711a1513852407354337e1bd36

Results: 21 test files / 155 tests passed, Node typecheck passed, changed-code quality gate passed with zero new findings. Direct oxlint and React Doctor checks also passed; oxfmt was applied to the changed test file. git diff --check passed. The tests mock Linear SDK responses; live API writes, rendered UI, Windows/Linux, SSH execution, and a full packaged build were not exercised.

AI Disclosure

Implemented and tested with OpenAI Codex.

Review

Self-reviewed the pagination boundary, shared callers, SDK field availability, and unchanged response shape. No token handling, issue mutation, filesystem operation, or provider routing changes are included.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

The filtering runs on the runtime that reads Linear. Existing clients can consume the unchanged response; an older runtime still needs this fix to stop returning groups. The change is independent of OS, git worktrees versus folder workspaces, and GitHub/GitLab selection. It does not alter persisted data, so reverting the commit restores the previous behavior without migration. Child-label exclusivity within a group is outside this issue's scope.

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)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

nwparker added a commit that referenced this pull request Oct 9, 2026
Records the retained adapted contribution from #25843 in replacement PR #26861.

Co-authored-by: kazu-42 <[email protected]>
@nwparker

Copy link
Copy Markdown
Contributor

Closing this PR as superseded by the merged PR #26861. It retains the label-group filter after all pages are loaded, preserving child and standalone labels, and retains the pagination regressions with additional later-page failure coverage. kazu-42’s retained contribution is credited as a co-author.

@nwparker nwparker closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Orca Linear shows label groups as another label

2 participants