Give way in narrow windows and use one icon for each action

Phase 5-6.

- Side panes give way when the window becomes narrow: the outline
  below 1100 pixels, the side pane below 800 pixels. They come back
  when the window grows. A pane that the user opens in a narrow window
  stays open, and the saved layout keeps the wide-window choice.
- One function has one icon. The SDK icon set gets duplicate, template,
  and tab. The reveal action has one label for each platform (Show in
  Explorer, Show in Finder, Show in file manager).
- The file menu follows one order: open, clipboard, organize, show and
  copy path, history, then Delete and Delete permanently in the error
  color after a separator. The tree copies paths through a Copy path
  submenu, as the tab menu does.
- The tree uses the shared chevron. Search hits come in groups by file,
  with counts and marked matches. Bookmarks show the name, the folder,
  and a remove button.
- All boolean settings use one switch design (src/lib/ui/switch.css).
  Browser settings apply at once, and the Save button is gone. The
  Settings window opens with the focus on its search.
- Targets of at least 24 pixels: the tab close button, outline rows,
  switches, and the settings search.
- Catalog rows in French, Japanese, and Simplified Chinese.
- Docs: UI-052, ui-design.md, and the user guide.

Tests: the new layout/panesAndSettings. Tests that closed or opened
panes by hand around narrow windows now rely on the new behavior, or
wait for the panes to give way before they reopen one. Tests that read
the old menu labels or the browser Save button use the new ones.
This commit is contained in:
Knotty Wyvern
2026-10-28 21:31:36 -07:00
parent b7a9784f55
commit 0fdc991b2e
46 changed files with 590 additions and 351 deletions
@@ -110,8 +110,7 @@ await runSmoke('appearance/backgroundFrames', async ({ browser }) => {
await page.locator('.source-editor .cm-content').waitFor();
await page.screenshot({ path: `${output}/${theme}-ide.png` });
await page.setViewportSize({ width: 680, height: 720 });
await page.getByRole('button', { name: 'Files', exact: true }).click();
await page.getByRole('button', { name: 'Hide outline', exact: true }).click();
// The side panes give way in a narrow window and come back in a wide one (src/lib/layout/Workbench.svelte).
await page.screenshot({ path: `${output}/${theme}-ide-narrow.png` });
await page.keyboard.press('Control+t');
+1 -1
View File
@@ -79,7 +79,7 @@ await runSmoke('browser/builtin', async ({ page }) => {
}
await page.goto(smokeUrl + '/?settingsWindow=true');
await page.getByRole('button', { name: 'Browser', exact: true }).click();
await page.getByRole('button', { name: 'Save browser settings' }).waitFor({ state: 'visible' });
await page.getByRole('button', { name: 'Search engine', exact: true }).waitFor({ state: 'visible' });
assert.match(await page.getByRole('button', { name: 'Profile', exact: true }).innerText(), /Existing user/);
await page.setViewportSize({ width: 360, height: 800 });
for (const theme of ['dark', 'light']) {
+1 -2
View File
@@ -71,8 +71,7 @@ await runSmoke('browser/settingsMenus', async ({ page }) => {
}
await trigger('Search engine').click();
await menu('Search engine').getByRole('menuitemradio', { name: 'Google', exact: true }).click();
assert.equal(await page.evaluate(() => window.__TEST__.requests.filter(request => request.command === 'settings').length), 0, 'A choice does not submit the form');
await trigger('Save browser settings').click();
// A choice applies at once (src/lib/browser/Settings.svelte).
await page.waitForFunction(() => window.__TEST__.snapshot.settings.search === 'google');
await page.evaluate(async () => { const { state } = await import('/src/lib/browser/client.ts'); const snapshot = window.__TEST__.snapshot; snapshot.profiles.push(...Array.from({ length: 60 }, (_, i) => ({ id: 'p' + i, name: 'Profile ' + i }))); state.set(structuredClone(snapshot)); });
await page.setViewportSize({ width: 520, height: 700 });
@@ -60,10 +60,8 @@ await runSmoke("editor/templatesAndTasks", async ({ page }) => {
await page.evaluate(async mode => (await import('/src/lib/theme/appearance.ts')).saveAppearance({ theme: 'default', mode }), mode);
for (const width of [1440, 600]) {
await page.setViewportSize({ width, height: width === 600 ? 760 : 1000 });
if (width === 600) {
await page.getByRole('button', { name: 'Files', exact: true }).click();
await page.getByRole('button', { name: 'Hide outline', exact: true }).click();
}
// The side panes give way in a narrow window and come back in a wide one (src/lib/layout/Workbench.svelte).
await page.waitForFunction(width => !!document.querySelector('aside.left') === width >= 800, width);
if (!(await title.isVisible())) await page.getByRole('button', { name: 'Rename note', exact: true }).click();
await title.focus();
await expectCount(10);
@@ -96,8 +94,6 @@ await runSmoke("editor/templatesAndTasks", async ({ page }) => {
await page.getByRole('button', { name: 'Rename note', exact: true }).click();
if (width === 600) {
await page.setViewportSize({ width: 1440, height: 1000 });
await page.getByRole('button', { name: 'Files', exact: true }).click();
await page.getByRole('button', { name: 'Show outline', exact: true }).click();
}
}
}
+1 -4
View File
@@ -145,15 +145,12 @@ await runSmoke('find/pluginViews', async ({ page }) => {
await page.screenshot({ path: `${output}/${name}-${theme}-narrow.png` });
const bar = await pane.locator('.rs-find-bar').boundingBox(), bounds = await pane.boundingBox();
assert.ok(bar.x >= bounds.x && bar.x + bar.width <= bounds.x + bounds.width + 1);
await page.getByRole('button', { name: 'Files', exact: true }).click();
await page.getByRole('button', { name: 'Hide outline', exact: true }).click();
// The side panes give way in a narrow window and come back in a wide one (src/lib/layout/Workbench.svelte).
await page.screenshot({ path: `${output}/${name}-${theme}-narrow-focused.png` });
await find.focus();
await page.keyboard.press('Escape');
assert.equal(await returnButton.evaluate(node => node === document.activeElement), true);
await page.setViewportSize({ width: 1440, height: 1000 });
await page.getByRole('button', { name: 'Files', exact: true }).click();
await page.getByRole('button', { name: 'Show outline', exact: true }).click();
}
}
await page.getByRole('navigation', { name: 'Plugin shortcuts' }).getByRole('button', { name: 'Custom find', exact: true }).click();
+5
View File
@@ -108,6 +108,11 @@ await runSmoke("find/searchPanel", async ({ page }) => {
assert.equal(await editor.evaluate(el => document.activeElement === el), true);
await page.setViewportSize({ width: 880, height: 760 });
// The outline gives way below 1100 pixels. The test opens it again to check its search field.
await page.getByRole("button", { name: "Show outline", exact: true }).click();
await outline.focus();
await page.keyboard.press("Control+f");
await outlineFind.waitFor();
await find.focus();
await page.screenshot({ path: path.join(output, "find-bars-narrow.png") });
for (const selector of [".rs-editor-search", ".outline-search"]) {
@@ -0,0 +1,112 @@
// Layout, icons, and Settings: side panes that give way, one file menu order with a danger Delete, tree chevrons,
// grouped search hits, readable bookmarks, 24-pixel targets, one switch design, and the first focus in Settings.
import assert from "node:assert/strict";
import { mockTauri, openPage, outputDir, runSmoke, smokeUrl } from "../_harness/index.mjs";
await runSmoke("layout/panesAndSettings", async ({ browser }) => {
const output = await outputDir("layout/panesAndSettings");
const context = await browser.newContext({ viewport: { width: 1280, height: 760 } });
await mockTauri(context, {
commands: test => ({
...test.workspace({
root: "C:\\panes",
files: {
"alpha.md": "# Alpha\n\nThe river runs past the river mill.\n",
"notes/beta.md": "# Beta\n\nA river note.\n\nAnother river line.\n",
"notes/gamma.md": "# Gamma\n\nNo match here.\n",
".runestone/marks.json": JSON.stringify({ pins: [], bookmarks: ["notes/beta.md", "alpha.md"], order: {} }),
},
}),
plugins_snapshot: () => ({ root: "C:/plugins", plugins: [] }),
"plugin:window|is_maximized": () => false,
}),
});
const page = await openPage(context);
await page.goto(smokeUrl);
const row = rel => page.locator(`[data-tree-rel="${rel}"]`);
await row("alpha.md").waitFor();
await row("alpha.md").click();
await page.getByRole("tab", { name: "alpha.md", exact: true, selected: true }).waitFor();
// Side panes give way in narrow windows and come back when the window grows. The saved layout keeps the wide choice.
const panes = () => page.evaluate(() => ({ left: !!document.querySelector("aside.left"), right: !!document.querySelector("aside.right") }));
assert.deepEqual(await panes(), { left: true, right: true });
await page.setViewportSize({ width: 1000, height: 760 });
await page.waitForFunction(() => !document.querySelector("aside.right"));
assert.deepEqual(await panes(), { left: true, right: false });
await page.setViewportSize({ width: 760, height: 760 });
await page.waitForFunction(() => !document.querySelector("aside.left"));
const layout = () => page.evaluate(() => JSON.parse(localStorage.getItem("runestone.workbenchLayout") ?? "{}"));
assert.equal((await layout()).leftOpen, true);
assert.equal((await layout()).rightOpen, true);
// A pane that the user opens in a narrow window stays open.
await page.getByRole("button", { name: "Show outline", exact: true }).click();
await page.locator("aside.right").waitFor();
await page.screenshot({ path: `${output}/narrow-760.png` });
await page.setViewportSize({ width: 1280, height: 760 });
await page.waitForFunction(() => !!document.querySelector("aside.left") && !!document.querySelector("aside.right"));
// The file menu: open, clipboard, organize, show and copy path, history, then Delete in the error color.
await row("alpha.md").click({ button: "right" });
const menu = page.getByRole("menu", { name: "File actions", exact: true });
await menu.waitFor();
const labels = await menu.locator(":scope > button, :scope > hr").evaluateAll(nodes => nodes.map(node => node.tagName === "HR" ? "|" : node.querySelector(".action-label").textContent));
assert.deepEqual(labels, ["Open in new tab", "Open in default app", "Open in terminal", "|", "Cut", "Copy", "Paste", "Make a copy", "|",
"Rename", "Remove bookmark", "Pin", "Save as template", "|", "Show in Explorer", "Copy path", "|", "Undo file move", "Redo file move", "|", "Delete", "Delete permanently"]);
const error = await page.evaluate(() => { const probe = document.createElement("span"); probe.style.color = "var(--rs-error)"; document.body.append(probe); const color = getComputedStyle(probe).color; probe.remove(); return color; });
assert.equal(await menu.getByRole("menuitem", { name: "Delete", exact: true }).evaluate(node => getComputedStyle(node).color), error);
// Each function has one icon: duplicate, template, and tab differ from copy.
const icon = name => menu.getByRole("menuitem", { name, exact: true }).locator("svg").first().evaluate(node => node.innerHTML);
const copy = await icon("Copy");
for (const name of ["Make a copy", "Save as template", "Open in new tab"]) assert.notEqual(await icon(name), copy, name);
await page.screenshot({ path: `${output}/file-menu.png` });
await page.keyboard.press("Escape");
// Folders use the shared chevron. It turns when the folder opens.
const chevron = row("notes").locator(".twist svg");
assert.equal(await chevron.count(), 1);
assert.equal(await chevron.evaluate(node => getComputedStyle(node).transform), "none");
await row("notes").click();
await page.waitForFunction(() => getComputedStyle(document.querySelector('[data-tree-rel="notes"] .twist svg')).transform !== "none");
// Search hits come in groups by file, with a count and marked matches.
await page.getByRole("button", { name: "Search", exact: true }).click();
await page.getByPlaceholder("Search files and notes").fill("river");
await page.keyboard.press("Enter");
await page.getByRole("status").filter({ hasText: "3 results in 2 files" }).waitFor();
const groups = await page.locator(".results > .file").evaluateAll(nodes => nodes.map(node => [node.querySelector(".name").textContent, node.querySelector(".count").textContent]));
assert.deepEqual(groups, [["alpha.md", "1"], ["beta.md", "2"]]);
assert.equal(await page.locator(".results > .file").first().locator("mark").count(), 2);
assert.equal(await page.locator(".results mark").first().textContent(), "river");
await page.screenshot({ path: `${output}/search.png` });
await page.locator(".results button").filter({ hasText: "Another river line." }).click();
await page.getByRole("tab", { name: "beta.md", exact: true, selected: true }).waitFor();
// Bookmarks show the file name, its folder, and a remove button.
await page.getByRole("button", { name: "Bookmarks", exact: true }).click();
const bookmark = page.locator(".pane li").filter({ hasText: "beta.md" });
assert.equal(await bookmark.locator(".folder").textContent(), "notes");
await page.screenshot({ path: `${output}/bookmarks.png` });
await bookmark.getByRole("button", { name: "Remove bookmark: beta.md", exact: true }).click();
await bookmark.waitFor({ state: "detached" });
// Targets are at least 24 pixels.
const close = await page.getByRole("button", { name: "Close beta.md", exact: true }).boundingBox();
assert.ok(close.width >= 24 && close.height >= 24, JSON.stringify(close));
const outlineRows = await page.locator("aside.right li button").evaluateAll(nodes => nodes.map(node => node.getBoundingClientRect().height));
assert.ok(outlineRows.length && outlineRows.every(height => height >= 24), JSON.stringify(outlineRows));
// Settings: the first focus is on the search, and every switch has one design.
const settings = await openPage(context);
await settings.goto(smokeUrl + "/?settingsWindow=true");
await settings.getByRole("textbox", { name: "Search settings", exact: true }).waitFor();
await settings.waitForFunction(() => document.activeElement?.getAttribute("aria-label") === "Search settings");
await settings.getByRole("button", { name: "General", exact: true }).click();
const switches = await settings.getByRole("switch").evaluateAll(nodes => nodes.map(node => { const rect = node.getBoundingClientRect(); return `${node.className.split(" ")[0]} ${Math.round(rect.width)}x${Math.round(rect.height)}`; }));
assert.ok(switches.length >= 4 && switches.every(item => item === "rs-switch 40x24"), JSON.stringify(switches));
await settings.getByRole("button", { name: "Appearance", exact: true }).click();
assert.equal(await settings.getByRole("switch", { name: "Transparent surfaces", exact: true }).evaluate(node => node.className.split(" ")[0]), "rs-switch");
await settings.screenshot({ path: `${output}/settings-appearance.png` });
assert.deepEqual([...page.errors, ...settings.errors], []);
console.log("PASS: panes give way, file menu order and icons, danger Delete, tree chevrons, grouped search, bookmarks, 24-pixel targets, one switch design, Settings first focus.");
});
+3 -1
View File
@@ -129,7 +129,9 @@ await runSmoke("layout/viewModes", async ({ browser }) => {
}
// Narrow panes show only the icons. The names stay for assistive technology and tooltips.
await page.setViewportSize({ width: 700, height: 600 });
// The side panes give way first. A 520-pixel window then leaves the pane less than 560 pixels.
await page.setViewportSize({ width: 520, height: 600 });
await page.locator("aside.left").waitFor({ state: "detached" });
await page.waitForFunction(() => getComputedStyle(document.querySelector(".view-modes .label")).display === "none");
assert.equal(await radio("Read").getAttribute("aria-label"), "Read");
assert.ok(await page.locator(".chrome-bar").evaluate(node => node.scrollWidth <= node.clientWidth + 1));
+2 -1
View File
@@ -165,7 +165,8 @@ await runSmoke("layout/workbench", async ({ page }) => {
await page.getByRole("button", { name: "Copied", exact: true }).waitFor();
await page.screenshot({ path: path.join(output, "reader-details.png") });
await page.setViewportSize({ width: 1000, height: 900 });
// At the minimum window width of 880 pixels the outline gives way, and Split stacks in the remaining pane.
await page.setViewportSize({ width: 880, height: 900 });
await page.locator(".md-page").evaluate(element => { element.scrollTop = 0; });
await page.screenshot({ path: path.join(output, "reader-narrow.png") });
assert.ok(await page.locator(".md-page").evaluate(element => element.scrollWidth <= element.clientWidth + 1));
+2 -2
View File
@@ -62,7 +62,7 @@ await runSmoke("links/linkMenus", async ({ page }) => {
await page.keyboard.press('Control+z');
await page.locator('.cm-content').getByText('Selected reading text.', {exact:true}).click();
await writerMenu('Workspace note');
for (const label of ['Open in new tab', 'Open in new window', 'Copy path', 'Bookmark', 'Show in system explorer', 'Reveal file in navigation', 'Edit link']) assert.equal(await item(label).count(), 1);
for (const label of ['Open in new tab', 'Open in new window', 'Copy path', 'Bookmark', 'Show in Explorer', 'Reveal file in navigation', 'Edit link']) assert.equal(await item(label).count(), 1);
for (const label of ['Rename…', 'Move file to…', 'Open in default app']) assert.equal(await item(label).count(), 0);
await page.screenshot({ path: `${output}/workspace-link-${theme}.png` });
await dismiss();
@@ -76,7 +76,7 @@ await runSmoke("links/linkMenus", async ({ page }) => {
await writerMenu('Workspace note');
await item('Copy path').focus(); await page.keyboard.press('ArrowRight'); await item('Workspace path').click();
await page.waitForFunction(() => window.__TEST__.clipboard === 'b.md');
await writerMenu('Workspace note'); await item('Show in system explorer').click(); await page.waitForFunction(() => window.__TEST__.revealed === 'b.md');
await writerMenu('Workspace note'); await item('Show in Explorer').click(); await page.waitForFunction(() => window.__TEST__.revealed === 'b.md');
await writerMenu('Workspace note'); await item('Reveal file in navigation').click();
await page.waitForFunction(() => document.activeElement?.getAttribute('data-tree-rel') === 'b.md');
await chooseView(page, 'Read');
+6
View File
@@ -123,7 +123,13 @@ await runSmoke("tables/drag", async ({ page }) => {
await page.keyboard.press('Control+z');
assert.deepEqual(await rows(), ['Alpha edited', 'Beta', 'Gamma', 'Delta']);
// Keep column handles aligned when a narrow table viewport scrolls.
// At 760 pixels the side panes give way. The test opens both again, so the table pane stays narrow.
await page.setViewportSize({ width: 760, height: 700 });
await page.locator('aside.left').waitFor({ state: 'detached' });
await page.keyboard.press('Control+Backslash');
await page.locator('aside.left').waitFor();
await page.getByRole('button', { name: 'Show outline', exact: true }).click();
await page.locator('aside.right').waitFor();
await table.locator('th').first().scrollIntoViewIfNeeded();
await grip('column', 0);
const viewport = await page.locator('.writer-table .md-table-scroll').boundingBox();
+1 -1
View File
@@ -81,7 +81,7 @@ await runSmoke("tabs/menus", async ({ page }) => {
await item("Workspace path").click();
assert.equal(await page.evaluate(() => window.__TEST__.clipboard), "d.md");
await show("d.md");
await item("Show in system explorer").click();
await item("Show in Explorer").click();
assert.equal(await page.evaluate(() => window.__TEST__.revealed), "d.md");
await show("d.md");
await item("Rename…").click();
+6 -3
View File
@@ -48,9 +48,12 @@ await runSmoke("tree/actions", async ({ page }) => {
await page.goto(smokeUrl);
await row("notes").waitFor();
}
// A name of the form "Copy path › Workspace path" opens a submenu first.
async function action(path, name) {
await row(path).click({ button: "right" });
await page.getByRole("menuitem", { name, exact: true }).click();
const [first, second] = name.split(" › ");
if (second) await page.getByRole("menuitem", { name: first, exact: true }).hover();
await page.getByRole("menuitem", { name: second ?? first, exact: true }).click();
await settle();
}
async function selectFiles() {
@@ -76,9 +79,9 @@ await runSmoke("tree/actions", async ({ page }) => {
assert.deepEqual(await selected(), ["a.md", "b.md"]);
assert.equal(await page.getByRole("menuitem", { name: "Rename", exact: true }).isDisabled(), true);
await page.keyboard.press("Escape");
await action("a.md", "Copy workspace paths");
await action("a.md", "Copy path › Workspace path");
assert.equal(await page.evaluate(() => window.__TEST__.clipboard), "a.md\nb.md");
await action("b.md", "Copy system paths");
await action("b.md", "Copy path › System path");
assert.equal(await page.evaluate(() => window.__TEST__.clipboard), "C:\\tree-actions-test\\a.md\nC:\\tree-actions-test\\b.md");
await action("a.md", "Show in Explorer");
assert.deepEqual((await calls("workspace_reveal")).map(args => args.rel), ["a.md", "b.md"]);
+5 -4
View File
@@ -1,4 +1,4 @@
// Tree rename keeps pins and bookmarks: the file menu offers Copy system path, and Undo rename, Ctrl+Z, and Ctrl+Y restore the marks.
// Tree rename keeps pins and bookmarks: the file menu offers Copy path › System path, and Undo rename, Ctrl+Z, and Ctrl+Y restore the marks.
import assert from "node:assert/strict";
import { mockTauri, runSmoke, smokeUrl } from "../_harness/index.mjs";
@@ -22,8 +22,9 @@ await runSmoke("tree/renameMarks", async ({ page }) => {
const item = name => page.getByRole("menuitem", { name, exact: true });
await page.goto(smokeUrl);
await row("a.md").click({ button: "right" });
assert.equal(await item("Copy path").count(), 0);
assert.equal(await item("Copy system path").count(), 1);
// The file menu copies paths through the Copy path submenu, as the tab menu does.
await item("Copy path").hover();
assert.equal(await item("System path").count(), 1);
await item("Rename").click();
await page.locator(".tree input").fill("renamed.md");
await page.locator(".tree input").press("Enter");
@@ -38,5 +39,5 @@ await runSmoke("tree/renameMarks", async ({ page }) => {
await row("a.md").focus();
await page.keyboard.press("Control+y");
await row("renamed.md").waitFor();
console.log("PASS: Copy system path, rename, Undo rename, and Ctrl+Z and Ctrl+Y with marks");
console.log("PASS: Copy path › System path, rename, Undo rename, and Ctrl+Z and Ctrl+Y with marks");
}, { viewport: { width: 1200, height: 850 } });
@@ -17,6 +17,8 @@ await runSmoke("tree/renameSelection", async ({ page }) => {
await row("notes").waitFor();
for (const [theme, width] of [["dark", 1440], ["light", 620]]) {
await page.setViewportSize({ width, height: 850 });
// The side pane gives way below 800 pixels. The test opens it again.
if (width < 800) { await page.locator("aside.left").waitFor({ state: "detached" }); await page.keyboard.press("Control+Backslash"); await row("a.md").waitFor(); }
await page.evaluate(theme => { document.documentElement.dataset.theme = theme; document.documentElement.dataset.palette = "default"; }, theme);
await row("a.md").click();
await row("a.md").focus();
+4
View File
@@ -97,6 +97,10 @@ await runSmoke('tree/renameUndo', async ({ browser }) => {
await page.keyboard.press('Escape'); await page.keyboard.press('Escape');
}
await page.setViewportSize({ width: 600, height: 600 });
// The side pane gives way below 800 pixels. The test opens it again.
await page.locator('aside.left').waitFor({ state: 'detached' });
await page.keyboard.press('Control+Backslash');
await page.locator('aside.left').waitFor();
await paneMenu(); await item('New note').focus(); await page.keyboard.press('ArrowRight');
await shot(page, 'note-menu-dark-narrow.png');
assert.ok(await item('Manage templates…').evaluate(node => node.getBoundingClientRect().right <= innerWidth));
@@ -79,6 +79,10 @@ await runSmoke(name, async ({ page }) => {
await page.evaluate(() => { for (let i = 0; i < 40; i++) window.__TEST__.files.set(`.runestone/templates/Long template name ${i}.md`, "# Template"); });
await page.setViewportSize({ width: 600, height: 600 });
// The side pane gives way below 800 pixels. The test opens it again.
await page.locator("aside.left").waitFor({ state: "detached" });
await page.keyboard.press("Control+Backslash");
await page.locator("aside.left").waitFor();
await openManager();
assert.ok(await page.locator("dialog .list").evaluate(node => node.scrollHeight > node.clientHeight), "Long template list scrolls");
await page.screenshot({ path: path.join(output, "templates-narrow-long.png") });
+3 -2
View File
@@ -46,11 +46,12 @@ await runSmoke("workspace/session", async ({ page }) => {
await page.getByRole("button", { name: "Bookmarks", exact: true }).click();
const bookmarks = page.locator(".pane").filter({ hasText: "Bookmarks" });
await bookmarks.getByText("notes/renamed.md").waitFor();
// A bookmark shows the file name and its folder, with the full path in its tooltip.
await bookmarks.locator('button[title="notes/renamed.md"]').waitFor();
// Another window bookmarks a second note. The watcher reports the marks file.
await page.evaluate(() => window.__TEST__.files.set(".runestone/marks.json", JSON.stringify({ pins: ["notes/renamed.md"], bookmarks: ["notes/renamed.md", "notes/other.md"], order: {} })));
await emit("modify", [".runestone/marks.json"]);
await bookmarks.getByText("notes/other.md").waitFor();
await bookmarks.locator('button[title="notes/other.md"]').waitFor();
await page.getByRole("button", { name: "Files", exact: true }).click();
// A note that another program creates appears in the tree and in the backlinks, without a rescan.