Public: anyone can read this; the crew can change it.

The command palette is great on a phone: one tap, type, go, like Spotlight #10435

Closed opened this
opened this

The command palette is the power user's way around the forge, and on a phone it's broken. The owner's words: "super space is how I navigate my computer. I swipe down on my iPhone home screen and search what I need. This is the wave and it's what the power user needs."

The bar is iOS Spotlight and macOS Spotlight/Raycast: one gesture, type a few letters, you're there. The code is src/web/palette.ts and its wiring in src/web/client.ts and src/web/chrome.ts.

Done when, on a phone (iPhone Safari at 390×844, and as an installed PWA):

  • Opening. One tap on a search control that's always in reach (a bottom-anchored button, or a pull-down at the top of any page), plus ⌘K / Ctrl-K / / on a keyboard. The input is focused and the iOS keyboard is up in the same tap; no second tap.
  • Layout. A full-screen sheet that sits above the keyboard (use visualViewport, so the keyboard never covers results). Results scroll inside the sheet and the page underneath doesn't scroll. Safe areas are respected, and the tap targets are at least 44px.
  • Results. They appear as you type, in under 50 ms locally. Top hits include repos, apps, issues and pulls by number and title, people, pages and settings, and actions ("new app", "tell scout…", "open the map").

- Recents and frecency: with an empty query it shows what you used last. - Fuzzy matching handles typos and initials ("mp" → morning-paper).

  • Doing. Tap or enter goes there. An action runs with one confirm where needed. Swipe down or Escape closes it.
  • Everywhere. It's on every page, signed in or out (signed-out shows public things only).
  • Tests.

- A Playwright run at phone size covers: open with one tap, the input focused, type "paper", see trevato/morning-paper, open it. - A unit test covers the ranking. - A screenshot at phone size goes in the pull.

commented

The owner likes the existing search interface on mobile. Bring the two together: one surface, with the palette and search as the same thing. Keep the mobile search look and feel he likes, and add the palette's reach (actions, pages, settings, recents) and the keyboard shortcuts on desktop. One component, one ranking, one test suite. Start by screenshotting both at phone size and say in the pull what you kept from each.

commented

Parked by the crew: the check stayed red through 2 automatic tries (pull #10442 closed; its branch scout/10435-the-command-palette-is-great-on-a-phone at 08f1478ec23f keeps the work so far). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

commented

Parked by the crew: the check stayed red through 2 automatic tries (pull #10651 closed; its branch mason/10435-the-command-palette-is-great-on-a-phone at 7e01fa47a9dc keeps the work so far).

Parked twice since a person last spoke here, so it is the planner's now. Every reason:

  1. the check stayed red through 2 automatic tries (pull #10442 closed; its branch scout/10435-the-command-palette-is-great-on-a-phone at 08f1478ec23f keeps the work so far)
  2. the check stayed red through 2 automatic tries (pull #10651 closed; its branch mason/10435-the-command-palette-is-great-on-a-phone at 7e01fa47a9dc keeps the work so far)

The planner splits it, replaces it with a fresh issue, or defers it; a person can also say what to try. Nothing starts here until then, and the board lists it.

commented

Split into #10656 (search on a phone and the palette are one surface, keeping the mobile search look you like), #10657 (one tap opens it with the keyboard up, sheet above the keyboard), #10658 (recents with nothing typed) and #10659 (issues/pulls by number, people, settings, actions). Fuzzy matching already ships in src/web/palette.ts. The two parked branches hold earlier work.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs