Skip to content

feat(mobile): Linear ticket client + fix OAuth URL scheme regression - #10

Merged
alex-mextner merged 5 commits into
mainfrom
feat/mobile-linear-client
Aug 7, 2026
Merged

alex-mextner merged 5 commits into
mainfrom
feat/mobile-linear-client

Conversation

@alex-mextner

Copy link
Copy Markdown
Member

Summary

  • Adds a native async/await Linear GraphQL client (LinearClient.swift) behind a
    protocol: cursor-based pagination beyond the first page, and typed GraphQL error
    surfacing instead of silent truncation. Covered by LinearClientTests.swift (7
    tests) using an injected transport — no live network calls.
  • Fixes a regression where mobile/App/Info.plist silently lost its
    CFBundleURLTypes (OAuth hypergit:// URL scheme) block on every
    xcodegen generate run. Root cause: mobile/project.yml's
    targets.HyperGit.info.properties didn't declare CFBundleURLTypes, and XcodeGen
    treats Info.plist as a generated artifact — any key missing from
    info.properties gets dropped on regeneration. This silently broke OAuth on every
    local rebuild and in CI (.github/workflows/mobile.yml runs xcodegen generate on
    every mobile/** push/PR), since OAuthService.swift uses
    ASWebAuthenticationSession with callbackURLScheme: "hypergit" for both GitHub
    and Linear OAuth, and iOS needs that scheme registered to route the callback back
    into the app.

Test plan

  • swift build — clean build, no errors.
  • swift test — 31/31 tests passing across 4 suites (LinearClient GraphQL
    tickets, Models, OAuth config, GitHubClient parsing + pagination).
  • xcodegen generate (version 2.45.4) verified end-to-end: regenerating
    Info.plist with the project.yml fix reproduces the CFBundleURLTypes
    block byte-for-byte identical to the committed file. A negative control
    (temporarily reverting the fix and regenerating) reproduces the original bug —
    the block disappears — confirming the causal link.
  • Multi-model code review (review diff) run on the fix; findings concerned the
    pre-existing OAuth implementation (PKCE/state validation, scheme naming), not
    this diff, and were verified against OAuthService.swift — the fix is
    confirmed necessary and correct for ASWebAuthenticationSession's documented
    URL-scheme-registration requirement.

Closes #3

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

alex-mextner and others added 4 commits June 30, 2026 17:04
mobile/project.yml's targets.HyperGit.info.properties did not declare
CFBundleURLTypes, so `xcodegen generate` treats App/Info.plist as a
generated artifact and silently drops any key not listed there. This
clobbered the manually-added hypergit:// URL scheme registration on
every regeneration (including CI, which runs xcodegen generate on
every mobile/** push per .github/workflows/mobile.yml).

OAuthService.swift uses ASWebAuthenticationSession with
callbackURLScheme: "hypergit" for both GitHub and Linear OAuth
(redirect URI hypergit://oauth-callback). Per Apple's documented
pattern, the scheme must be registered in CFBundleURLTypes even when
using ASWebAuthenticationSession, or iOS has no way to route the
callback back into the app — the OAuth flow breaks silently on-device
and in CI, with nothing currently asserting the callback works.

Adds CFBundleURLTypes to project.yml's info.properties so the
generated Info.plist keeps the registration on every future
regeneration. Verified with xcodegen 2.45.4: regenerating with the
fix reproduces the committed Info.plist's CFBundleURLTypes block
byte-for-byte; reverting the fix and regenerating strips the block
(negative control), confirming the causal link.

Blocks shipping the mobile Linear client work tracked in #3 (OAuth
must work before that PR ships).

Refs #3

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@alex-mextner
alex-mextner merged commit a53e72f into main Aug 7, 2026
12 checks passed
@alex-mextner
alex-mextner deleted the feat/mobile-linear-client branch August 7, 2026 15:37
alex-mextner added a commit that referenced this pull request Aug 7, 2026
Brings in PR #12 (CI fix: pin apple-actions/import-codesign-certs to a
commit SHA) and PR #10 (Linear ticket client + OAuth URL scheme fix) so
this branch's CodeQL check can pass before merging.

Resolved conflicts in HyperGitApp.swift, TicketsView.swift, AppStore.swift,
and ModelsTests.swift by keeping this branch's fetchTickets/TicketSourceOutcome
refactor, which already carries every behavior main added (partial-results
handling, auth-failure differentiation) plus this branch's own stale-cache
banner tracking (issue #4).

Refs #4
alex-mextner added a commit that referenced this pull request Aug 18, 2026
Refs #3

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.

Mobile: Linear client (tickets, offline view)

1 participant