Skip to content

feat: open any pull request of the task's repository in a Pull request tab - #3823

Merged
luke-agent[bot] merged 3 commits into
mainfrom
luke/pull-request-tab-by-number
Oct 19, 2026
Merged

luke-agent[bot] merged 3 commits into
mainfrom
luke/pull-request-tab-by-number

Conversation

@dastratakos

@dastratakos dastratakos commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Why

Dean asked why #3798 opened on GitHub while #3799 opened in Luke. Both should open in Luke unless something fundamental stops them.

The cause: a Pull request tab belonged to an agent and only showed the pull request from the branch that agent is on now. The same agent opened both PRs. It switched to a new branch for #3799 after opening #3798, so nothing in Luke counted #3798 as anyone's, and its link went to GitHub. Every endpoint the tab reads and writes through was keyed by agent id alone.

What changes

Service, wire, host. The tab's reads and writes can now name a pull request with an optional number query:

  • Covered: what the agent published, changes, the overview's pull request, checks and conversation, viewed files, and the pull request action.
  • With a number, the service reads that PR of the agent's repository fresh (agentPullRequestOfNumber). It never writes it on the agent's row.
  • Without one, everything works as before.
  • This is threaded through service-paths, the client, the act/gateway schemas (codingAgentPullRequestReadParamsSchema, plus number on the action params) and host-operator.
  • Review options and GitHub images are per repository, so they are unchanged.

Panel.

  • ChangesStripTab gains an optional number, which sameTab, tabKey, the stored tab schema, pins and per-tab views all respect.
  • The tab passes its number down a context (pull-request-number.ts), so its writes include it: comments, threads, reactions, viewed marks, and merge/close. Each read binds it too.
  • A numbered tab gets its title, counts and mark from numberedPullRequests, kept separately from the agents' own PRs.
  • A link to any PR of the task's repository now opens in Luke from a task, an agent's page or an Inbox item. If an agent's own PR matches, that agent's tab opens. Otherwise the PR opens in a numbered tab on the first agent. A numbered link to an agent's own PR still opens its own tab.

Not covered

Links outside a task's own places still go to GitHub when the PR isn't any listed agent's current one: Factory, Chat, another task's card. That would need Luke links to carry a PR number; I left it out to keep this small.

Tests

  • Service: a numbered read returns the earlier PR (title, branch, counts), and a numbered action reaches GitHub with that number. Without a number, the agent's own PR is used. A bad number is refused.
  • Host: the gateway passes number through to the client.
  • Panel: a numbered tab reads, counts and changes its own PR. showPullRequest with a number opens a separate tab unless the number is the agent's own. openPullRequestsHere sends another PR of the repository to a numbered tab.
  • UI: repositoryPullRequestOf and the Inbox target.
  • JSON-schema fixtures: updated under LUKE_UPDATE_FIXTURES=1. There is one new fixture, and the action params gain number.

Typecheck passes in every package, run one package at a time. pnpm check:affected couldn't finish in the sandbox: the parallel typecheck ran out of memory and two unrelated features tests timed out under load, then passed when re-run alone.

Made with Luke


Devin Review

View guided diff Turn on auto-fix

dastratakos and others added 2 commits October 19, 2026 11:10
… by its number

An agent's Pull request tab could only show the pull request from the
branch the agent stands on now, so a pull request it opened before moving
to another branch had no tab. The tab's reads and its changes (changes,
the overview's three parts, viewed files, and the pull request action) now
take an optional `number`: the pull request of the agent's repository by
that number, read afresh and never written on the agent's row. With no
number they read the agent's own pull request as before.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
… request tab

A link to a pull request no agent stands on now, such as one an agent
opened before moving to another branch for the next PR of a stack, opened
on GitHub. A Pull request tab may now name a pull request by its number
(`{ changes: agentId, number }`): it reads, counts, and changes that pull
request through its agent, is kept, pinned, and named apart from the
agent's own, and a link to any pull request of the task's repository, on a
task, an agent's page, or an Inbox item, opens in one.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
luke-web Ready Ready Preview Oct 19, 2026 11:44am UTC

Request Review

devin-ai-integration[bot]

This comment was marked as resolved.

…eep their newest read

Review on the numbered Pull request tab:
- Tab views, pin names, and the numbered pull requests the control keeps
  are nested by agent and then number rather than keyed by a joined id,
  and the strip draws a numbered tab under a key made for the two.
- A numbered read landing after a newer one no longer takes it back.
- A numbered read that failed or named none is asked again the next time
  the open tabs change, so its tab's name is not stranded.

Tests whose links to another pull request of the repository opened on
GitHub now open it by its number, as this change means them to.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@luke-agent
luke-agent Bot added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit 3f47a9f Oct 19, 2026
11 checks passed
@luke-agent
luke-agent Bot deleted the luke/pull-request-tab-by-number branch October 19, 2026 12:01

This branch was successfully deployed

1 active deployment
Preview — 88c351e6 Deployed Oct 19, 2026 by vercel[bot]
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