A1: tab management: preview tabs, pinning, close actions, reopen closed tab, split into two groups
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run

- Pure tab model (components/editor/tabs/model.ts) with Vitest coverage.
- Editor store keeps one buffer sync per buffer and a group layout; a buffer
  in both groups shares text and undo. Bulk closes ask once with a list.
- Tab context menu, tabs.* UI commands (COMMAND_IDS) in a Window menu group,
  no default shortcuts; Show Local History appears once history.show exists.
- Single click in the tree, Find and Go-to opens preview tabs.
- Layout stored through layout.set and restored on project open.
- Public API for other areas: tabOfPath, tabOf, reloadBuffer, openFile.
- Docs: ui-parity, gaps (G2), architecture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-11-08 12:18:28 +01:00
parent 02922eb89d
commit 7f309dbc4e
28 changed files with 3003 additions and 211 deletions

View file

@ -340,6 +340,7 @@ describe("find.open prefill", () => {
const find = useFindStore();
const editor = (await import("../../src/stores/editor")).useEditorStore();
const state = EditorState.create({ doc: "echo productName;", selection: EditorSelection.single(8) });
editor.tabs = [{ id: 1, path: "a.php", name: "a.php", dirty: false, notice: null }];
editor.activeId = 1;
vi.spyOn(editor, "syncOf").mockReturnValue({ state } as unknown as ReturnType<typeof editor.syncOf>);
find.query = "(";
@ -440,14 +441,14 @@ describe("Find tool window", () => {
await list.trigger("keydown", { key: "ArrowDown" });
await list.trigger("keydown", { key: "Enter" });
await flushPromises();
expect(reveals).toEqual([{ path: "a.php", line: 4, column: 4 }]);
expect(reveals).toEqual([{ path: "a.php", line: 4, column: 4, preview: true }]);
await list.trigger("keydown", { key: "End" });
expect(wrapper.findAll("[data-test=find-row]")[2]?.attributes("aria-selected")).toBe("true");
await wrapper.findAll("[data-test=find-row]")[0]?.trigger("click");
await flushPromises();
expect(reveals).toEqual([
{ path: "a.php", line: 4, column: 4 },
{ path: "a.php", line: 0, column: 2 },
{ path: "a.php", line: 4, column: 4, preview: true },
{ path: "a.php", line: 0, column: 2, preview: true },
]);
});