Skip to content

Add a repository-scoped PR board and native inspection - #175

Open
katulevskiy wants to merge 38 commits into
mirror/upstream-mainfrom
mirror/upstream-pr/484
Open

katulevskiy wants to merge 38 commits into
mirror/upstream-mainfrom
mirror/upstream-pr/484

Conversation

@katulevskiy

Copy link
Copy Markdown
Owner

Upstream mirror

Source: zeronsh#484
Original author: @gaelcado
Original revision: 9a236a8ba6f318ad0d84f48dfe2f47bdb30ae91c

This PR is an isolated Contribution Manager pilot mirror. Its reviews, checks and merge state are separate from upstream. An empty [skip ci] commit suppresses automatic bulk CI; the code tree matches the imported upstream revision.


Adds a Pull requests board for one GitHub repository, a native pull request view (Summary, Code, Activity), comment posting, and "hand off to an agent" actions. Everything goes through the gh CLI already installed and signed in on the selected device.

Builds on José Gurruchaga's (@jsgrrchg) pull request dashboard from #181 (closed, unmerged). His pull request contracts, GitHub CLI queries and board foundation were ported onto current main; the commits carrying that work credit him with Co-authored-by. The detail view, code review, activity, media, handoff and paging are new.

Board

  • Opens on the repository it is opened from: the sidebar's project, else the open session's project, else the repository viewed last, else the most recently active local Git project that is on GitHub. Opening it from another project follows that project; a repository chosen by hand stays until then.
  • Authored / Reviewing / All filters, local search and sorting, grouped by what needs attention. 50 pull requests per page with "Load more" and the total count.
  • Works against another device through the relay. Devices whose engine predates this feature report "Update Zeron".
  • The Pull requests entry sits in the sidebar footer on every screen, Settings included.

Pull request view

  • Summary: status, review, branch and changes; checks; description with images.
  • Code: a file tree beside one continuous, syntax-highlighted review stream with a pinned file header, fold-all, split view and file search.
  • Activity: comments and reviews as a thread, with a composer that matches the chat composer. @ suggests the pull request's participants.
  • Hand off to an agent: Review, Address feedback, or Fix failing checks open a new session with the prompt staged, not sent. Pull request text in the prompt is reduced to one plain line and marked as data.
  • PR badges open this view for github.com pull requests when "Open pull requests in" is set to "Pull request view" (the default); other hosts and the "Default browser" setting open the browser.

Engine and protocol

  • New RPC methods: ListChangeRequestPage, GetChangeRequestRepository, GetChangeRequest, GetChangeRequestDiff, PostChangeRequestComment. Repository, URL and cursor are validated before they reach gh; GH_HOST is pinned to github.com.
  • Provider failures cross the wire as stable codes (RpcError::Capability), never as gh output. The UI turns them into instructions.
  • A 24-entry engine cache: results last five minutes (15 seconds under Refresh), failures one minute unless retried explicitly, and a rate limit pauses requests for 15 minutes. Identical reads share one gh call, distinct reads run side by side, and a read finishes and is cached even if its caller leaves. Writes are never retried.
  • Comment text is sent to gh on standard input. A comment keeps posting if the view is closed; a failed one comes back as a draft with the reason.
  • ServerFrame now delivers a unary reply whose value is null (previously the caller waited for its own timeout). This affects every RPC that can answer null.

Privacy

  • Images in pull request text load from GitHub's hosts only. Images on other hosts show a "Click to load" tile.
  • The image transport reaches public HTTPS addresses only, on every redirect hop and after DNS resolution: no plain HTTP, loopback, private, link-local or CGNAT addresses.

Out of scope

Review submission and merging stay on GitHub. GitHub Enterprise hosts open in the browser.

Validation

At 9a236a8b, on macOS:

  • cargo test -p zeron-ui --lib -- --test-threads=1: 1,466 pass.
  • Keyboard-only walks of the board, Summary, Code and Activity (offscreen fixture): every stop shows a focus ring; search, file search and the comment box are reachable; menus return focus.
  • cargo test -p zeron-engine --lib: 405 pass. cargo test -p zeron-rpc -p zeron-proto: pass.
  • cargo test -p zeron-engine --test e2e: 26 pass; generated_image_is_materialized_before_publication_and_survives_reopen fails locally and fails the same way on main.
  • cargo test -p zeron-client -p zeron-mobile -p zeron-markdown: pass.
  • The offscreen fixture (cargo run -p zeron-ui --example pull-request-fixture --features pull-request-fixture -- <dir> zeronsh/zeron 484) loads the board, Summary, Code and Activity against real GitHub in dark and light themes.

All comment submissions in tests use fakes; no live comment was posted.

gaelcado and others added 30 commits October 1, 2026 13:51
Co-authored-by: José Gurruchaga <jsgrrchg@gmail.com>
Co-authored-by: José Gurruchaga <jsgrrchg@gmail.com>
Co-authored-by: José Gurruchaga <jsgrrchg@gmail.com>
Co-authored-by: José Gurruchaga <jsgrrchg@gmail.com>
Show every changed file in one virtualized stream with foldable,
sticky file headers, a directory-grouped tree that follows the scroll
position, and a compact picker on narrow windows. The tab bar gains
counts, neutral selection, and tablist keyboard navigation.
Add ListChangeRequestPage, which follows GitHub search cursors 50 at a
time and reports the total match count. Cursors are validated before
they reach gh, and the single-page listing keeps serving older clients.
The board shows GitHub's total count and appends further pages on
request, without repeating a PR that moved between pages. Engines
without paging fall back to the single-page listing.
The Summary tab offers Review, Address feedback and Fix failing checks.
Each opens a new session with a prompt carrying the PR identity, branch,
failing checks and gh commands, staged in the composer for review. A
copyable checkout command sits alongside.
Summary cards now carry their own headings and sit at one 12px rhythm;
freshness joins the header's metadata line. The titlebar and metadata
use the PR icon instead of a hash. The changed-file tree runs to the
window edge with scroll fades while the diff keeps clear of the tab bar.
Jumping to a file landed its header's top divider directly under the
stream card's border. Jumps now land just past the divider, and the
pinned header stays hidden until the real one scrolls away.
The pull-request-fixture example renders the production Shell in an
offscreen window that never takes focus, against a real engine and gh.
A delaying gh shim holds loading states long enough to capture them.
Loading now renders the loaded layout with pulsing placeholders: board
rows, the detail header with Summary cards, and the Code workspace with
tree and diff. Overview rows share one label column, the handoff card
sits on the card's content edge, long titles wrap, long branches
ellipsize, and Activity keeps the Summary's 24px header gap.
The handoff card now reads like the Overview: its purpose on the left,
filled actions trailing on one line (wrapping below when narrow) with
hover summaries, then the checkout row on the shared label column.
On frosted surfaces the pinned header used the Changes pane's near-opaque
content tint, so it read lighter than the rows and its square blur
overhung the stream card's rounded corners. It now keeps the rows' own
wash over a stronger blur with a faint veil, and follows the card's
inner radius. The visual fixture captures it in frosted light and dark.
Chat and Settings now render one shared footer row (account, settings,
Pull requests), so the entry holds its place across the swap and opens
the board straight from Settings.
The comment composer drops its Markdown caption and labelled Comment
button. The input now carries the chat composer's filled send circle on
its last line, shared through composer::send_circle.
…esults

The PR cache held its lock across each gh call, so a diff, a detail and a
board page queued behind one another; through the relay two back-to-back
reads could exceed the 30s forward deadline. Identical reads still share one
call; distinct reads now run concurrently, and a comment post also drops an
in-flight detail read that may predate it.

GitHub returns null search nodes for results the viewer cannot read; skip
them instead of failing the whole page.
Images come from untrusted PR text and load on sight. Refuse plain HTTP,
credentials, loopback, private, link-local, CGNAT/Tailscale and local
names, in the URL filter, the transport, and every redirect hop.
Refresh away from the Code tab only dropped the diff, so the next visit
could reuse a diff up to five minutes old against fresh details. The next
diff load now bypasses the cache.

Detail, diff and comment errors showed raw RPC text such as
"capability error: pull_requests.authentication"; they now say what went
wrong and what to do. Also drop an unused binding and two unused imports.
ServerFrame decoded "ok": null as a missing ok, so a reply of null (an
absent Option, such as a checkout with no GitHub remote) never reached the
caller, which waited for its own timeout. Keep an explicit null as a reply.
Resolve the repository without asking: the sidebar's project, else the open
session's project, else the repository viewed last, else the most recently
active local Git project that is on GitHub. Reopening the board from another
project follows it; an explicit choice stands until then. The project menu
lists Git projects by name with their path muted.
The Activity composer floated over the thread above the floating tab bar,
with text showing between the two layers, and used its own surface. It now
sits in the flow between the thread and the navigation (the thread ends and
fades above it), with the chat composer's surface, radius, 49px compact
height, insets and send placement.
RpcError::Capability left zeron-client's exhaustive match incomplete, so the
iOS job's Rust mobile core tests failed to compile.
gaelcado and others added 8 commits October 1, 2026 13:51
Main standardized icon-button tooltips on widgets::text_tooltip; drop the
PR board's two private tooltip views in favor of it.
Engine
- A read whose only caller left stayed registered forever; later requests
  joined it and got a false timeout or stale data. Reads now run detached:
  they complete and are cached whoever is still waiting.
- An explicit refresh retries a cached failure instead of replaying it.
- gh exits non-zero when a search carries partial errors (results the
  viewer cannot read); keep the readable results once the repository
  resolved.
- Comment text goes to gh on stdin, so long comments fit on Windows.

RPC
- Drop cancel-on-drop for unary calls: it applied to every call site and
  aborted work such as harness installs when a view let go of its task.
- Keep one listing method, ListChangeRequestPage; the three earlier
  listing methods never shipped.

Tests cover an abandoned read, refresh after failure, partial errors, stdin
delivery, the evicted cache key, and the comment RPC end to end.
…s fresh

- Snapshots are matched without regard to case, so adopting GitHub's
  casing no longer forces a reload when the repository is reselected.
- Pages loaded after a refreshed first page bypass the engine cache too.
- Remove the fallback to the unshipped single-page listing.
- Replace the trivial stale-response test with one that leaves a filter
  mid-load and checks the late reply is ignored.
- A comment keeps posting when the view closes; a failed one returns as a
  draft with the reason, and a posted one invalidates the cached thread.
- PR badges for hosts other than github.com open in the browser.
- Handoff prompts carry pull request text as one plain line, branch names
  reduced to shell-inert characters, only github.com check links, and a
  note that this text is data.
- Images on hosts other than GitHub's load on click; the transport also
  refuses names that resolve to private addresses.
…leftovers

- The Pull requests route shared the chat layout with its side pane still
  mounted, which could take the board's whole width.
- A handoff keeps a draft already on the new-session canvas above its prompt.
- Remove unreachable Settings arms, the stale fake-gh demo, the unused
  "browser" settings alias and visibility change, the shared page-header
  alignment change, and formatting-only edits to code outside this feature.
… their copy

- Every control uses the app's 2px accent focus ring; the send button and
  project rows had none, and tint-only focus matched hover.
- Board search, file search and the comment box join the Tab order. Menus
  return focus to their trigger, sort and device menus opened from the
  keyboard start on the current option, and the file tree is one stop moved
  with the arrow keys. Board rows lose their duplicate badge stop.
- Branch and check names wrap instead of hiding the base branch; offline
  devices are labelled; section-tab counts keep full contrast.
- A failed image opens in the browser; errors suggest the repository name or
  link and offer Try again; the header says Loaded, not Updated; "1 file".
- A comment shows a spinner while it posts; comment authors line up with the
  title; board text follows the interface text size; one name per screen.
@contribution-manager-katulevskiy contribution-manager-katulevskiy Bot added the review:needs-triage Managed by Contribution Manager label Oct 6, 2026
@contribution-manager-katulevskiy

Copy link
Copy Markdown

Contribution Manager

needs triage · medium risk · untriaged

Open review workspace · Revision 4559b174

Next actions:

  • Direction decision needed
  • Scope, risk, and platform triage needed
  • Independent code review needed
  • Required check: core-tests (missing)

This summary is maintained by the review app. Decisions and test evidence are recorded in the workspace; the app does not merge PRs.

@contribution-manager-katulevskiy contribution-manager-katulevskiy Bot added cm:inbox Contribution Manager: waiting for triage and removed review:needs-triage Managed by Contribution Manager labels Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cm:inbox Contribution Manager: waiting for triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants