Skip to content

feat(remote): GitHub Remote integration with progressive PR/Issue surfaces - #21

Merged
cherrchen merged 10 commits into
mainfrom
feat/git-remote
Oct 24, 2026
Merged

cherrchen merged 10 commits into
mainfrom
feat/git-remote

Conversation

@cherrchen

Copy link
Copy Markdown
Owner

Summary

End-to-end GitHub Remote platform integration (per ADR-0004, staged plan in docs/plans/active/remote-platform-integration.md):

  • Credential & capability lifecycle: credentials-seam gated feature fiber, Device Flow / GH_TOKEN / gh auth token discovery chain, generation-checked RPC boundary (remote-capability, login/poll/cancel/sign-out/grant management).
  • Portable PR/Issue surfaces: sidebar lists, detail pages with conversation comments, guarded write actions (comment, review, close/merge/checkout PR, create PR, issue branch) with expectedGeneration/expectedViewer/requestId admission and write-result-unknown recovery.
  • Progressive rendering: opaque next cursors (Link rel="next", origin-checked) on all list endpoints; Client streams a multi-page first request then one page per serial continuation, deduplicating by number/id/path; no total-item ceiling; bounded resetAt rate-limit recovery.
  • PR history view: remote-commits/remote-reviews endpoints; commit and review history sections; inline review comments nested under their owning review via reviewId; file changes reached through a GitHub Files link instead of an embedded diff; remote-files/remote-inline-comment remain guarded Host capabilities.
  • Fixes an infinite load/open retry loop on the detail surface after failures.

Test plan

  • pnpm test --maxWorkers=4 — 43 files, 451 tests
  • pnpm build / tsc --noEmit
  • pnpm docs:check — 57 files, 602 links
  • git diff --check
  • Real OAuth/SSO, remote writes, and cross-platform manual acceptance — Not verified (tracked in the plan log)

…cycle

Implement the staged remote integration from credential admission and OAuth
lifecycle through GitHub REST reads, verified Git checkout, guarded writes,
portable Client workflows, and notification deduplication.

Keep unavailable credentials fail-closed, bind writes to stable account and
repository facts, and preserve optional Desktop enhancement boundaries.
Update the bilingual implementation plan, RPC reference, and compatibility
installation and validation tooling.

Validation: 442 main-lane tests, build and compatibility checks, 4 artifact
tests, documentation checks, and all 17 supported DSH version lanes passed.
Real OAuth/SSO, remote mutations, and platform manual acceptance remain open.
…source tabs

Decompose the monolithic remote surface into presentational components
under src/client/remote/ backed by ui-primitives (Menu, Pill, Tag,
StateDot, DisclosureRow, Modal, MarkdownText), aligned with the
changes/graph page conventions and a dedicated CSS module.

Move authentication behind a toolbar icon + dialog on both list and
detail toolbars, and open PR/issue entries as shared git.remote.item
resource tabs addressed by dsh-resource://git-remote/<owner>/<repo>/
<kind>/<number>, so detail state lives per tab instead of inline below
the list.

Item row hover now bleeds to the pane edge for a uniform band width,
matching the graph row convention.
Remote reads previously stopped at a fixed pagination budget and flagged
truncated, leaving long PR/Issue lists, comment threads and comparisons
permanently unreachable. Progressive reads now follow the Git Graph
pattern: RemotePage carries an opaque next cursor (the origin-checked
Link rel="next"), list/comments/files endpoints accept cursor and pages
fields, and the Client controller appends pages in a serial background
stream with generation checks, defensive deduplication and one bounded
resume after a rate limit. remote-files continuations pin the
head/base snapshot so inline-comment coordinates cannot drift; inline
submission stays disabled until files are fully loaded.
@cherrchen

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T15:51:06.879302Z b917738 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Retain tab data with freshness windows and conditional page validation. Display localized authentication sources and refresh them after credential actions.

Add isolated browser E2E coverage and CI checks, with bilingual architecture and testing documentation.
…thentication dialog

GitHub bodies with details/summary, comments, images and other HTML no longer show raw tags; PR and issue activity is ordered chronologically with GitHub avatars; the detail page gains wider margins; the authentication dialog becomes a status card plus a GitHub CLI / OAuth choice.
@cherrchen

Copy link
Copy Markdown
Owner Author

@codex review

@cherrchen
cherrchen marked this pull request as ready for review October 24, 2026 15:48

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b917738dea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/remote/github.ts Outdated
Comment on lines +55 to +56
this.viewer ??= this.loadViewer(op)
op.viewer = await this.viewer

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Clear the cached viewer promise when loading fails

If the initial /user request times out, is cancelled, or encounters a temporary provider failure, this.viewer retains the rejected promise. Every subsequent authenticated operation in the same generation awaits that rejection without making another HTTP request, so refreshing cannot recover and remote functionality remains unavailable across repositories and sessions until authentication is reset or the provider restarts. Clear the cached promise on rejection while preserving successful viewer caching.

Useful? React with 👍 / 👎.

Comment thread src/client/remote/github-markdown.ts Outdated
Comment on lines +29 to +30
const value = name.startsWith('#x') || name.startsWith('#X') ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10)
return Number.isSafeInteger(value) ? String.fromCodePoint(value) : all

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Bound numeric entities before converting Unicode code points

A remote body containing an out-of-range numeric entity, such as <code>&#1114112;</code>, passes Number.isSafeInteger but causes String.fromCodePoint to throw a RangeError. RemoteMarkdown calls this conversion synchronously during rendering without catching the exception, so malformed content in a PR description or comment prevents the detail view from rendering. Validate the Unicode range before conversion and preserve invalid entities or replace them with a replacement character.

Useful? React with 👍 / 👎.

@cherrchen
cherrchen merged commit ecb29df into main Oct 24, 2026
18 checks passed
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