Skip to content

feat(web): complete live roster drag for bots and groups - #218

Merged
leoisadev1 merged 5 commits into
mainfrom
leoisadev1/t3-port-roster-drag
Sep 13, 2026
Merged

leoisadev1 merged 5 commits into
mainfrom
leoisadev1/t3-port-roster-drag

Conversation

@leoisadev1

@leoisadev1 leoisadev1 commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Problem

The live Akeru roster (BotRosterSidebar) used @hello-pangea/dnd. Pins were a display-only strip, not a sortable destination. Drag cleanup did not cover Escape, blur, hidden tab, unmount, or a missed release. Insertion-gap motion, destination labels, and empty/collapsed targets from upstream thread-sidebar drag never reached the live bot/group UI.

Change

Adapt upstream sidebar drag onto the live roster, not the dead Sidebar.tsx.

  • One vertical sortable list of pinned bots/groups, named sections, and Unassigned
  • Pin and unpin by drag, with Pin / Unpin / Move labels on the lifted row
  • Insertion-gap continuity, readable destination labels, empty/collapsed/last-item-leaves targets
  • Pointer cleanup on release, Escape, blur, hidden tab, resize, unmount, and missed release
  • Click suppression so a completed drag does not navigate; ordinary clicks still open the bot
  • Keyboard reorder through Move up / Move down on the existing row and section action menus, so Enter/Space on a live bot or group row still opens it
  • Cancelled-drag click suppression ignores keyboard-generated clicks (detail === 0) and clears on the next keydown
  • List motion that glides from the released positions and respects reduced motion
  • Roster layout stays separate from group membership and never settles chats

Layout is still browser-local per environment. Server-backed roster order, sidebar file drops, and native arrange are follow-up PRs.

Upstream

Reviewed adaptations of pingdotgg/t3code:

Scope checklist

Port This PR Later
pingdotgg#9731 pingdotgg#9750 pingdotgg#10378 pingdotgg#10453 pingdotgg#10464 live roster drag yes
pingdotgg#9729 roster persistence (not thread activeOrder) next
pingdotgg#7892 sidebar file-drop onto bot/group chats later
pingdotgg#9730 pingdotgg#10496 native arrange later

Verification

  • vp test run on roster logic/store/drag/pointer/motion plus SidebarChrome and shortcut guards: 96 passed
  • vp lint and vp run --filter @t3tools/web typecheck on the changed files: clean
  • Isolated vp run dev --home-dir /tmp/akeru-roster-drag.VVPXZ4 with pairing
  • Desktop: created Mori and Akeru, dragged Akeru above Scout, dragged Mori into Pinned, dragged it back to Unassigned, Escape cancelled an in-progress drag, click still opened Mori, menu Pin survived reload
  • Group Crew: dragged the group row to the top of the roster (now first, above Mori). Chat stayed on Mori (/bots/...); the drag did not navigate.
  • Mobile 390×844: opened Toggle main sidebar, then dragged Akeru above Scout inside the sheet. Order became Crew, Akeru, Mori, Scout.
  • Settings overlay still opens
  • Keyboard (head ceb469ba2): Actions menu Move up on Mori (Crew, Mori, Scout, Akeru), Move down on Crew (Mori, Crew, Scout, Akeru). Enter on the Akeru row opened Akeru chat; Enter on Crew opened the group chat (no KeyboardSensor drag). Pointer-drag Scout, Escape cancel, then Enter on Akeru still opened Akeru. Blur cancel, then Actions Move down on Mori (Crew, Mori, Scout, Akeru). Hidden/visibility cancel without pointerup, then Enter on Scout still opened Scout.

Keyboard Move up: Mori above Scout
Keyboard Move down: Crew under Mori
Escape cancel left order unchanged
Enter after Escape cancel opened Akeru
Enter after hidden cancel opened Scout

GroupThreadLanding hook crash (baseline)

Opening /groups/... still hits Rendered more hooks than during the previous render in GroupThreadLanding at useReplyPlaybackThread (line 96), after if (!group) return null (line 90).

Isolated baseline proof, not “the file was untouched”:

Before: one bot under Unassigned
Three bots ready to drag
After reorder: Akeru above Scout
After pin: Mori above Unassigned
After reload: pin and order kept
Mobile viewport

roster-drag.webm

Limitations

  • Order is stored in the browser for the connected environment. Other devices do not share it until the persistence PR.
  • Named-section creation still uses window.prompt.
  • Native arrange and sidebar file-drop are not in this PR.

Grok 4.6 High in Grok Build via Orca.

Before dragging Crew

After dragging Crew to the top

Mobile sidebar open before drag

Mobile sidebar after dragging Akeru

The live BotRosterSidebar could reorder sections and rows with hello-pangea, but pins were not a drop target and drag cleanup was incomplete. Port the upstream sidebar pointer, insertion-gap, and motion behavior onto the live bot/group roster without settling chats or changing group membership.
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
akeru-bot-landing Building Building Preview Sep 10, 2026 5:44pm UTC

Request Review

@github-actions github-actions Bot added area:directory Plugin directory and its user interface. vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Sep 10, 2026
@leoisadev1

Copy link
Copy Markdown
Member Author

This is Leo's agent.

GroupThreadLanding hook-order crash, reproduced on baseline rather than inferred from an untouched file:

Follow-up drag evidence on this branch: Crew group row dragged to the top without navigating away from Mori; mobile sidebar opened and Akeru dragged above Scout in the sheet.

@greptile-apps

greptile-apps Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Greptile Summary

This update unifies roster sorting across bots, groups, sections, pinned entries, and Unassigned entries. It adds pointer-drag cleanup, accessible menu-based reordering, motion and insertion feedback, and persistence support for newly discovered Unassigned items.

Confidence Score: 5/5

Safe to merge; there are no outstanding blocking issues.

greptile-apps[bot] manually resolved the keyboard-reordering thread without explanation. greptile-apps[bot] manually resolved the interrupted-drag click-suppression thread without explanation. greptile-apps[bot] manually resolved the keyboard action activation thread without explanation. leoisadev1 manually resolved the Unassigned reorder thread without explanation.

Reviews (4): Last reviewed commit: "fix(web): reconcile live roster items be..." | Re-trigger Greptile

Comment thread apps/web/src/components/roster/BotRosterSidebar.tsx
Comment thread apps/web/src/components/roster/roster.pointer.ts
Greptile found that the live roster registered only a pointer sensor, and that a cancelled drag could leave a capture-phase click suppressor that blocked the next keyboard activation. Register dnd-kit's keyboard sensor and drop that suppressor on keydown.
Comment thread apps/web/src/components/roster/BotRosterSidebar.tsx Outdated
dnd-kit KeyboardSensor made Enter/Space start a drag on live bot and group rows. Put Move up/down on the existing action menus, and ignore keyboard-generated clicks plus the next keydown in cancelled-drag click suppression.

Grok 4.6 in Akeru Bot.
Comment thread apps/web/src/components/roster/rosterStore.ts Outdated
@leoisadev1
leoisadev1 merged commit a2f29f7 into main Sep 13, 2026
11 checks passed
@leoisadev1
leoisadev1 deleted the leoisadev1/t3-port-roster-drag branch September 13, 2026 23:37
This was referenced Sep 13, 2026

This branch was successfully deployed

1 active deployment
Preview — faa725cc Deployed Sep 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:directory Plugin directory and its user interface. size:XXL vouch:trusted PR 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