Skip to content

feat: show GitHub pull request status across desktop, remote, and iOS sessions - #116

Open
jsgrrchg wants to merge 18 commits into
zeronsh:mainfrom
jsgrrchg:feature/pull-request-status
Open

feat: show GitHub pull request status across desktop, remote, and iOS sessions#116
jsgrrchg wants to merge 18 commits into
zeronsh:mainfrom
jsgrrchg:feature/pull-request-status

Conversation

@jsgrrchg

@jsgrrchg jsgrrchg commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Add host-resolved GitHub pull request status to Zeron sessions across local desktop, remote desktop, and iOS surfaces.

The checkout host uses its existing authenticated gh installation to resolve the pull request. Remote desktop and iOS clients only receive the sanitized change-request summary through the existing RPC/device relay infrastructure.

What changed

  • Added provider-neutral change-request models to zeron-proto.
  • Added Git checkout and remote inspection in the engine.
  • Added GitHub PR resolution through gh pr list.
  • Reused login-shell PATH resolution so GUI launches can find gh.
  • Added host-side caching, deduplication, TTLs, backoff, last-known-success retention, and demand-based cache eviction.
  • Added WatchCheckoutChangeRequest as a local and forwardable stream RPC.
  • Preserved shared remote links when older engines return UnknownMethod.
  • Re-enabled PR capability detection after a remote engine version changes.
  • Added robust remote selection for branches without upstreams and default-branch detection when local remote HEAD refs are absent.
  • Added desktop state reconciliation for local and remote checkout sessions.
  • Added PR badges to the desktop sidebar and composer.
  • Added frosted/glass PR tooltips consistent with existing floating surfaces.
  • Added generic streaming RPC support to the iOS relay client.
  • Added PR badges and composer context to iOS session surfaces.
  • Added accessibility labels and URL handling for desktop and iOS badges.

Compatibility and security

  • No GitHub OAuth or Zeron-managed GitHub credentials are introduced.
  • gh runs only on the device that owns the checkout.
  • GitHub tokens, authentication output, stderr, and environment data never cross RPC boundaries.
  • Older engines degrade gracefully by reporting the PR stream capability as unavailable.
  • Remote transport failures still invalidate links; capability errors do not.
  • PR state remains ephemeral and is not persisted in chats, Loro documents, the registry, or cloud sidecars.

Future PR views

This work establishes the foundation for a future pull-request view.

The provider boundary, Git remote discovery, host-side gh execution, neutral change-request models, error classification, caching, and device-aware RPC transport are intentionally reusable for listing pull requests, loading details, checks, reviews, diffs, and future PR actions.

This PR only resolves the PR associated with the active checkout branch; a complete PR browser remains out of scope.

Validation

Passing:

  • cargo fmt --all -- --check
  • cargo test -p zeron-engine
  • cargo test -p zeron-rpc
  • cargo test -p zeron-ui
  • Source-control tests covering local and remote branches, forks, multiple remotes, branches without upstreams, uncached remote default branches, GitHub CLI failures, authentication errors, login-shell-only gh installations, and default-branch historical PR suppression.
  • Device-routing tests covering local, remote desktop, and simulated iOS consumers.
  • Swift unit-test sources for relay streams and change-request tracking are included in the branch.

The iOS simulator suite could not be completed in the current environment: the documented iPhone 16 destination is unavailable, and the available Zeron iPhone 17 Pro simulator rejected the test runner launch with an external Application failed preflight checks: Busy error.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@jsgrrchg
jsgrrchg marked this pull request as ready for review August 15, 2026 23:02

@wingleeio wingleeio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The host-resolved PR path and desktop UI behave correctly in a live fork/upstream run, but the new engine test suite has one blocking portability failure documented inline.

Validation performed:

  • cargo fmt --all -- --check — passed
  • cargo test -p zeron-engine — failed at github_cli_on_login_shell_path_only_resolves_pull_request
  • Full engine suite with only that test skipped, plus zeron-rpc, zeron-ui, zeron-proto, and zeron-harness — passed
  • Live desktop run — resolved cross-repository PR #116 and rendered the sidebar/composer badges and tooltip
  • iOS tests were not runnable on this Linux host

Live desktop badges:

PR #116 badges in the desktop sidebar and composer

Tooltip state/title:

PR #116 Open tooltip

Comment thread crates/engine/tests/github_cli_login_shell.rs Outdated
@jsgrrchg

Copy link
Copy Markdown
Contributor Author

Fixed in 0e7c6e5.

The test now uses an isolated direct PATH containing only the required git shim, so a system-installed gh cannot shadow the login-shell fixture.

Validated with:
cargo test -p zeron-engine --test github_cli_login_shell

Ui wise looks good? Tried to be minimal for now.

jsgrrchg added a commit to jsgrrchg/comet that referenced this pull request Aug 17, 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.

2 participants