Repository navigation
feat(native): pull requests page, detail panel and thread links - #36
Merged
Merged
Conversation
Ports pullRequestQuery.ts, the list logic (filters, grouping, ranking, quick actions, facets), the detail logic (checks, primary control, merge method, timeline) and link parsing into t3-core, with tests. Thread rows now decode their linked pull requests.
ClientHandle::pull_request_diff posts to /api/pull-requests/diff as pullRequestDiffHttp.ts does. The pr_probe example lists, reads one pull request's detail, checks, activity and patch, and decodes each.
The page lists pull requests grouped and sorted, with the Filters and sort menus, the search syntax and Shift quick actions. Selecting one opens its detail: Summary, Timeline and Code (the diff panel in a detached mode), with merge, auto-merge, ready, draft, close and reopen behind the web's two-step confirmations. Threads gain the link dialog and a Linked pull requests right panel surface. Opened from the sidebar footer and the command palette.
This was referenced Nov 2, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The native client had no pull request surfaces: no pull requests page, no detail view, and no way to link a pull request to a thread or see the ones linked.
Approach
Ported from the web, logic first:
crates/core/src/pull_requests/(pure, tested): wire types forpullRequests.list/listStats/filterOptions/detail/checks/activityand the diff result. Decoding is forward-compatible: unknown literals becomeUnknown, and a bad entry is dropped instead of failing the whole list. Also ported: the search syntax (pullRequestQuery.ts, includingapplyPullRequestDraftFilterChange), the list logic (pullRequestList.logic.ts: involvement, local filters, grouping, all seven sorts, match scores, quick actions, facets), the persisted list preferences (t3.pullRequests.preferences), the detail logic (pullRequestDetail.logic.ts: checks summaries, primary control, merge method, review outcomes, conversation threads, timeline), link parsing (pullRequestLinkInput.tsover the GitHub, GitLab, Bitbucket, Azure DevOps and Forgejo change request routes), thethread.pull-request.link/unlinkcommands, and the tagged-error messages. 31 tests.crates/client:ClientHandle::pull_request_diffsendsPOST /api/pull-requests/diffthe waypullRequestDiffHttp.tsdoes. There's also a read-onlypr_probeexample.crates/app/src/pull_requests/:pullRequests.invalidate).listStatsand are cached across reads. Shift shows quick actions (close, merge, ready, reopen), which run immediately as on the web. "Load more" follows cursors or grows the page size.DiffPanel::detachedandshow_external, with no scope menu or whitespace toggle. Patch slices load in sequence.#42, orgh pr checkout 42, validated as you type) and a Linked pull requests right panel surface (state, checks, watching, source, unlink, open in the page, and footer counts).pullRequest.copyNumber(mod+shift+k) on the page.AppState.pull_requests_open, andselect_thread/start_draftleave the page.SurfaceKind::PullRequestsin the core right panel model.ThreadShell.pull_requests, lenient and not serialized; conformance unchanged.PR state colors reuse the status-pill tokens, which are the same Tailwind hues: emerald for open, violet for merged, red for closed. Draft uses
muted_foreground.Ledger rows
PR-PAGE,PR-DETAIL,PR-LINK→partial(gaps below).Verification
cargo test --workspace: core 469 passed (31 new), client 17, conformance 5, app 4.cargo clippy --workspace --all-targets -- -D warnings: clean.node scripts/gen-theme.ts --check: up to date.node --test parity/sync.test.ts: 42 pass.conformance/generate.ts --check: exit 0.cargo run -p t3-client --example pr_probe):With
--state all, after the rebase: 99/99 decoded, plus a pull request with 11 comments, 3 review threads and 2 commits, which made 10 timeline events.Gaps (follow-ups)
filterOptionsread.diffFileContents).