Skip to content

feat(web): drag the Pull Requests button and a thread's PR badge into the layout - #37421

Open
flamboh wants to merge 5 commits into
pingdotgg:maria/redesign/6-workspace-panesfrom
flamboh:t3/redesign-drag-pull-requests-into-layout
Open

flamboh wants to merge 5 commits into
pingdotgg:maria/redesign/6-workspace-panesfrom
flamboh:t3/redesign-drag-pull-requests-into-layout

Conversation

@flamboh

@flamboh flamboh commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Note

🤖 Claude Opus 5.5 on behalf of Oliver

Change for the redesign stack, targets layer 6 (#28845).

Important

Needs Maria's review.

Problem

A thread row can be dragged from the sidebar into the layout. The Pull Requests button and a thread's pull request badge cannot, so putting those pages beside a chat takes extra steps.

Change

Both are now drag sources, and they drop like a thread row does:

Drop on Result
A pane's tab row Opens a new tab in that pane. If the page is already open in a tab, that tab moves there.
A side of a pane Splits beside that pane.
An edge of the window Extends the layout with a new pane.
  • Pull Requests button (sidebar footer): drags the Pull requests page.
  • Thread's pull request badge: drags that thread's pull request list, or the one pull request the badge links to.

While dragging, a chip follows the pointer. It is the same lifted tab the tab drag shows, with the icon and title the new tab gets: "Pull requests" for either list, and the pull request's state icon with "#123" for one pull request. A plain click still opens the page as before.

The dragged tab now shows its lifted surface too, because both share one element and that surface was not being applied.

Known limits

  • The badge is not draggable when "open pull request links in the app" is off. It is a plain link then.
  • Pointer only. There is no keyboard path, same as thread and tab drags.

Note for merging

#37375 also edits the drop check in LayoutDropZones (apps/web/src/layout/DropZones.tsx). Whichever lands second should refuse a drop into a blank launcher tab only for a source.kind === "tab" whose content is the launcher, and allow every other source kind.

Evidence

Dragging the Pull Requests button. Before (base) the same pointer movement does nothing; after, the chip follows the pointer and the drop splits the page beside the chat.

https://gh-file-drop-api-prod-galwoqjslzlnws6s.oliver-boorstein.workers.dev/f/39960f1b7b366206/drag-button.mp4

Dragging a thread's pull request badge into the tab row.

https://gh-file-drop-api-prod-galwoqjslzlnws6s.oliver-boorstein.workers.dev/f/a18006e598dc9467/drag-badge.mp4

The chip for each of the three sources:

The chip mid-drag for the Pull Requests button, a one pull request badge, and a several pull requests badge

The dragged tab, which shares the chip's element:

A dragged tab before, with no surface behind it, and after, with its lifted surface

Validation

  • vp test run apps/web/src/layout/layoutDrag.test.ts apps/web/src/layout/SurfaceHost.browser.test.tsx: 8 passed. The drop rules are unit tests; the cases that need the surface sync mounted (a dropped pull request surviving a reload, and a drop that reopens hidden panels) stay in the layout host's browser test.
  • vp run check:changed e6cf9cc54c: format, lint, knip, typecheck, tests and the React compiler check pass.

Made with Claude Opus 5.5 in Claude Code (T3 Code).

flamboh and others added 2 commits November 15, 2026 23:09
…he layout

The sidebar's Pull requests button and each thread row's PR badge now drag
into the layout the way a thread row does: same drop zones, labels,
threshold and Escape. The page lands as its one tab (an open one moves);
the badge opens the thread's pull request, or its linked pull requests
list, at the drop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Nov 16, 2026
@flamboh flamboh closed this Nov 16, 2026
@flamboh flamboh reopened this Nov 16, 2026
@flamboh flamboh closed this Nov 16, 2026
@flamboh flamboh reopened this Nov 16, 2026
@flamboh
flamboh marked this pull request as ready for review November 16, 2026 01:17
Comment thread apps/web/src/layout/layoutDrag.ts Resolved
Comment thread apps/web/src/layout/layoutDrag.ts Resolved
@macroscopeapp

This comment has been minimized.

@macroscopeapp

macroscopeapp Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 910e1e5

Macroscope's review found this PR approvable — Adds drag-to-layout support for the Pull Requests button and thread PR badges using existing PR views. Effects are limited to user-initiated navigation and saved pane arrangement, with existing link preferences preserved.

You can add or adjust custom eligibility rules. Learn more.

@flamboh
flamboh marked this pull request as draft November 16, 2026 01:28
@flamboh flamboh closed this Nov 16, 2026
@flamboh flamboh reopened this Nov 16, 2026
@flamboh
flamboh marked this pull request as ready for review November 16, 2026 01:39

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant