Skip to content

feat(linear): add read-only project and issue graphs - #24

Open
Railly wants to merge 17 commits into
mainfrom
railly/linear-integration
Open

Railly wants to merge 17 commits into
mainfrom
railly/linear-integration

Conversation

@Railly

@Railly Railly commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Problem

issue-graph only reads GitHub. Linear issues, their relations, and project backlogs cannot be graphed or shown in the dashboard.

Changes

  • issue-graph linear <issue> reads an issue neighborhood: relations in both directions, parent, sub-issues, attachments, with workspace-scoped identities.
  • issue-graph linear --project UUID captures a whole project, including disconnected issues, and counts its open issues.
  • issue-graph linear login: browser OAuth to Linear's read-only MCP server (dynamic client registration, PKCE), session in the macOS Keychain. No API key or admin needed.
  • Two transports, one report: LINEAR_API_KEY/LINEAR_ACCESS_TOKEN over GraphQL, else the login session over MCP tools mapped to the GraphQL shapes. Same graph build and identity checks; the report records the source.
  • linear status, linear logout, a setup guide when nothing is connected, and Linear in auth status.
  • Fixed read-only queries over fetch. No runtime dependencies.
  • Rate limits follow Linear's real response (HTTP 400 RATELIMITED, X-RateLimit-*-Reset in epoch ms): waits when the reset is within the retry budget, otherwise fails with the reset time.
  • Linear models render in the Next.js dashboard and pass parseModel; themes via --cluster / --clusters.
  • Provider-neutral bounded traversal in crawl.ts, shared with GitHub.
  • Partial open counts carry a reason; identifier seeds are checked against the returned issue.
  • --no-save replaces --no-snapshot (kept as a deprecated alias).
  • Docs: linear.mdx, README, skill, schema.

Limitations:

  • In neighborhood views, related issues from other projects stay in --json but are not drawn.

Visual proof

Live linear login run against the Vercel workspace: wterm project, 30 issues, open count 16, blocks, related and parent edges matching Linear.

Linear project read through MCP

Live run with LINEAR_API_KEY against a real workspace: issue neighborhood with attachments, project capture with open count, --workspace mismatch rejected, invalid key reported as AUTHENTICATION.

Live Linear project capture

Saved Linear project (wterm) in the Next.js dashboard, with native states and proposed themes:

Linear project in the dashboard

@vercel

vercel Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
issue-graph Ready Ready Preview, v0 Oct 19, 2026 7:06am UTC

Base automatically changed from railly/dashboard-polish to main September 27, 2026 15:10
# Conflicts:
#	README.md
#	apps/docs/content/docs/meta.json
#	apps/docs/src/lib/docs-paths.ts
#	skill-data/core/SKILL.md
#	src/cli.ts
#	src/dashboard-presentation.test.ts
#	src/html.ts
#	src/index.ts
#	src/schema.ts
…t reasons

Replaces @linear/sdk and graphql with a fetch transport for the fixed queries. Rate limits read Linear's 400 RATELIMITED response and X-RateLimit-*-Reset headers: a reset within the retry budget is awaited, a later one fails with its reset time. Partial open counts carry a reason, identifier seeds are checked against the returned issue, --no-snapshot becomes --no-save, and the docs state the hourly budget and the cross-project omission in neighborhood views.
@Railly
Railly marked this pull request as ready for review October 17, 2026 13:59
Comment thread src/transports/linear.ts Outdated
issue-graph linear login approves read-only access in the browser (OAuth with dynamic client registration and PKCE) and keeps the session in the macOS Keychain or a 0600 file. Without LINEAR_API_KEY or LINEAR_ACCESS_TOKEN, reads go through Linear's read-only MCP tools, mapped to the GraphQL shapes so the same graph build and identity checks apply. linear status, logout, a setup guide when nothing is connected, and a Linear row in auth status.

This branch was successfully deployed

1 active deployment
Preview — d5f670bf Deployed Oct 19, 2026 by vercel[bot]
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.

1 participant