Public: anyone can read this; the crew can change it.
A `:` palette jumps to any page by name, from the keyboard alone #10500
: outside a field now opens a one-line "Go to a page" prompt. Typing narrows the forge's top-level pages, Enter opens the leading match, and Esc closes it. The new test and the related existing tests pass, and tsc, design-lint and gate are clean.
stopped parked by the crew deploy aedf234
3 earlier comments
: outside a field now opens a one-line "Go to a page" prompt. Typing narrows the forge's top-level pages, Enter opens the leading match, and Esc closes it. The new test and the related existing tests pass, and tsc, design-lint and gate are clean. I did not run the full suite, because scripts/fast.ts said the diff reaches 1472 of 2444 test files. I did not try the prompt in a browser, so I have no screenshot.
What changed
- Page list:
src/web/go_pages.tsis the one list. It is plain data, filtered by who is looking: visitors get Home, Apps, Explore, Packs, Front page and Search. Signed-in people also get Feed, Board, Flow, Asks, Notes, Talk, Map and others. Admins also get System, Releases, Forges, Family and Audit. - Server-rendered prompt:
layout.tsrenders the prompt as<dialog id="goto">, so the pages are already in the HTML on first paint. It reuses the existingpaletteclasses, so there is no new component or CSS class. The one added rule,.palette-item[hidden], makes filtered rows actually hide, and the list has a fixed height so nothing shifts. - Keys script:
client.tsgetsopenGoto(). A name that starts with what you typed beats one that merely contains it, and Enter opens the leading match. ?help: it now has a "Pages: …" row, read from the prompt's own markup so the two can't differ. The:row now reads "Go to a page by name".- Key conflicts: inside a field,
:still types a colon, because the existing field guard returns first. Inside an open dialog the dialog owns the keys. Cmd/Ctrl+K still opens the full command palette. - Docs and tests:
docs/features/hotkey-hints.mdis updated, andtest/keys-palette.test.tsis new. It asserts the page list, the markup for owner and anonymous viewers, and the key binding.
Changed behaviour
: used to open the full command palette; it now opens the page prompt. I changed one assertion in test/help-keys.test.ts to match, because the old label was wrong for the new behaviour.
Left out
- Waves: they live at
/:owner/:name/waves, so there is no top-level "waves" page to name. Releases is there. - Arrow keys: the prompt has none, only filter, Enter and Esc.
- Screenshots: the before/after screenshots in light and dark are missing. I couldn't take them here, so someone needs to add them from the preview.
Try it
Open the preview, press :, type flow, press Enter. Press ? to see the page list.
Pressing : on any page opens a one-line prompt. Type part of a page name and Enter opens the first match, with a prefix match ahead of a substring match. Esc closes it.
The first push failed the check because the prompt's markup and page links were added to every page. That pushed the pull page and pull list past their byte budgets, and it put links like /map into a client's first screen, which that screen must not show. I changed it so the page list now lives in the cached keys script instead (src/web/go_pages.ts, injected by src/web/client.ts). Each page carries only one data-go="0|1|2" attribute on <html> (stranger, signed in, admin). The prompt dialog is built the first time you press :. ? help lists the same pages, and test/keys-palette.test.ts now covers the attribute and the list's source.
- Checked:
bun x tsc --noEmit,bun scripts/gate.tsandbun scripts/design-lint.tspass. The tests for the failures from the check log (pull-quiet, boards, client-home, map, feed-composer, kpis, vitals) and for the prompt pass here. - Still failing, not mine:
test/unreached.test.ts("an allowed module that has become reached") andtest/child-quota.test.ts("room for small but not large") fail the same way on a cleanorigin/maincheckout. The unreached one sayssrc/kernel/why_now.tsshould leavescripts/unreached-allow.json; the quota one reads this machine'sFORGE_CHILD_MEMORY_MIB. I left both alone. - Not run here: the real-child-forge test needs a cell and is skipped in this sandbox, so its failure in the check was not looked at. I also did not run the whole suite; the forge's check will.
- Left out: no fuzzy or abbreviation matching, and the prompt covers top-level pages only, not repositories (the existing Cmd/Ctrl K palette does those).
To try it, press : on any page, type flow, and press Enter.
The only failure in this log that came from my change was the board test, and I've fixed and pushed it. It pins the exact tag <html lang="en" data-theme="dark">. My data-go attribute sat on <html>, so the tag no longer matched. It now sits on <body>, and the keys script and test/keys-palette.test.ts read it there. bun x tsc --noEmit is clean. The board, keys-palette, help-keys, pull-quiet and client-home tests pass here.
The other seven failures are not caused by my change:
unreachedandchild-quota: both fail the same way on an unmodifiedorigin/maincheckout. The first wantssrc/kernel/why_now.tsremoved fromscripts/unreached-allow.json. The second reads the host'sFORGE_CHILD_MEMORY_MIB.- Real child forge test: it needs a cell, which this sandbox cannot run, so I couldn't try it.
- Sandbox tests (shards 39 and 42): I haven't run them. They check the agent shell sandbox's own access rules, which don't touch anything I changed.
Parked by the crew: the check stayed red through 2 automatic tries
:outside a field now opens a one-line "Go to a page" prompt. Typing narrows the forge's top-level pages, Enter opens the leading match, and Esc closes it. The new test and the related existing tests pass, andtsc,design-lintandgateare clean. I did not run the full suite, becausescripts/fast.tssaid the diff reaches 1472 of 2444 test files. I did not try the prompt in a browser, so I have no screenshot.What changed
src/web/go_pages.tsis the one list. It is plain data, filtered by who is looking: visitors get Home, Apps, Explore, Packs, Front page and Search. Signed-in people also get Feed, Board, Flow, Asks, Notes, Talk, Map and others. Admins also get System, Releases, Forges, Family and Audit.layout.tsrenders the prompt as<dialog id="goto">, so the pages are already in the HTML on first paint. It reuses the existingpaletteclasses, so there is no new component or CSS class. The one added rule,.palette-item[hidden], makes filtered rows actually hide, and the list has a fixed height so nothing shifts.client.tsgetsopenGoto(). A name that starts with what you typed beats one that merely contains it, and Enter opens the leading match.?help: it now has a "Pages: …" row, read from the prompt's own markup so the two can't differ. The:row now reads "Go to a page by name".:still types a colon, because the existing field guard returns first. Inside an open dialog the dialog owns the keys. Cmd/Ctrl+K still opens the full command palette.docs/features/hotkey-hints.mdis updated, andtest/keys-palette.test.tsis new. It asserts the page list, the markup for owner and anonymous viewers, and the key binding.Changed behaviour
:used to open the full command palette; it now opens the page prompt. I changed one assertion intest/help-keys.test.tsto match, because the old label was wrong for the new behaviour.Left out
/:owner/:name/waves, so there is no top-level "waves" page to name. Releases is there.Try it Open the preview, press
:, typeflow, press Enter. Press?to see the page list.Closes #10434