Overlay 2.0 (#12)

This commit is contained in:
2026-03-01 02:36:51 -08:00
committed by GitHub
parent 45df3c466b
commit 44c7761c7c
397 changed files with 15139 additions and 7127 deletions

View File

@@ -0,0 +1,34 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
function readWorkspaceFile(relativePath: string): string {
return fs.readFileSync(path.join(process.cwd(), relativePath), 'utf8');
}
test('keyboard chord map no longer emits legacy invisible overlay script messages', () => {
const keyboardSource = readWorkspaceFile('src/renderer/handlers/keyboard.ts');
assert.doesNotMatch(keyboardSource, /subminer-toggle-invisible/);
assert.doesNotMatch(keyboardSource, /subminer-show-invisible/);
assert.doesNotMatch(keyboardSource, /subminer-hide-invisible/);
});
test('overlay layer contracts no longer advertise invisible renderer layer', () => {
const typesSource = readWorkspaceFile('src/types.ts');
assert.doesNotMatch(typesSource, /export type OverlayLayer = 'visible' \| 'invisible'/);
assert.doesNotMatch(
typesSource,
/getOverlayLayer:\s*\(\)\s*=>\s*'visible'\s*\|\s*'invisible'\s*\|\s*'modal'\s*\|\s*null/,
);
});
test('renderer stylesheet no longer contains invisible-layer selectors', () => {
const cssSource = readWorkspaceFile('src/renderer/style.css');
assert.doesNotMatch(cssSource, /body\.layer-invisible/);
});
test('top-level docs avoid stale overlay-layers wording', () => {
const docsReadmeSource = readWorkspaceFile('docs/README.md');
assert.doesNotMatch(docsReadmeSource, /overlay layers/i);
});