diff --git a/AGENTS.md b/AGENTS.md index 3b21ee9..5b83534 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -35,6 +35,7 @@ Keep code readable by a literate technical user in a single sitting. Prefer the - Source, build, and dist never overlap. Source directories hold only hand-authored code. `build/` (top-level, mirroring `packages/` and `pages/` — e.g. `build/packages/kdbx/`, `build/pages/0x67/`) holds intermediate, always-regenerated compiler and bundler output. `dist/` (top-level) holds the final distributables. Neither `build/` nor `dist/` is ever committed; deleting either never loses anything that can't be regenerated by `npm run build`. - One version number, at the repo root. Packages under `packages/` don't carry independent versions — they aren't published. - Biome lint and format are enforced with no exceptions. `npm run lint` must be clean before a change is done. +- Comments in code that actually ships — each package's `src/` (`packages/*/src/`), and each page's `page.ts`, `logic.ts`, and `page.css` — are compact, because every dist file ships this text verbatim (see [Reproducing a build][reproducing] / the build pipeline: nothing minifies or strips comments), so a wordy comment is wordy in every user's download, not just in the editor. Content that fits on one line is an end-of-line comment (e.g., `//`) where the language has one; content that genuinely needs two or more lines, or where the language has no end-of-line form at all (CSS only has `/* */`), is a block comment. This is decided on the *final*, trimmed wording, not the original — if trimming a block down to its essential point leaves only one line, it becomes an end-of-line comment wherever that's available, not a one-line block. A block comment is compact: the opening delimiter is immediately followed by content on the same line, continuation lines carry no `* ` gutter and are indented to match the surrounding code (not offset for an asterisk), and the closing delimiter sits at the end of the last content line, never alone on its own line. Multi-line comments are trimmed to their essential point — the non-obvious why, spec/RFC citations, security rationale — not restated context, illustrative examples, or a treatise. None of this applies to `tools/`, `e2e/`, `*.test.ts`, or any other test/tooling code: nothing there ships in a dist file, so ordinary, fuller commenting is fine. Biome does not enforce any of this — it's a manual review point, not a lint failure. ## Quality requirements diff --git a/e2e/cloud-google-drive-iframe.test.ts b/e2e/cloud-google-drive-iframe.test.ts index 1e8f8d9..35dce6a 100644 --- a/e2e/cloud-google-drive-iframe.test.ts +++ b/e2e/cloud-google-drive-iframe.test.ts @@ -54,11 +54,11 @@ test('embedded 0x67 iframe fills its container, and its own footer stays hidden' const { frameHeight, availableHeight } = await page.evaluate(() => { const iframe = document.getElementById('app-frame') as HTMLIFrameElement; const header = document.querySelector('.host-header') as HTMLElement; - const sponsorCta = document.querySelector('.sponsor-cta') as HTMLElement; + const footerLinks = document.querySelector('.footer-links') as HTMLElement; const footer = document.querySelector('footer') as HTMLElement; const claimedByOthers = header.getBoundingClientRect().height + - sponsorCta.getBoundingClientRect().height + + footerLinks.getBoundingClientRect().height + footer.getBoundingClientRect().height; return { frameHeight: iframe.getBoundingClientRect().height, @@ -69,7 +69,7 @@ test('embedded 0x67 iframe fills its container, and its own footer stays hidden' assert.ok( Math.abs(frameHeight - availableHeight) < 3, `iframe height (${frameHeight}px) should fill the space left over after ` + - `the header/sponsor-cta/footer (${availableHeight}px), not collapse`, + `the header/footer-links/footer (${availableHeight}px), not collapse`, ); const outerFooterVisible = await page.evaluate(() => { diff --git a/pages/0x67/build.json b/pages/0x67/build.json index 8ae25d5..0f20e4d 100644 --- a/pages/0x67/build.json +++ b/pages/0x67/build.json @@ -1,6 +1,7 @@ { "template": "page.html", - "styles": ["page.css"], + "styles": ["../shared/footer.css", "page.css"], "scripts": ["../../build/pages/0x67/bundle.js"], + "footer": "../shared/footer.html", "output": "../../dist/0x67.html" } diff --git a/pages/0x67/page.css b/pages/0x67/page.css index 6c7919f..9a1eee0 100644 --- a/pages/0x67/page.css +++ b/pages/0x67/page.css @@ -1376,44 +1376,8 @@ input.attachment-name:focus { layout's justify-content:center) ============================================================ */ -.sponsor-cta { - flex-shrink: 0; - padding: 0.4rem 1rem 0; - font-size: 0.8rem; - color: var(--text); - text-align: center; -} - -footer { - flex-shrink: 0; - padding: 0.4rem 1rem; - border-top: 1px solid var(--border); - font-size: 0.75rem; - color: var(--muted); - text-align: center; -} - -footer a { - color: var(--accent); - text-decoration: none; -} - -.sponsor-cta a { - color: var(--accent); - font-weight: 600; - text-decoration: none; -} - -footer a:hover { - text-decoration: underline; -} - -.sponsor-cta a:hover { - text-decoration: underline; -} - /* Embedded: the host page has its own footer, so hide this copy. */ -body.embedded .sponsor-cta, +body.embedded .footer-links, body.embedded footer { display: none; } diff --git a/pages/0x67/page.html b/pages/0x67/page.html index 57aaddd..252cfc8 100644 --- a/pages/0x67/page.html +++ b/pages/0x67/page.html @@ -403,10 +403,7 @@
- Like KeePass Web? ♥ Sponsor its development. -
- +