Make menus opaque and redesign the core palettes

Phase 5a-3. The owner chose candidate B of each palette.

- Menus are opaque (UI-043, replaces UI-013). With a background image,
  menus are at least 92% opaque and blur the image. Submenus show as
  manual popovers in the top layer, so the blur cannot clip them.
- In a light palette, the page is the lightest surface, and the side
  panes have a slight tint (UI-044).
- RuneStone uses neutral surfaces and the rune cyan of the app icon.
  Claude Dark uses the layout of the Claude app. Claude Light uses a
  white page with brand Light panes and a darker orange for text.
  Sakura uses Petal Veil for active rows.
- All five core palettes pass every readability rule. A text role keeps
  the hue of its source and changes only its lightness.
- The accent-text rule also checks accent-2, because inline code in
  Read uses it as text.
- The root token defaults match RuneStone Dark.

pnpm check passes. pnpm test: 447 pass, 5 todo, 0 fail. Full smoke
suite: 92 passed, 2 known. editor/markdownPaste and tables/formulas
failed one time and passed on retry. workspace/manageTemplates fails
about half of its runs, also on the previous commit: the tree menu
rebuilds when the template list reloads, and the open submenu closes.
This commit is contained in:
Knotty Wyvern
2026-10-28 16:47:55 -07:00
parent 5bd616d7fd
commit 445d0200b2
18 changed files with 156 additions and 71 deletions
+9 -2
View File
@@ -36,7 +36,7 @@ await runSmoke("menus/consistency", async ({ page }) => {
const label = row.querySelector(".action-label");
const css = getComputedStyle(node), button = getComputedStyle(row);
return {
panel: [css.padding, css.borderRadius, css.backgroundColor, css.color, css.boxShadow, css.font],
panel: [css.padding, css.borderRadius, css.backgroundColor, css.color, css.boxShadow, css.font, css.backdropFilter],
row: [button.padding, button.minHeight, button.borderRadius, button.gap, button.font],
iconWidth: icon.getBoundingClientRect().width,
inset: Math.round(row.getBoundingClientRect().left - node.getBoundingClientRect().left),
@@ -52,6 +52,12 @@ await runSmoke("menus/consistency", async ({ page }) => {
const tab = page.getByRole("tab", { name: "a.md", exact: true });
await tab.waitFor();
await page.locator(".cm-content").waitFor();
// Without a background image, menus are opaque and do not blur (UI-043).
await row.click({ button: "right" });
const opaque = await metrics(menu("File actions"));
assert.match(opaque.panel[2], /^rgb\(/, "Menus are opaque without a background image");
assert.equal(opaque.panel[6], "none");
await dismiss();
for (const theme of ["dark", "light"]) {
await page.evaluate(async mode => {
const { saveAppearance } = await import('/src/lib/theme/appearance.ts');
@@ -84,7 +90,8 @@ await runSmoke("menus/consistency", async ({ page }) => {
assert.ok(compactHeight < previousHeight * .85, 'The same actions use at least 15% less vertical space');
console.log(JSON.stringify({ theme, compactHeight, previousHeight }));
await page.screenshot({ path: path.join(output, `menu-spacing-after-${theme}.png`) });
assert.ok(reference.panel[2].includes('/ 0.82') || /rgba\(.+, 0\.82\)/.test(reference.panel[2]), "Shared menus retain an 82% surface tint");
assert.ok(reference.panel[2].includes('/ 0.92') || /rgba\(.+, 0\.92\)/.test(reference.panel[2]), "With a background image, menus are at least 92% opaque");
assert.match(reference.panel[6], /blur\(18px\)/, "With a background image, menus blur it");
assert.ok(reference.inset >= 5, "Rows need an inset from the panel border");
assert.equal(await item("Pin").locator("svg.action-icon").count(), 1);
const offsets = await file.locator(":scope > button").evaluateAll(nodes => nodes.map(node => Math.round(node.querySelector(".action-label").getBoundingClientRect().left - node.getBoundingClientRect().left)));