Skip to content

feat(web): drag replies, launchers, links, and PR or issue rows to panes - #276

Open
orbitingflea wants to merge 1 commit into
proto/fullscreen-panelsfrom
feat/fullscreen-panels-drag-all
Open

orbitingflea wants to merge 1 commit into
proto/fullscreen-panelsfrom
feat/fullscreen-panels-drag-all

Conversation

@orbitingflea

@orbitingflea orbitingflea commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Behaviour change

Behaviour change: yes, full-screen panels prototype users can drag Chat-mode reply buttons, Replies rows, pane "+" items, empty-pane launchers, Dashboard web links, and pull request or issue rows onto panes or tab strips to open them. Other-project thread links no longer drag into the work area.

Why

Match drag-to-open to click-to-open in the work area. Files rows, chat file chips and links, thread chips, the Dashboard chat chip, and sidebar thread rows already dragged. Other tab controls did not. Other-project thread chips fell back to a side-thread pane on this thread's workspace, diff panel, and terminal.

What changed

  • New sources use the tab-drag ghost. A drag starts only if click opens a tab, and drop runs it there.
  • Chat places primary Chat. Device drags after setup. Dashboard web links match chat links. Pull request or issue rows open a tab or preview browser.
  • Thread chips drag only for same-project threads (Chat tabs) and own side chats, like sidebar rows.
  • If a "+" item or Reply source's tab is placed, drop moves and shows it there, with no ghost where nothing changes, also in the narrow one-strip view. A join keeps the tab's slot.
  • Browser and Side chat opens return promises. On a drop, "+" or launcher opens do not mark their pane or place beside the launcher, so a slow drop overtaken by a click or key lands at that focus.
  • Open "+" menu drops are ignored. The menu closes on any drag end, even if Chat disappears. Shown or empty async opens clear the pane pick. Device setup keeps it.
Details

Implementation

  • Reply sources: "N replies", Reply, meta-row Reply. "+" and launchers: Browser, Terminal, Files, Diff, Pull requests, Device, Side chat, Dashboard, Replies, Whiteboard, Chat. Pull request and issue rows: Linked items, Thread details.
  • PanelLink renames opensChat to composer (width) and holds the drag-end "+" close callback.
  • apps/web/src/fork/workArea/: linkSources.ts (threadChipPanelLink, replyPanelLink, surfaceActionPanelLink, previewLinkPanelLink), chatAnchorLink.ts (useWebPanelLink, pull request and issue rows), chatOpenerContext.ts (threadTabPanel), panelLinkDrag.ts (panelDragProps). apps/web/src/fork/rightPanelMenu/: rightPanelMenu.tsx (useSurfaceActionDrag), menu.logic.ts (Device setup).
  • WorkArea.tsx plans placed one-of-a-kind "+" items (Diff, Files, Linked items, Dashboard, Replies, Whiteboard, Device placeholder) and Reply sources to move and show their tab. linkDrop.logic.ts (keepsPlacedTab) hides the ghost if the saved pane stays unchanged, also in the one-strip view. Pull request "+" keeps the general ghost (resolved in chat view). useLinkDrops.ts and dropPlan.logic.ts ignore open-menu targets only. workAreaPlacement.logic.ts keeps a tab's slot when joining its pane and clears shown picks. workAreaCommands.ts openFromPaneMenu returns its result and clears empty async picks, fixing plain "+" clicks.

Scope

  • Upstream call sites: RightPanelTabs.tsx, ThreadPullRequestsPanel.tsx, ThreadDetailsIssueRows.tsx, ChatView.tsx (1 line), useRightPanelActions.ts (calls menu.logic.ts), ThreadDetailsPrRow.tsx, ThreadDetailsPrRows.tsx (row drag to open button). sideChatPane.ts drops one export.
  • Fork test helpers: apps/web/src/fork/workArea/fakeEnvironmentKit.ts. Upstream fake environment adds project, pull request thread fields, and one state export.
  • Left out: thread relationship chips, citations, canvas terminal links, Diff items (no panel), Dashboard board:// and t3-thread:// links, Browser profile entries, sidebar hover-card issue rows (click switches threads).

Tradeoffs

  • Browser "+" drag untested (no web preview browser).
  • Dashboard board:// and t3-thread:// links stay dead until click opens a tab.
  • "+" menu stays modal during drags, while events reach panes behind it.
  • One "+" pick per pane (existing limit). A late Side chat or Browser open during another pane's Device setup clears that pick and opens Device in the first, matching base clicks.

Blast Radius

Web client only. No server, contract, data, stored-state, or UI text changes. Revert to undo.

Verification

  • 73 browser tests in 8 files pass (Chromium Playwright, full app, fake environment): all sources, sidebar pointer drag to strip, cross-project chip and sidebar rejection, open "+" menu drops, slow open overtaken by click, pre-setup Device, Chat, Dashboard links with or without preview, pull request and issue rows (tab, browser fallback, composer drop), one-strip view reply drops.
  • Unit tests, typecheck, lint, format, knip, changed-files pass.
  • Not checked: Electron, Firefox, Safari, Browser "+" drag.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L labels Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

This PR changes the test suite by +33 test cases (browser +32, unit +1, server 0).

New browser test files: apps/web/src/fork/dashboard/dashboardLinkDrag.browser.test.tsx, apps/web/src/fork/workArea/linkedItemsDrag.browser.test.tsx.
Each browser test file costs CI seconds of module loading before its first test runs; a unit test costs milliseconds.

Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for d93bb04.

This comment will update automatically after the next completed run.

@orbitingflea
orbitingflea force-pushed the feat/fullscreen-panels-drag-all branch from 7830462 to bf01ea5 Compare November 24, 2026 11:51
@github-actions github-actions Bot added size:XL and removed size:L labels Nov 24, 2026
@orbitingflea
orbitingflea force-pushed the feat/fullscreen-panels-drag-all branch from bf01ea5 to 9060be5 Compare November 24, 2026 15:57
Anything whose click opens a work-area tab can now be dragged onto a
pane or tab strip and opens there, through the existing panel-link
drop: Reply buttons and Replies list rows, the pane "+" menu and
empty-pane launcher items (Device only once set up; Chat places the
primary Chat at the drop), Dashboard web links (into the preview
browser, as chat web links), and pull request and issue rows in Linked
items and Thread details (their tab, or the preview browser where the
click opens a browser). Each source builds its PanelLink from its own click opener
and predicate.

A thread chip now drags only where its click opens a tab: a thread of
the same project as a Chat tab, or a side chat of the panel's own
thread. Another project's thread no longer falls back to a side-thread
pane attached to this thread's workspace. Sidebar rows already used the same
check; a real-pointer regression test now covers them.

Also: `opensChat` becomes `composer`; async "+" opens (Browser, Side
chat) return their promise so a newer click still cancels the drop's
place; a release over an open menu is ignored; a user open of a
surface that is already shown, or an async "+" open that settles
without its tab, ends the "+" menu pick instead of leaving the pane
armed (a sync open such as Device setup keeps it); under a live drop a
"+" or launcher open adds no pick or launcher place of its own, so an
overtaken drop lands where the user's newer action put the focus; the
"+" menu closes when the drag ends, however it ends; a "+" item that
shows an already-placed tab, or a Reply whose reply tab is placed,
moves and shows that tab at the drop, with no ghost where its pane
would stay as it is (judged on saved panes, so also in the one-strip
view); a join into the pane that holds the tab keeps its slot, as its
click does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@orbitingflea
orbitingflea force-pushed the feat/fullscreen-panels-drag-all branch from 9060be5 to d93bb04 Compare November 24, 2026 16:07

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:XL 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