Deletes the vanilla shell and mounts App.tsx on #root. main.ts and the 23 views it drove are gone; App.tsx composes the ported components — sidebar, multi-view, command bar, spawn modal, help and restart overlays, daemon link, drawer — around the catalog and layout stores. The pure parts of four deleted modules moved next to the components that still use them: the spawn-form model and spawnSimilar into components/spawn, the transcript's markdown/format helpers and the diff into components/structured, the help overlay's grouping into components/dialogs. Document-level event names now live in uiEvents.ts. Deduplicated two pairs the migration left side by side: the sidebar uses dialogs/KillDialog and common/ContextMenu. It also listens for the command bar's kill/rename events, which nothing had picked up since catalog.ts went away. styles.css stays as the token and base layer, with `#app` renamed to `#root` and the pane-body rules re-keyed off the classes the React panes actually carry. Closes #253
21 lines
757 B
TypeScript
21 lines
757 B
TypeScript
// Command-registry grouping for the help overlay. Moved out of help.ts (whose
|
|
// imperative DOM overlay #253 deleted) so HelpOverlay.tsx renders the same
|
|
// grouping the vanilla overlay did.
|
|
|
|
import { publishedCommands, type Command } from "../../commands.js";
|
|
|
|
/** Published commands bucketed by `group`, in registry order — the order the
|
|
* overlay lists them in. */
|
|
export function groupedCommands(): { title: string; items: Command[] }[] {
|
|
const groups: { title: string; items: Command[] }[] = [];
|
|
for (const cmd of publishedCommands()) {
|
|
let group = groups.find((g) => g.title === cmd.group);
|
|
if (!group) {
|
|
group = { title: cmd.group, items: [] };
|
|
groups.push(group);
|
|
}
|
|
group.items.push(cmd);
|
|
}
|
|
return groups;
|
|
}
|