Skip to content

feat(web): search, pin and reorder projects in the new-thread menus - #1042

Merged
badcuban merged 1 commit into
mainfrom
feat/new-thread-project-search-pins
Nov 23, 2026
Merged

badcuban merged 1 commit into
mainfrom
feat/new-thread-project-search-pins

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

Closes #1040.

With many projects, picking one from "What's next in …?" on the new-thread screen (or "New thread in…" on the home screen) meant scrolling one long list sorted by activity. There was no search, no way to keep favorites on top, and no custom order.

What changed

Both menus now share one ProjectPickerMenu:

  • Search. A search line matches project names and every checkout folder. It uses the same box and threshold as the sidebar's project dropdown (9+ projects, not on touch).
  • Pins. A pin on each row, or Alt+P, keeps a project in a Pinned group on top. Pins are saved by folder in the UI state store, on this device.
  • Order. Rows drag to reorder within their group. A mouse or pen drags anywhere on the row, a finger drags by a grip, and Alt+Up/Down moves rows from the keyboard. Long lists scroll while dragging. Only the shown rows trade places, so projects a search hid, and a project's other checkouts, keep their slots.
  • Reset. The first drag switches sidebarProjectSortOrder to manual. "Reset to automatic order" switches it back.

useOrderedProjects puts pinned projects first, so the default project for New thread follows the pins.

The saved order also survives computers connecting in a different sequence. A project that loads after the order exists goes back to its saved place, and saving keeps the places of projects that aren't loaded yet. Before this, the order was rebuilt in whatever sequence computers connected.

The app guide's threads topic describes the menu.

Not in this PR

  • The sidebar's "All projects" dropdown keeps its own activity order and doesn't show pins.
  • There's still no search on phones, matching the sidebar's rule.
  • A touchscreen laptop whose main pointer is a mouse doesn't show the drag grip.
  • Two computers using the same folder path share one saved spot. The order has always been saved by folder.

Testing

  • New browser test ProjectPickerMenu.browser.tsx covers pinning, folder search, Enter on a match, drag order and reset.
  • New unit tests cover the slot-keeping move (projectPickerOrder.test.ts) and a project from a computer that connects later (uiStateStore.test.ts).
  • Full web browser suite (1172 tests), vp fmt, vp lint, vp run typecheck and the guide tests pass.
  • Checked by hand in a throwaway dev stack: search, pins, drag, Alt+arrow moves and Alt+P.

The project menus that start a new thread ("What's next in …?" and the
home screen's "New thread in…") were one long list sorted by activity,
so with many projects users scrolled to find one (#1040).

Both menus now share one ProjectPickerMenu:
- A search line (from 9 projects, not on touch) matches names and every
  checkout folder.
- A pin on each row (or Alt+P) keeps a project in a Pinned group on top.
  Pins are kept by folder in the UI state store, on this device.
- Rows drag to reorder within their group: anywhere on the row with a
  mouse or pen, by a grip with a finger, Alt+Up/Down from the keyboard,
  with auto-scroll. The shown rows trade places in their own slots, so
  rows a search hid and a project's other checkouts keep theirs.
- The first drag switches sidebarProjectSortOrder to manual; "Reset to
  automatic order" switches it back.

useOrderedProjects puts pinned projects first, so the default project
for New thread follows the pins too.

The saved order also survives computers connecting in a different
sequence: a project that arrives after the order exists goes back to
its saved place, and saving keeps the places of projects not loaded yet.

The app guide's threads topic describes the menu.
@vercel

vercel Bot commented Nov 23, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Nov 23, 2026 6:28am UTC

Request Review

@badcuban
badcuban added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit 60f68b9 Nov 23, 2026
23 checks passed
@badcuban
badcuban deleted the feat/new-thread-project-search-pins branch November 23, 2026 06:40

This branch was previously deployed

1 inactive deployment
Preview — 481f5ad0 Deployed Nov 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Search, pin, and reorder projects in the new-thread picker

1 participant