Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/smart-choice-release-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ The release preserves the owner-approved Roby’s identity v4 and synchronizes:
- landing and menu PWA registration at `platform-install-20260727-1`;
- generated HTML and integrity-manifest evidence.

## Post-merge visual inspection

A direct inspection of the completed surfaces found that the Smart Choice header still reconstructed the wordmark with CSS and the owner simulator used a text-only brand label. PR #289 replaces both with the shared owner-approved compact SVG-path identity, adds bounded 320 px sizing, and makes this requirement executable in the Smart Choice release verifier.

## Verified boundary

The integration workflow performed a real three-way merge against current `main`, rebuilt generated assets, regenerated the integrity manifest, and completed `npm run check` before sealing the product commit.
Expand Down
2 changes: 1 addition & 1 deletion integrity-manifest.json

Large diffs are not rendered by default.

28 changes: 26 additions & 2 deletions scripts/verify-smart-choice-release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ const read = (file) => readFileSync(path.join(root, file), "utf8");
const size = (file) => statSync(path.join(root, file)).size;

const html = read("smart-choice/index.html");
const simulatorHtml = read("smart-choice/simulator.html");
const baseCss = read("smart-choice/style.css");
const brandCss = read("smart-choice/brand-v4.css");
const releaseCss = read("smart-choice/release-qa.css");
const sharedBrandCss = read("brand-photo-logo.css");
const packageJson = JSON.parse(read("package.json"));
const pageSource = read("src/smart-choice/page.ts");
const cartSource = read("src/smart-choice/cart.ts");
const releaseRuntime = read("src/smart-choice/release-qa.ts");
const releaseDomain = read("src/smart-choice/release-qa-domain.ts");

const APPROVED_IDENTITY_REVISION = "20260726-approved-v4";

function requireText(haystack, needle, message) {
assert.ok(haystack.includes(needle), message ?? `Missing required text: ${needle}`);
}
Expand Down Expand Up @@ -69,6 +74,23 @@ assert.ok(!/<script(?![^>]*src=)[^>]*>/i.test(html), "inline scripts are forbidd
assert.ok(!/style\s*=/i.test(html), "inline styles are forbidden");
assert.ok(!/tabindex\s*=\s*["']?[1-9]/i.test(html), "positive tabindex is forbidden");

for (const [surface, surfaceHtml] of [["client", html], ["owner simulator", simulatorHtml]]) {
requireText(surfaceHtml, `../brand-photo-logo.css?v=${APPROVED_IDENTITY_REVISION}`, `${surface} must load the shared owner-approved identity stylesheet`);
requireText(surfaceHtml, 'brand-v4.css?', `${surface} must load the Smart Choice identity adapter`);
requireText(surfaceHtml, '<span class="brand-copy"><strong>ROBY\'S</strong><small>COFFEE HOUSE</small></span>', `${surface} must preserve accessible brand copy behind the approved SVG`);
}
assert.ok(
html.indexOf("brand-photo-logo.css") > html.indexOf("release-qa.css"),
"shared approved identity CSS must load after local Smart Choice styles"
);
assert.ok(
simulatorHtml.indexOf("brand-photo-logo.css") > simulatorHtml.indexOf("simulator.css"),
"shared approved identity CSS must load after simulator styles"
);
requireText(sharedBrandCss, `robys-compact-master-v1.svg?v=${APPROVED_IDENTITY_REVISION}`, "shared brand CSS must use the approved compact SVG revision");
requireText(brandCss, `robys-compact-master-v1.svg?v=${APPROVED_IDENTITY_REVISION}`, "Smart Choice adapter must pin the approved compact SVG revision");
assert.ok(!/<a class="sim-brand"[^>]*>\s*ROBY'S\s*<\/a>/i.test(simulatorHtml), "owner simulator must not render a text-only wordmark");

const releaseIndex = html.indexOf("release-qa.js");
const appIndex = html.indexOf("app.js");
const analyticsIndex = html.indexOf("analytics.js");
Expand All @@ -80,6 +102,7 @@ requireText(baseCss, "@media (prefers-reduced-motion: reduce)", "reduced motion
requireText(releaseCss, "@media (max-width: 360px)", "narrow mobile hardening is required");
requireText(releaseCss, "overflow-wrap: anywhere", "long TR/RU strings must wrap safely");
requireText(releaseCss, ".visually-hidden", "screen-reader-only utility is required");
requireText(brandCss, "@media (max-width: 360px)", "approved identity adapter must include narrow-mobile sizing");

requireText(pageSource, "sessionStorage", "session restore support is required");
requireText(pageSource, "window.history", "browser back/deep-link support is required");
Expand Down Expand Up @@ -108,7 +131,8 @@ const cssFiles = [
"smart-choice/style.css",
"smart-choice/cart.css",
"smart-choice/decision-trace.css",
"smart-choice/release-qa.css"
"smart-choice/release-qa.css",
"smart-choice/brand-v4.css"
];
const totalJs = jsFiles.reduce((sum, file) => sum + size(file), 0);
const totalCss = cssFiles.reduce((sum, file) => sum + size(file), 0);
Expand All @@ -120,6 +144,6 @@ assert.ok(totalCss <= 100_000, `Smart Choice CSS total ${totalCss} exceeds the 1
assert.ok(size("smart-choice/index.html") <= 30_000, "Smart Choice HTML exceeds the 30 KB pilot budget");

console.log(
`[SMART-CHOICE-RELEASE] verified locales, TRY, a11y, fallback, navigation, 320px and budgets: ` +
`[SMART-CHOICE-RELEASE] verified approved identity v4, locales, TRY, a11y, fallback, navigation, 320px and budgets: ` +
`${totalJs} B JS / ${totalCss} B CSS`
);
32 changes: 32 additions & 0 deletions smart-choice/brand-v4.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* Smart Choice adapters for the shared owner-approved Roby's identity v4. */
.smart-header .brand-copy,
.sim-brand .brand-copy {
width: 142px !important;
height: 45px !important;
background-image: url("../src/brand/robys-compact-master-v1.svg?v=20260726-approved-v4") !important;
}

.sim-brand {
display: inline-flex;
align-items: center;
justify-content: center;
}

@media (max-width: 520px) {
.smart-header .brand-copy {
width: 108px !important;
height: 39px !important;
}

.sim-brand .brand-copy {
width: 96px !important;
height: 35px !important;
}
}

@media (max-width: 360px) {
.smart-header .brand-copy {
width: 94px !important;
height: 34px !important;
}
}
2 changes: 2 additions & 0 deletions smart-choice/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<link rel="stylesheet" href="cart.css?v=4fcc327520f5" />
<link rel="stylesheet" href="decision-trace.css?v=caa831d49b1f" />
<link rel="stylesheet" href="release-qa.css?v=9d9afd5b512c" />
<link rel="stylesheet" href="../brand-photo-logo.css?v=20260726-approved-v4" />
<link rel="stylesheet" href="brand-v4.css?v=20260728-1" />
<title>Roby's Smart Choice</title>
<script type="module" src="release-qa.js?v=8741e7ebc72b"></script>
<script type="module" src="app.js?v=e3b1394277f7"></script>
Expand Down
6 changes: 5 additions & 1 deletion smart-choice/simulator.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; connect-src 'none'; font-src 'self' data:; object-src 'none'; base-uri 'self'; form-action 'none'; frame-ancestors 'none'; upgrade-insecure-requests" />
<link rel="icon" href="../icon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="simulator.css?v=b39978b525a7" />
<link rel="stylesheet" href="../brand-photo-logo.css?v=20260726-approved-v4" />
<link rel="stylesheet" href="brand-v4.css?v=20260728-1" />
<title>Smart Choice — симулятор выручки</title>
<script type="module" src="simulator.js?v=5c07c4191e35"></script>
</head>
<body>
<a class="sim-skip-link" href="#simulator-main">К расчёту</a>

<header class="sim-header">
<a class="sim-brand" href="../index.html" aria-label="Roby's Coffee House — главная">ROBY'S</a>
<a class="sim-brand" href="../index.html" aria-label="Roby's Coffee House — главная">
<span class="brand-copy"><strong>ROBY'S</strong><small>COFFEE HOUSE</small></span>
</a>
<div class="sim-header-copy">
<strong>Owner planning tool</strong>
<span>Не клиентский экран и не автоматическая стратегия</span>
Expand Down
Loading