M2.6: go-to popup for files, classes and symbols

One popup with Files / Classes / Symbols tabs (Tab switches), opened by
goto.fileOpen (Mod+P), goto.classOpen (Mod+Alt+C) and goto.symbolOpen
(Mod+T), each with an optional {query} for agents. Live debounced query
against goto.* with stale answers dropped, matched characters marked,
directory / namespace / container column, library rows labelled, an
indexing hint with progress and a re-query on indexReady. Enter or a
click opens through editor.reveal; Escape closes. An exclusive modal and
a launcher: any other command closes it.

goto.file items now carry `library` (PM decision). indexProgress and
indexReady join the ipc event union. Notes in plan/phpstorm/08-goto.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-17 17:03:06 +02:00
parent ef198f5f8f
commit 943ff889df
21 changed files with 1650 additions and 23 deletions

View file

@ -54,6 +54,9 @@ export interface PaletteEntry {
/** Most recently run commands remembered. */
export const MAX_RECENT = 20;
/** The UI commands that open the go-to popup, which therefore keep it open. */
const GOTO_OPEN = new Set(["goto.fileOpen", "goto.classOpen", "goto.symbolOpen"]);
/**
* Reads the command list from the engine, keeping well-formed entries.
*
@ -184,7 +187,8 @@ export const useCommandsStore = defineStore("commands", () => {
* Runs a command the user chose (keyboard or palette): through its
* handler if a component supplied one, else through the engine. A
* disabled command does nothing. A failure raises an error toast. Any
* command but `palette.open` closes the palette before it runs.
* command but `palette.open` closes the palette before it runs, and any
* command but the go-to open commands closes the go-to popup.
*
* @param id - the command id.
* @param params - the params.
@ -197,6 +201,9 @@ export const useCommandsStore = defineStore("commands", () => {
if (id !== "palette.open") {
modals.dismiss("palette");
}
if (!GOTO_OPEN.has(id)) {
modals.dismiss("goto");
}
const handler = handlers.get(id);
if (handler) {
try {