Repository navigation
🔀 feat: Show the Conversation Pull Request in the Sidebar List - #16815
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c535d2a6d
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00b7ef69d1
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6810c3e75
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc22b7fe46
ℹ️ 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".
Add a batch lookup route and a sidebar row mark: the state icon with the CI dot, opening the same card beside the row on hover. The row keeps the conversation's own title.
…w Mark Cap the whole batch with a configurable deadline, make the row mark a keyboard-reachable button that opens the card on focus, refresh rows when the window regains focus through the shared batch, and show a retryable failure state instead of treating a failed first lookup as no pull request.
Queue every batch request behind the one before it, so an oversized list or an overlapping flush cannot multiply the server's configured lookup concurrency, and bound how long one request may hold the queue so a request that never answers cannot stop the rest.
Default the client's request timeout to just past the longest batchTimeoutSeconds a deployment may configure, so a queued request never starts while the previous request's server-side lookups are still running.
fc22b7f to
19f92dd
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 19f92dd835
ℹ️ 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".
…ilures Per Entry Share one lookup limiter across every batch request so lookups that outlive a request's deadline keep their slot, answer a missing token only for the conversations that needed it, and point the row at its pull request description only while that text is in the page.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 407488a923
ℹ️ 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".
…e Sidebar on the Batch Version Start the batch deadline when the request arrives and bound the config and lane reads, count lookup slots per credential, advertise a batch route version and ask only a server that has it, take no row space for an absent mark, show a failed refresh over a cached empty answer, keep a malformed response from stalling the request queue, and repair the lane recording tests that still used a mock removed on dev.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1009b89890
ℹ️ 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".
… Route and Queue Resolve the pull request startup capabilities in packages/api so the route stays wiring only, bound the config and lane reads by the configured deadline, merge identical lanes before taking limiter slots, fall back to the single route when a replica has no batch route, and dispose the batch queue when the signed-in user changes.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 10596609dd
ℹ️ 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".
…rlaps It Give the batch fetcher the request's abort signal and pass it to every single-route call, abort a request that times out or is disposed, and stop the fallback workers from starting more calls once it has.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8764a2f695
ℹ️ 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".
Pass the request's abort signal through the batch fetcher, the data-provider call and Axios, so a batch request that times out or is disposed is cancelled instead of continuing beside the next one, and settle a request promptly when it is aborted.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0c7b58d81
ℹ️ 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".
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Summary
The pull request chip in the chat header only helps for the chat that is open, so finding which chats in the sidebar have a pull request, and whether it can merge, means opening each one. This adds the same signal to the conversation list: a conversation that opened a pull request gets the pull request icon and its CI dot at the end of its row, and hovering it opens the same card as the header, to the right, sliding in from the left. The row keeps the conversation's own AI-generated title; the pull request title appears only in the card.
A list of rows cannot ask for one pull request each, so this adds
POST /api/convos/pull-requests, which takes up to 50 conversation ids and answers each one from a single owner-scoped read of the stored lanes. Rows mounted together are gathered by a small client batcher into one request. Each entry carries its own result or a stable failure code, so one repository's rate limit does not hide the others. The batch shares the single route's lookup, so its cache, in-flight sharing and rate-limit cooldown apply to both, and a conversation open in the header and visible in the list is fetched once. Row marks never poll: a list that polled once per row would multiply GitHub traffic by the number of rows, so a row is as fresh as the last time the list loaded, and the header chip keeps its own polling.It builds on the header chip (#16794, merged). It does nothing until
endpoints.agents.pullRequestsis enabled, which the startup config advertises aspullRequestsEnabled, withpullRequestsBatchVersionbeside it once this server has the batch route.How it works
The mark sits after the row's menu slot on purpose. That slot grows from zero width on hover, and anything placed before it slid left under the pointer, so the card never opened for a user arriving at the mark. After it, the mark stays put and only the title gives way.
Failure handling. A conversation whose lookup fails shows a warning mark with a retry instead of looking like a chat with no pull request. A missing token fails only the conversations that needed one. If a replica without the batch route answers 404 during a rolling upgrade, the client asks the single route for each conversation instead, at the limit the startup config advertises as
pullRequestsMaxConcurrentLookups(one at a time when it is missing). The batch queue belongs to the signed-in user and is disposed when the user changes and when the session ends, and a request that times out or is disposed is aborted before the next one goes out. A row that unmounts withdraws its id: it leaves the queue, a queued request nobody waits for is skipped, and one already on the wire is aborted. Conversations on the same repository, branch and head share one lookup and one slot, within a request and across concurrent requests, and the batch has one deadline (batchTimeoutSeconds, default 20) that starts when the request arrives.The lookup itself also closes the follow-ups from the #16793 review: the lane epoch is read in the same snapshot as the workspace, fork pull requests have their checks read from the fork when an administrator allowed that repository, GitHub requests go through the deployment proxy, a branch name reused many times can be searched past one page (
maxCandidatePages), the subagent lane context is one tenant-scoped read, a headerless 429 gets the secondary-limit cooldown, a vanished head is an upstream error instead of no checks, an unborn lane matches nothing, shared-token cache capacity keeps the largest value, and open fork pull requests win over closed base ones.Type of change
Testing
Tested environments/configuration:
lc run, 1280x720, light and dark, device scale factor 2.pullRequestsEnabledflag. No real worker or GitHub token was involved.Checked in the browser:
Icon and dot colors, read from computed styles on the rendered rows:
#047857green#6ee7b7green#047857green#6ee7b7green#b91c1cred#fca5a5red#b91c1cred#fca5a5red#424242neutral#cdcdcdneutral#b45309amber#fcd34damber#047857green#6ee7b7green#424242neutral#cdcdcdneutralThe icon follows the pull request's state (green ready to merge, red merge conflicts, neutral draft, merged and closed) and the dot follows its checks (green passing, red failing, amber running, none when there are no checks or the pull request is finished).
Automated tests:
packages/api/src/pullsandsrc/codepass (993 tests across 27 suites), including the batch handler (order, allowlist, per-entry failures that expose only a code, the concurrency bound across requests and per credential, one deadline that covers the config and lane reads, identical lanes sharing one slot and one lookup across concurrent requests, a missing token failing only the entries that needed it, invalid bodies, and the same lookup input as the single route) and the capability resolver.packages/data-schemas(359 tests) covers the bulk lane read, the epoch returned with the admitted decision, and the single-aggregate subagent context with owner, tenant and expiry cases.src/components/Chat,src/components/Conversationsandsrc/data-providerpass withNODE_ENV=development(what CI runs) andtest. They cover the batcher (one request per window, one at a time, per-entry failures, timeout, abort, disposal, malformed responses), the 404 fallback and its advertised limit, withdrawing unmounted rows, ending the queue with the session, the row mark (keyboard, failure and retry, refresh on focus, no polling, per-user queue) and the row itself.npx tsc --noEmitexits 0 indata-provider,data-schemas,apiandclient.lc lintis clean andnpm run static-checks -- --against origin/devpasses. One string was added,com_ui_pr_load_failed, in the English locale file only.Screenshots / recordings
Captured from the running app with the endpoint and flag stubbed. Each image shows real sidebar rows in the five states above, and the card open beside the first one.
Risk / compatibility
None for existing chats while
endpoints.agents.pullRequestsstays off: the flag is not advertised and the client never calls the new route. The route is owner-scoped and an id that is missing, expired or another user's looks the same as one without a lane. Adds config fieldsmaxConcurrentLookups(default 4, 1 to 16),batchTimeoutSecondsandmaxCandidatePages(default 1, 1 to 10), and one startup config field,pullRequestsMaxConcurrentLookups. Not checked: a real worker and token, a real proxy, fork check runs against live GitHub, a touch device, a long list under real GitHub latency, and the screenshots by eye (the numbers above come from computed styles and element boxes). Your mockup's draft icon is an empty circle and this one is a neutral draft icon.Checklist