A1: tab management: preview tabs, pinning, close actions, reopen closed tab, split into two groups
- 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:
parent
02922eb89d
commit
7f309dbc4e
28 changed files with 3003 additions and 211 deletions
|
|
@ -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 },
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue