Repository navigation
🔀 feat: Show the Conversation Pull Request in the Chat Header - #16794
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. |
8fe2cba to
5f42256
Compare
|
Lighthouse CI failed. The last 80 log lines contain the measured budgets and assertion failures. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f42256192
ℹ️ 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".
5f42256 to
b5080c3
Compare
A header chip shows the pull request a code conversation opened: the agent picture with a CI status dot, the pull request icon and a truncated title. It opens a card with the number, added and removed lines, a link to GitHub, and state and checks badges. The chip renders nothing while loading, when there is no pull request, or when the first lookup fails.
b5080c3 to
7492a35
Compare
…It to the Overflow Menu on Small Screens On desktop the chip sits with the left header controls and its card opens to the right as an Ariakit hovercard that slides in from the left, on hover or keyboard focus. Small screens offer the same card from the header overflow menu through a dialog, following the dialog-item contract.
…tip Layering Advertise pullRequestsEnabled in the startup config and skip the lookup without it, keep polling a finished pull request while its checks run, render the card badges with the shared Chip, and portal the GitHub tooltip into the card's own layer.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0f90fac20
ℹ️ 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".
…and Chip Scope the mobile dialog to the conversation it opened for and expose dialog semantics on its menu entry, only use the chat agent's avatar for the routed conversation, and make the hover tests move the pointer the way a browser does so they pass under NODE_ENV=development as CI runs them.
Summary
The backend can now say which pull request a code conversation opened, but nothing shows it. This adds the pull request to the chat header for a conversation whose branch has one.
Desktop. A chip sits with the left header controls, right after the model selector: the agent's picture with a CI status dot on its corner (green passing, red failing, amber running, none when the repository has no checks), the pull request icon, and the truncated title. The icon is green for an open pull request with no conflicts, red for one with merge conflicts, and neutral for a draft, with their own icons for merged and closed. When the agent has no picture the dot sits on the icon. Hovering or focusing the chip opens a card to its right that slides in from the left (it only fades under reduced motion). The card shows the number, added and removed lines, an "Open in GitHub" link (
target=_blank,rel="noopener noreferrer"), andStateandChecksbadges. It stays open while the pointer or focus is inside it and closes shortly after both leave.Small screens. There is no room for the chip, so the pull request is an entry in the header's three-dots menu, in its own group before Share and Export. It opens the same card in a dialog and follows the dialog-item contract (
hideOnClick: false, item ref, button render, dialogtriggerRef), so focus returns to the entry on close.The header renders nothing while loading, for a conversation without a pull request, with the feature off, or when the first lookup fails, so it never shifts. If a later refresh fails, the last known pull request stays and the card says so with a retry button. Colors are semantic
status-*roles only, and state is also written in text so color is never the only signal. Polling is every 20 seconds while checks run or mergeability is unknown, every minute otherwise, and stops for merged or closed pull requests. It is not shown on subagent threads.It does nothing until
endpoints.agents.pullRequestsis enabled and a worker reports a branch.Type of change
Testing
Tested environments/configuration:
lc run, logged in as the dev account, at 1280x720 and 390x844, light and dark, on head6dc3fd86d.pullRequestsEnabledflag, and one agent with a picture (so the avatar layout is exercised). No real worker or GitHub token was involved.Checked in the browser:
PR #1234entry, the dialog shows the card with the GitHub link, and Escape closes it.Automated tests: the header, menu, chip, card, status and query specs pass under both
NODE_ENV=development(what CI runs) andtest.npx tsc --noEmitinclientexits 0,lc lintis clean,npm run static-checks -- --against origin/devpasses, and CI is green at this head. Mutation checks on the placement, menu entry, hover and focus behavior, polling, badges and tooltip layer each failed their intended test. Only English strings were added.Screenshots / recordings
Captured from the running app with the endpoint, startup flag and agent stubbed. Each desktop image shows the chip and its open card; the mobile images show the menu entry and the dialog.
Risk / compatibility
None for existing chats while
endpoints.agents.pullRequestsstays off: the startup config then does not advertise the feature and the client never calls the endpoint. Not checked: a real worker and token, a touch device, and the screenshots by eye (the numbers above come from computed styles and element boxes).Checklist