Skip to content

Release: next → main#49

Merged
iamfj merged 9 commits intomainfrom
next
Apr 7, 2026
Merged

Release: next → main#49
iamfj merged 9 commits intomainfrom
next

Conversation

@iamfj
Copy link
Copy Markdown
Collaborator

@iamfj iamfj commented Feb 20, 2026

This is the release collection PR for the next version of Linearis.
It tracks all changes, linked PRs, resolved issues, and open items before merging next into main.
Use this thread for feedback, review, and release coordination.


Overview

214 files changed | +23,877 | -38,394 (net reduction of ~14.5k lines)

This release is a comprehensive overhaul: new architecture, new features, new tooling, and streamlined developer experience. Every layer of the codebase has been touched.


Changes by Category

Architecture — Five-Layer Redesign

The entire source tree was reorganized from a flat utils/ directory into a strict five-layer architecture with enforced separation of concerns:

Layer Directory Responsibility Client
Client src/client/ API wrappers
Resolver src/resolvers/ Human ID → UUID LinearSdkClient
Service src/services/ Business logic & CRUD GraphQLClient
Command src/commands/ CLI orchestration Both via createContext()
Common src/common/ Shared utilities

Key rules enforced: ID resolution happens exactly once in resolvers; services accept only UUIDs; commands are thin orchestrators.

GraphQL Codegen Migration

Replaced all manually maintained TypeScript type definitions and runtime GraphQL string loading with graphql-codegen. Every client.request<T>() call is now fully typed from codegen output.

Features

Authentication System

Full linearis auth command group with interactive login, encrypted AES-256-GCM token storage, token validation via GetViewer query, and structured auth error detection. Backwards-compatible with env var and legacy plaintext file.

Issue Relations

New issue-relation-service with create/find/delete operations. Relation flags (--blocks, --blocked-by, --related, --duplicate) on both issues create and issues update.

Cursor-Based Pagination

All list commands now support cursor-based pagination via --after <cursor> and --limit <n>. Service layer returns PaginatedResult<T> with pageInfo containing endCursor and hasNextPage. Includes per-service tests for pagination behavior.

Assignee ID Resolution

--assignee now accepts human-readable names and emails in addition to UUIDs. New resolveUserId resolver handles the lookup.

Two-Tier Usage System

Token-optimized usage output designed for LLM agents. Tier 1 overview (~200 tokens) and Tier 2 domain detail (~300-500 tokens). USAGE.md auto-generated on every build.

Reliability

Request Timeouts

GraphQL API requests now have a 30-second timeout, file download/upload operations have a 60-second timeout. Prevents the CLI from hanging indefinitely on stalled connections — especially important for LLM agent integrations with their own tool timeouts.

File Operation Error Codes

files download and files upload now use proper error exit codes (exit 1) on failure instead of returning exit 0 with a JSON success: false envelope. Consistent with all other commands.

Developer Tooling

Documentation & Community


Upstream Issues Addressed


Open Issues (deferred to next minor release)

These are tracked and labeled next-release:

Previously tracked:


Breaking Changes

  • Command renames: project-milestonesmilestones, embedsfiles
  • Option renames: Standardized across all commands (e.g., --issues-first--limit)
  • search subcommands merged into list with filter flags
  • Source reorganization: Complete restructuring of src/ (relevant for contributors)
  • File command error behavior: files download and files upload now exit with code 1 on failure (previously exit 0 with success: false in JSON body)

All Included PRs (chronological)

# PR Category
1 iamfj#2 — Setup GraphQL codegen infrastructure codegen
2 iamfj#3 — Migrate GraphQL queries to separate files codegen
3 iamfj#4 — Migrate issues service to codegen types codegen
4 iamfj#5 — Fix command parameter types for codegen codegen
5 iamfj#6 — Migrate documents and attachments to codegen types codegen
6 iamfj#7 — Migrate cycles and milestones to codegen types codegen
7 iamfj#8 — Remove manual types, finalize codegen migration codegen
8 iamfj#9 — Add Claude Code GitHub workflow ci
9 iamfj#10 — Five-layer architecture redesign architecture
10 iamfj#12 — CLI naming redesign + two-tier usage system feature
11 iamfj#14 — Remove obsolete src/queries loaders refactor
12 iamfj#23 — Update CI workflow ci
13 iamfj#26 — Authentication system with encrypted storage feature
14 iamfj#27 — Claude Code agent skills dx
15 iamfj#28 — AGENTS.md documentation dx
16 iamfj#29 — Biome, lefthook, and commitlint tooling dx
17 iamfj#30 — Issue relations support feature
18 iamfj#31 — Codebase simplification refactor
19 #50 — Resolve --assignee to UUID fix
20 #53 — Cursor-based pagination for all list commands feature
21 #54 — README rewrite for current CLI surface docs

Direct commits on next (not via PR):

Commit Description Category
fix: use proper error exit codes for file operation failures File commands now exit 1 on failure fix
feat: add request timeouts for API and file operations 30s GraphQL / 60s file timeouts reliability
docs: add security policy, community templates, and contributor metadata SECURITY.md, issue/PR templates, contributors community

Merge Checklist

@iamfj iamfj added the help wanted Extra attention is needed label Feb 20, 2026
@iamfj iamfj self-assigned this Feb 20, 2026
@iamfj iamfj requested a review from czottmann February 20, 2026 12:58
@iamfj
Copy link
Copy Markdown
Collaborator Author

iamfj commented Feb 24, 2026

Feedback from meeting with @czottmann :

  • gitignore the agent skills and add notice to contributors which skills are recommended to work on this project
  • investiage if the the agents.md can be compacted more

iamfj added 9 commits April 7, 2026 16:18
Add biome for formatting and linting, lefthook for git hooks, commitlint
for conventional commit enforcement, and editorconfig for IDE consistency.

Set up GraphQL Code Generator to produce TypeScript types from .graphql
definition files. Migrate all queries and mutations from inline TypeScript
strings to dedicated .graphql files under graphql/queries and
graphql/mutations.

Update CI workflow for the new tooling and add codegen, format, and lint
scripts to package.json. Configure prebuild and postinstall hooks to
ensure generated types stay in sync.

Part of #45
Replace the flat utils-based structure with a strict five-layer
architecture enforcing separation of concerns:

  CLI Input → Command → Resolver → Service → JSON Output

Clients:
- GraphQLClient: typed wrapper for raw GraphQL operations
- LinearSdkClient: wrapper for Linear SDK access

Common modules:
- context: CommandContext factory with createContext()
- errors: structured error helpers (notFoundError, etc.)
- identifier: UUID detection and identifier parsing
- output: typed outputSuccess/outputError functions
- types: shared type aliases derived from codegen types
- usage: DomainMeta system for self-documenting commands

Resolvers (human ID → UUID, using LinearSdkClient):
- team, project, label, status, issue, cycle, milestone, user

Services (business logic, using GraphQLClient):
- issue, document, attachment, file, comment, cycle, milestone,
  project, team, user, label, issue-relation, auth

Commands rewritten to delegate through layers:
- Rename embeds → files, project-milestones → milestones
- Merge search into list commands
- Add issue relation flags (--blocks, --blocked-by, --relates-to)
- Add cursor pagination (--after, --limit) to all list commands
- Add --assignee resolution by name or email
- Add encrypted token auth (login, status, logout)
- Add usage subcommand to every command group

Remove old utils/, queries/ directories and their tests.
Add comprehensive unit tests for all resolvers and services.

Closes #27, closes #43, closes #47
Refs #2, #3, #14, #16
Part of #45, incorporates #50, #53
Rewrite all documentation to reflect the new five-layer architecture,
updated CLI surface, and current development workflows.

- AGENTS.md: restructure for machine-first readability with decision
  trees, anti-patterns, and layer invariants
- README.md: rewrite for current CLI commands and agent optimization
- docs/architecture.md: document five-layer component organization
- docs/development.md: add service/resolver/command templates
- docs/testing.md: add mock patterns per layer
- docs/build-system.md: document codegen pipeline
- docs/files.md: update file catalog for new structure

Remove obsolete files:
- docs/Linear-API@current.graphql (26k-line schema dump)
- docs/plans/ (completed implementation plans)

Part of #45
Refs #54
File download and upload commands returned exit code 0 with
a JSON success envelope on failure. This caused LLM agents and
scripts checking $? to misinterpret failed operations as
successful.

Failures now throw through handleCommand() like all other
commands, producing JSON error output on stderr with exit code 1.
GraphQL requests and file operations had no timeout, causing the
CLI to hang indefinitely on stalled connections.

- GraphQL API requests: 30 second timeout (Promise.race)
- File download/upload: 60 second timeout (AbortSignal.timeout)

Especially important for LLM agents that have their own tool
timeouts and need the CLI to fail fast with a clear error.
- SECURITY.md with responsible disclosure process and scope
- GitHub issue templates (bug report form, feature request form)
- PR template with verification checklist
- Add contributors field to package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

None yet

1 participant