diff --git a/README.md b/README.md index 923b90a..41ac65b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![Be Concise for Paseo: stop wordy agent edits.](docs/images/github-banner.png) + # Be concise for Paseo A native companion to [be-concise](https://github.com/yannelli/be-concise) for Claude Code and Codex. Open **Be concise** in Paseo's sidebar, workspace panels, or Command Center. The composer pill shows the rejected and flagged total when enforcement is on and **Off** when disabled. Open it for decision details and the workspace enforcement toggle. @@ -10,7 +12,7 @@ A native companion to [be-concise](https://github.com/yannelli/be-concise) for C ## Screenshots -All images are 1920×1080. They come from the Paseo 0.11.0-beta.3 web app with this plugin installed, using sample activity on a separate test daemon. The first five frame real captures with a headline. See [capture details](docs/composer-pill.md#screenshots). +All images are 1920×1080. They come from the Paseo 0.11.0-beta.3 web app in light mode with this plugin installed, using sample activity on a separate test daemon. The first five frame real captures with a headline. See [capture details](docs/composer-pill.md#screenshots). ### Composer pill @@ -20,9 +22,9 @@ All images are 1920×1080. They come from the Paseo 0.11.0-beta.3 web app with t ![Activity dashboard with the newest rejected file write expanded](docs/images/activity-desktop.png) -### Configuration in light mode +### Configuration -![User and project configuration layers in Paseo's light theme](docs/images/configuration-light.png) +![User and project configuration layers](docs/images/configuration-light.png) ### Hook preview diff --git a/docs/INDEX.md b/docs/INDEX.md index 65bc31d..b8b622f 100644 --- a/docs/INDEX.md +++ b/docs/INDEX.md @@ -1,5 +1,5 @@ # Documentation -Created: 2026-10-04. Last updated: 2026-10-04. +Created: 2026-10-04. Last updated: 2026-10-05. - [Composer pill and screenshots](composer-pill.md): compact status labels, the Paseo button contract, and screenshot capture details. Read this before changing labels or refreshing images. diff --git a/docs/composer-pill.md b/docs/composer-pill.md index 01ee378..efa8bb5 100644 --- a/docs/composer-pill.md +++ b/docs/composer-pill.md @@ -1,6 +1,6 @@ # Composer pill and screenshots -Created: 2026-10-04. Last updated: 2026-10-04. +Created: 2026-10-04. Last updated: 2026-10-05. ## Button contract @@ -21,9 +21,9 @@ The pill counts `deny`, `block`, `ask`, and `flag`. Allowed, rewritten, bypassed The [README gallery](../README.md#screenshots) uses scenario headings and PNG links, following the [Shared Browser example](https://github.com/omercnet/paseo-plugins/tree/d7b3e654f364b5be72edf6fd1d914a3750b53082/paseo-shared-browser#screenshots). The promo banners come first. The connection and empty states come last. -Every image in [images/](images/) is 1920×1080 (16:9). Captures were taken on 2026-10-04 from the Paseo 0.11.0-beta.3 web app, served by a separate test daemon with this plugin installed from the repository and be-concise 0.8.2. Sample hook records, a sample Git project, and an imported sample Claude Code session supplied the data. No prompt was sent to an agent. +Every gallery image in [images/](images/) is 1920×1080 (16:9). `github-banner.png` is the README header and the repository's social preview. It is 2560×1280 (1280×640 rendered at 2×) and under 1 MB, which meets GitHub's [social preview requirements](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/customizing-your-repositorys-social-media-preview), checked on 2026-10-05. GitHub has no API for this image: upload it under **Settings** > **Social preview** > **Edit**. Captures were taken on 2026-10-04 from the Paseo 0.11.0-beta.3 web app in light mode, served by a separate test daemon with this plugin installed from the repository and be-concise 0.8.2. Sample hook records, a sample Git project, and an imported sample Claude Code session supplied the data. No prompt was sent to an agent. -- **Banners** (`composer-on`, `activity-desktop`, `configuration-light`, `playground`, `compact`): a 960×540 HTML layout rendered at 2× around crops of 1440×900 captures at 2× pixel density. The narrow-screen banner shows two 390×844 captures. +- **Banners** (`composer-on`, `activity-desktop`, `configuration-light`, `playground`, `compact`): a 960×540 HTML layout rendered at 2× around tight crops of 1440×900 captures at 2× pixel density. Each capture card ends 56 pixels above the bottom edge at 1×. The narrow-screen banner shows two 390×844 captures beside the headline. The playground banner outlines the `decision` field of the hook response. Each banner shows the logo and "Be Concise" above the headline, the repository name with the GitHub mark at the bottom left, and a faint copy of the logo behind the screenshots. Colors, logo, and the Geist font come from the [be-concise theme](https://github.com/yannelli/be-concise/blob/main/plugins/concise/web/public/theme.css): charcoal `#18191D` background, cream `#FAF7F2` text, and orange `#FF4A24` accents. - **Plain captures** (`composer-off`, `activity-filtered`, `composer-connecting`, `composer-unavailable`, `activity-empty`): 1280×720 viewports at 1.5× pixel density. - **States**: Off was set through the project's `softFail` setting. Connecting was captured while the plugin process was paused. Unavailable was captured with be-concise removed from the test home. Empty was captured with no hook records. diff --git a/docs/images/activity-desktop.png b/docs/images/activity-desktop.png index 05176a1..886f1f4 100644 Binary files a/docs/images/activity-desktop.png and b/docs/images/activity-desktop.png differ diff --git a/docs/images/activity-empty.png b/docs/images/activity-empty.png index 0c6f966..dd4eae3 100644 Binary files a/docs/images/activity-empty.png and b/docs/images/activity-empty.png differ diff --git a/docs/images/activity-filtered.png b/docs/images/activity-filtered.png index 930e09a..68310de 100644 Binary files a/docs/images/activity-filtered.png and b/docs/images/activity-filtered.png differ diff --git a/docs/images/compact.png b/docs/images/compact.png index a5e965a..69fc997 100644 Binary files a/docs/images/compact.png and b/docs/images/compact.png differ diff --git a/docs/images/composer-connecting.png b/docs/images/composer-connecting.png index 844b4ee..8ce5cc1 100644 Binary files a/docs/images/composer-connecting.png and b/docs/images/composer-connecting.png differ diff --git a/docs/images/composer-off.png b/docs/images/composer-off.png index 371d9f5..055e546 100644 Binary files a/docs/images/composer-off.png and b/docs/images/composer-off.png differ diff --git a/docs/images/composer-on.png b/docs/images/composer-on.png index 5fdd1ef..5c2c81f 100644 Binary files a/docs/images/composer-on.png and b/docs/images/composer-on.png differ diff --git a/docs/images/composer-unavailable.png b/docs/images/composer-unavailable.png index 9b2816f..810f09f 100644 Binary files a/docs/images/composer-unavailable.png and b/docs/images/composer-unavailable.png differ diff --git a/docs/images/configuration-light.png b/docs/images/configuration-light.png index 046f5df..7203182 100644 Binary files a/docs/images/configuration-light.png and b/docs/images/configuration-light.png differ diff --git a/docs/images/github-banner.png b/docs/images/github-banner.png new file mode 100644 index 0000000..e4c66c6 Binary files /dev/null and b/docs/images/github-banner.png differ diff --git a/docs/images/playground.png b/docs/images/playground.png index 13234e4..7bb27f3 100644 Binary files a/docs/images/playground.png and b/docs/images/playground.png differ diff --git a/docs/promo-codex/assets/dark/activity.png b/docs/promo-codex/assets/dark/activity.png new file mode 100644 index 0000000..15cba39 Binary files /dev/null and b/docs/promo-codex/assets/dark/activity.png differ diff --git a/docs/promo-codex/assets/dark/compact-activity.png b/docs/promo-codex/assets/dark/compact-activity.png new file mode 100644 index 0000000..d175d68 Binary files /dev/null and b/docs/promo-codex/assets/dark/compact-activity.png differ diff --git a/docs/promo-codex/assets/dark/compact-composer.png b/docs/promo-codex/assets/dark/compact-composer.png new file mode 100644 index 0000000..7d07250 Binary files /dev/null and b/docs/promo-codex/assets/dark/compact-composer.png differ diff --git a/docs/promo-codex/assets/dark/configuration-light.png b/docs/promo-codex/assets/dark/configuration-light.png new file mode 100644 index 0000000..928823e Binary files /dev/null and b/docs/promo-codex/assets/dark/configuration-light.png differ diff --git a/docs/promo-codex/assets/dark/hero.png b/docs/promo-codex/assets/dark/hero.png new file mode 100644 index 0000000..c1e3c39 Binary files /dev/null and b/docs/promo-codex/assets/dark/hero.png differ diff --git a/docs/promo-codex/assets/dark/playground.png b/docs/promo-codex/assets/dark/playground.png new file mode 100644 index 0000000..2c1b437 Binary files /dev/null and b/docs/promo-codex/assets/dark/playground.png differ diff --git a/docs/promo-codex/assets/geist-mono.woff2 b/docs/promo-codex/assets/geist-mono.woff2 new file mode 100644 index 0000000..0e746fc Binary files /dev/null and b/docs/promo-codex/assets/geist-mono.woff2 differ diff --git a/docs/promo-codex/assets/geist.woff2 b/docs/promo-codex/assets/geist.woff2 new file mode 100644 index 0000000..71dab8b Binary files /dev/null and b/docs/promo-codex/assets/geist.woff2 differ diff --git a/docs/promo-codex/assets/light/activity.png b/docs/promo-codex/assets/light/activity.png new file mode 100644 index 0000000..b0c87ba Binary files /dev/null and b/docs/promo-codex/assets/light/activity.png differ diff --git a/docs/promo-codex/assets/light/compact-activity.png b/docs/promo-codex/assets/light/compact-activity.png new file mode 100644 index 0000000..4a18a24 Binary files /dev/null and b/docs/promo-codex/assets/light/compact-activity.png differ diff --git a/docs/promo-codex/assets/light/compact-composer.png b/docs/promo-codex/assets/light/compact-composer.png new file mode 100644 index 0000000..1ed92a2 Binary files /dev/null and b/docs/promo-codex/assets/light/compact-composer.png differ diff --git a/docs/promo-codex/assets/light/configuration-light.png b/docs/promo-codex/assets/light/configuration-light.png new file mode 100644 index 0000000..c138e0c Binary files /dev/null and b/docs/promo-codex/assets/light/configuration-light.png differ diff --git a/docs/promo-codex/assets/light/hero.png b/docs/promo-codex/assets/light/hero.png new file mode 100644 index 0000000..8a22afc Binary files /dev/null and b/docs/promo-codex/assets/light/hero.png differ diff --git a/docs/promo-codex/assets/light/playground.png b/docs/promo-codex/assets/light/playground.png new file mode 100644 index 0000000..eb212fb Binary files /dev/null and b/docs/promo-codex/assets/light/playground.png differ diff --git a/docs/promo-codex/banner.css b/docs/promo-codex/banner.css new file mode 100644 index 0000000..6b5659a --- /dev/null +++ b/docs/promo-codex/banner.css @@ -0,0 +1,117 @@ +@font-face { + font-family: Geist; + src: url('./assets/geist.woff2') format('woff2'); + font-weight: 100 900; +} +@font-face { + font-family: 'Geist Mono'; + src: url('./assets/geist-mono.woff2') format('woff2'); + font-weight: 100 900; +} +* { box-sizing: border-box; } +html, body { margin: 0; } +body { + width: 1920px; + height: 1080px; + overflow: hidden; + background: #faf7f2; + color: #18191d; + font-family: Geist, sans-serif; + -webkit-font-smoothing: antialiased; +} +.brand { + position: absolute; + top: 70px; + left: 88px; + display: flex; + align-items: center; + gap: 22px; + font-size: 34px; + font-weight: 650; + letter-spacing: -1.2px; +} +.brand svg { width: 65px; height: 45px; } +.brand rect { fill: #ff4a24; } +.brand span { font-weight: 450; color: #716f6b; } +.copy { + position: absolute; + left: 88px; + top: 284px; + width: 730px; +} +.eyebrow { + display: flex; + align-items: center; + gap: 16px; + font-family: 'Geist Mono', monospace; + font-size: 21px; + letter-spacing: 1px; + text-transform: uppercase; +} +.eyebrow::before { content: ''; width: 28px; height: 5px; background: #ff4a24; } +h1 { + margin: 35px 0 27px; + font-size: 114px; + line-height: 1.01; + letter-spacing: -5.8px; + font-weight: 750; +} +h1 em { font-style: normal; color: #ff4a24; } +.description { + margin: 0; + font-size: 29px; + line-height: 1.45; + letter-spacing: -.6px; + color: #68645f; +} +.stage { + position: absolute; + left: 888px; + top: 144px; + width: 952px; + height: 800px; + border-radius: 40px; + background: #ff4a24; + overflow: hidden; +} +.stage .watermark { + position: absolute; + width: 1260px; + height: 860px; + left: -200px; + top: -30px; + color: #95250d; + opacity: .2; +} +.capture { + position: absolute; + overflow: hidden; + border: 8px solid #292a2e; + border-radius: 24px; + box-shadow: 0 25px 45px #55160744, 0 3px 0 #ffffff33 inset; + background: #191d1b; +} +.capture img { position: absolute; max-width: none; } +.theme-light .capture { background: #fff; } +.capture.phone { border-radius: 34px; border-width: 7px; } +.phone img { width: 100%; height: auto; position: static; display: block; } +.stage-label { + position: absolute; + left: 36px; + top: 25px; + color: #44190f; + font: 18px 'Geist Mono', monospace; +} +.stage-label::before { content: '+'; margin-right: 11px; } +footer { + position: absolute; + left: 88px; + right: 80px; + bottom: 54px; + display: flex; + align-items: center; + justify-content: space-between; + font: 23px 'Geist Mono', monospace; + letter-spacing: -.7px; +} +.page-number { color: #79746e; font-size: 20px; } diff --git a/docs/promo-codex/comparison.png b/docs/promo-codex/comparison.png new file mode 100644 index 0000000..24473d5 Binary files /dev/null and b/docs/promo-codex/comparison.png differ diff --git a/docs/promo-codex/dark/activity.html b/docs/promo-codex/dark/activity.html new file mode 100644 index 0000000..39ac811 --- /dev/null +++ b/docs/promo-codex/dark/activity.html @@ -0,0 +1,14 @@ +Live activity + +
be concise / Paseo
+
Live activity

See why
edits get
blocked.

The edit. The rule. The reason.

+
be concise in Paseo
+ Be concise activity in Paseo +
+ + \ No newline at end of file diff --git a/docs/promo-codex/dark/activity.png b/docs/promo-codex/dark/activity.png new file mode 100644 index 0000000..282054e Binary files /dev/null and b/docs/promo-codex/dark/activity.png differ diff --git a/docs/promo-codex/dark/composer.html b/docs/promo-codex/dark/composer.html new file mode 100644 index 0000000..fe865c5 --- /dev/null +++ b/docs/promo-codex/dark/composer.html @@ -0,0 +1,14 @@ +In your composer + +
be concise / Paseo
+
In your composer

Keep agent
edits
concise.

Check activity. Toggle enforcement.

+
be concise in Paseo
+ Be concise hero in Paseo +
+ + \ No newline at end of file diff --git a/docs/promo-codex/dark/composer.png b/docs/promo-codex/dark/composer.png new file mode 100644 index 0000000..a90f4d0 Binary files /dev/null and b/docs/promo-codex/dark/composer.png differ diff --git a/docs/promo-codex/dark/configuration.html b/docs/promo-codex/dark/configuration.html new file mode 100644 index 0000000..0282e44 --- /dev/null +++ b/docs/promo-codex/dark/configuration.html @@ -0,0 +1,14 @@ +Project settings + +
be concise / Paseo
+
Project settings

Set limits.
Per project.

Comments, files, and writing style.

+
be concise in Paseo
+ Be concise configuration in Paseo +
+ + \ No newline at end of file diff --git a/docs/promo-codex/dark/configuration.png b/docs/promo-codex/dark/configuration.png new file mode 100644 index 0000000..7cacc3a Binary files /dev/null and b/docs/promo-codex/dark/configuration.png differ diff --git a/docs/promo-codex/dark/mobile.html b/docs/promo-codex/dark/mobile.html new file mode 100644 index 0000000..4a2875d --- /dev/null +++ b/docs/promo-codex/dark/mobile.html @@ -0,0 +1,15 @@ +On your phone + +
be concise / Paseo
+
On your phone

Check edits.
On the go.

Activity and controls in Paseo.

+
be concise in Paseo
+ Composer sheet in Paseo at phone width +
+ Activity feed in Paseo at phone width +
+ + \ No newline at end of file diff --git a/docs/promo-codex/dark/mobile.png b/docs/promo-codex/dark/mobile.png new file mode 100644 index 0000000..2692695 Binary files /dev/null and b/docs/promo-codex/dark/mobile.png differ diff --git a/docs/promo-codex/dark/playground.html b/docs/promo-codex/dark/playground.html new file mode 100644 index 0000000..77008cb --- /dev/null +++ b/docs/promo-codex/dark/playground.html @@ -0,0 +1,14 @@ +Rule playground + +
be concise / Paseo
+
Rule playground

Try rules
on your
own text.

Preview without changing files.

+
be concise in Paseo
+ Be concise playground in Paseo +
+ + \ No newline at end of file diff --git a/docs/promo-codex/dark/playground.png b/docs/promo-codex/dark/playground.png new file mode 100644 index 0000000..082a9be Binary files /dev/null and b/docs/promo-codex/dark/playground.png differ diff --git a/docs/promo-codex/index.html b/docs/promo-codex/index.html new file mode 100644 index 0000000..0ac0e01 --- /dev/null +++ b/docs/promo-codex/index.html @@ -0,0 +1,11 @@ + + Be concise: Codex design pass

Be concise / Codex design pass

1920 × 1080 · Existing Paseo captures with sample data

+
+
In your composer, dark theme
In your composer · dark UI
In your composer, light theme
In your composer · light UI
Live activity, dark theme
Live activity · dark UI
Live activity, light theme
Live activity · light UI
Project settings, dark theme
Project settings · dark UI
Project settings, light theme
Project settings · light UI
Rule playground, dark theme
Rule playground · dark UI
Rule playground, light theme
Rule playground · light UI
On your phone, dark theme
On your phone · dark UI
On your phone, light theme
On your phone · light UI
+ \ No newline at end of file diff --git a/docs/promo-codex/light/activity.html b/docs/promo-codex/light/activity.html new file mode 100644 index 0000000..d8c263a --- /dev/null +++ b/docs/promo-codex/light/activity.html @@ -0,0 +1,14 @@ +Live activity + +
be concise / Paseo
+
Live activity

See why
edits get
blocked.

The edit. The rule. The reason.

+
be concise in Paseo
+ Be concise activity in Paseo +
+ + \ No newline at end of file diff --git a/docs/promo-codex/light/activity.png b/docs/promo-codex/light/activity.png new file mode 100644 index 0000000..95162df Binary files /dev/null and b/docs/promo-codex/light/activity.png differ diff --git a/docs/promo-codex/light/composer.html b/docs/promo-codex/light/composer.html new file mode 100644 index 0000000..c8ced3a --- /dev/null +++ b/docs/promo-codex/light/composer.html @@ -0,0 +1,14 @@ +In your composer + +
be concise / Paseo
+
In your composer

Keep agent
edits
concise.

Check activity. Toggle enforcement.

+
be concise in Paseo
+ Be concise hero in Paseo +
+ + \ No newline at end of file diff --git a/docs/promo-codex/light/composer.png b/docs/promo-codex/light/composer.png new file mode 100644 index 0000000..7c2879c Binary files /dev/null and b/docs/promo-codex/light/composer.png differ diff --git a/docs/promo-codex/light/configuration.html b/docs/promo-codex/light/configuration.html new file mode 100644 index 0000000..c772150 --- /dev/null +++ b/docs/promo-codex/light/configuration.html @@ -0,0 +1,14 @@ +Project settings + +
be concise / Paseo
+
Project settings

Set limits.
Per project.

Comments, files, and writing style.

+
be concise in Paseo
+ Be concise configuration in Paseo +
+ + \ No newline at end of file diff --git a/docs/promo-codex/light/configuration.png b/docs/promo-codex/light/configuration.png new file mode 100644 index 0000000..7b20161 Binary files /dev/null and b/docs/promo-codex/light/configuration.png differ diff --git a/docs/promo-codex/light/mobile.html b/docs/promo-codex/light/mobile.html new file mode 100644 index 0000000..2390954 --- /dev/null +++ b/docs/promo-codex/light/mobile.html @@ -0,0 +1,15 @@ +On your phone + +
be concise / Paseo
+
On your phone

Check edits.
On the go.

Activity and controls in Paseo.

+
be concise in Paseo
+ Composer sheet in Paseo at phone width +
+ Activity feed in Paseo at phone width +
+ + \ No newline at end of file diff --git a/docs/promo-codex/light/mobile.png b/docs/promo-codex/light/mobile.png new file mode 100644 index 0000000..28127ce Binary files /dev/null and b/docs/promo-codex/light/mobile.png differ diff --git a/docs/promo-codex/light/playground.html b/docs/promo-codex/light/playground.html new file mode 100644 index 0000000..436c4e3 --- /dev/null +++ b/docs/promo-codex/light/playground.html @@ -0,0 +1,14 @@ +Rule playground + +
be concise / Paseo
+
Rule playground

Try rules
on your
own text.

Preview without changing files.

+
be concise in Paseo
+ Be concise playground in Paseo +
+ + \ No newline at end of file diff --git a/docs/promo-codex/light/playground.png b/docs/promo-codex/light/playground.png new file mode 100644 index 0000000..8d9e817 Binary files /dev/null and b/docs/promo-codex/light/playground.png differ diff --git a/docs/promo-codex/render.mjs b/docs/promo-codex/render.mjs new file mode 100644 index 0000000..964e8e8 --- /dev/null +++ b/docs/promo-codex/render.mjs @@ -0,0 +1,125 @@ +import assert from 'node:assert/strict'; +import { writeFile, mkdir, readFile } from 'node:fs/promises'; +import { createRequire } from 'node:module'; +import { fileURLToPath, pathToFileURL } from 'node:url'; +import { join } from 'node:path'; + +const require = createRequire(import.meta.url); +const { chromium } = process.env.PLAYWRIGHT_MODULE + ? await import(pathToFileURL(process.env.PLAYWRIGHT_MODULE).href) + : require('playwright'); +const root = fileURLToPath(new URL('.', import.meta.url)); +const shapes = ` + +`; +const mark = (className = '') => ``; +const captures = { + hero: { file: 'hero', box: [925, 946, 790, 580], width: 800, left: 76, top: 102 }, + activity: { file: 'activity', box: [750, 528, 1120, 730], width: 850, left: 51, top: 120 }, + configuration: { file: 'configuration-light', box: [750, 1220, 1100, 580], width: 850, left: 51, top: 167 }, + playground: { file: 'playground', box: [752, 408, 1600, 760], width: 850, left: 51, top: 186 }, +}; +const banners = [ + { name: 'composer', label: 'In your composer', title: 'Keep agent
edits
concise.', description: 'Check activity. Toggle enforcement.', capture: 'hero' }, + { name: 'activity', label: 'Live activity', title: 'See why
edits get
blocked.', description: 'The edit. The rule. The reason.', capture: 'activity' }, + { name: 'configuration', label: 'Project settings', title: 'Set limits.
Per project.', description: 'Comments, files, and writing style.', capture: 'configuration' }, + { name: 'playground', label: 'Rule playground', title: 'Try rules
on your
own text.', description: 'Preview without changing files.', capture: 'playground' }, + { name: 'mobile', label: 'On your phone', title: 'Check edits.
On the go.', description: 'Activity and controls in Paseo.', capture: 'phones' }, +]; + +async function pngSize(file) { + const bytes = await readFile(file); + assert.equal(bytes.subarray(1, 4).toString(), 'PNG'); + return { width: bytes.readUInt32BE(16), height: bytes.readUInt32BE(20) }; +} + +async function captureMarkup(theme, name) { + if (name === 'phones') { + return ['compact-composer', 'compact-activity'].map((file, index) => + `
+ ${file === 'compact-composer' ? 'Composer sheet' : 'Activity feed'} in Paseo at phone width +
`).join(''); + } + const { file, box, width, left, top } = captures[name]; + const source = await pngSize(join(root, 'assets', theme, `${file}.png`)); + const [x, y, cropWidth, cropHeight] = box; + assert(x + cropWidth <= source.width && y + cropHeight <= source.height); + const scale = (width - 16) / cropWidth; + return `
+ Be concise ${name} in Paseo +
`; +} + +function page(banner, theme, capture, index) { + return `${banner.label} + +
${mark()}
be concise / Paseo
+
${banner.label}

${banner.title}

${banner.description}

+
${mark('watermark')}
be concise in Paseo
${capture}
+
yannelli/paseo-plugin-concise0${index + 1} / 05
+ `; +} + +const browser = await chromium.launch({ headless: true }); +try { + const tab = await browser.newPage({ viewport: { width: 1920, height: 1080 }, deviceScaleFactor: 1 }); + const failures = []; + tab.on('pageerror', (error) => failures.push(error.message)); + for (const theme of ['dark', 'light']) { + await mkdir(join(root, theme), { recursive: true }); + for (const [index, banner] of banners.entries()) { + const htmlPath = join(root, theme, `${banner.name}.html`); + await writeFile(htmlPath, page(banner, theme, await captureMarkup(theme, banner.capture), index)); + await tab.goto(pathToFileURL(htmlPath).href); + await tab.evaluate(async () => { + await document.fonts.ready; + await Promise.all([...document.images].map((image) => image.decode())); + }); + const geometry = await tab.evaluate(() => { + const copy = document.querySelector('.copy').getBoundingClientRect(); + const stage = document.querySelector('.stage').getBoundingClientRect(); + return { + separated: copy.right < stage.left, + font: document.fonts.check('750 114px Geist'), + capturesFit: [...document.querySelectorAll('.capture')].every((element) => { + const rect = element.getBoundingClientRect(); + return rect.left >= stage.left && rect.right <= stage.right && rect.bottom <= stage.bottom - 30; + }), + textFits: document.querySelector('h1').scrollWidth <= copy.width, + }; + }); + assert.deepEqual(geometry, { separated: true, font: true, capturesFit: true, textFits: true }); + const output = join(root, theme, `${banner.name}.png`); + await tab.screenshot({ path: output }); + assert.deepEqual(await pngSize(output), { width: 1920, height: 1080 }); + console.log(`${theme}/${banner.name}.png: 1920x1080, assets and layout checked`); + } + } + assert.deepEqual(failures, []); + const gallery = ` + Be concise: Codex design pass

Be concise / Codex design pass

1920 × 1080 · Existing Paseo captures with sample data

+
+
${banners.map((banner) => ['dark', 'light'].map((theme) => `
${banner.label}, ${theme} theme
${banner.label} · ${theme} UI
`).join('')).join('')}
+ `; + await writeFile(join(root, 'index.html'), gallery); + await tab.setViewportSize({ width: 1600, height: 2450 }); + await tab.goto(pathToFileURL(join(root, 'index.html')).href); + await tab.evaluate(async () => { await document.fonts.ready; await Promise.all([...document.images].map((image) => image.decode())); }); + await tab.screenshot({ path: join(root, 'comparison.png'), fullPage: true }); + for (const theme of ['dark', 'light', 'both']) { + await tab.locator(`button[data-theme="${theme}"]`).click(); + assert.equal(await tab.locator('figure:visible').count(), theme === 'both' ? 10 : 5); + } + await tab.setViewportSize({ width: 390, height: 844 }); + assert(await tab.evaluate(() => document.documentElement.scrollWidth <= innerWidth)); + console.log('Gallery: theme filters and mobile width checked'); +} finally { + await browser.close(); +}