Skip to content

STS-2.6.4: fix stale page title (#14), logoSize setting (#23), adaptive footer logo (#24) - #35

Open
gi-os wants to merge 1 commit into
mainfrom
claude/fix-title-logo-fable5
Open

STS-2.6.4: fix stale page title (#14), logoSize setting (#23), adaptive footer logo (#24)#35
gi-os wants to merge 1 commit into
mainfrom
claude/fix-title-logo-fable5

Conversation

@gi-os

@gi-os gi-os commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Fixes #14, closes #23, closes #24.

#14 — Title switches to "B2B Storefront"

Root cause: the root layout's generateMetadata() reads CompanyName.txt from the filesystem, but pages were statically prerendered at build time — so the <title> was baked with whatever DATABASE contained when the shop was built (old builds: the B2B Storefront fallback). On every client-side navigation Next.js resets document.title to that stale baked value, then each page's useEffect corrects it after fetch — hence the "switches sometimes". Pages that never set document.title (cart, checkout, order-success, secret) kept the stale title permanently.

Fix:

  • export const dynamic = 'force-dynamic' in app/layout.tsx → metadata is computed per request from the current DATABASE (verified: editing CompanyName.txt changes the served <title> immediately, no rebuild)
  • Fallback is now Shuttle everywhere (never B2B Storefront)
  • document.title now also set on cart / checkout / order-success / secret

#23 — Logo size setting

New optional key in DATABASE/Design/Details/Style.txt:

logoSize: 1

Multiplier (e.g. 1.5 = 50% bigger), clamped to 0.25–4, defaults to 1 when absent. Applies to the header logo (mobile 2rem and desktop 2.5rem base) and the home page hero logo (4.5rem base). Added to both the live DATABASE and DATABASE template.

#24 — Footer LR Paris logo adapts to background

The footer previously always applied brightness(0) invert(1) (white logo) — invisible on light primary colors. Now a luminance check (BT.601, threshold 0.6) on the footer background picks black (brightness(0)) on light backgrounds, white on dark. background: transparent enforced — no white box. Footer text color adapts the same way so it stays legible on light footers.

Verification

  • npm run build passes (all routes now dynamic)
  • Runtime: title follows CompanyName.txt edits per request; /api/design returns style.logoSize
  • Version bumped to STS-2.6.4 (lib/version.ts + history entry; package.json re-synced from 2.0.5)

🤖 Generated with Claude (Fable 5 test drive)

…ve footer logo (#24)

- #14: force-dynamic root layout so metadata reads current DATABASE per
  request instead of build-time snapshot (stale 'B2B Storefront' titles);
  'Shuttle' fallback everywhere; document.title now also set on cart,
  checkout, order-success and secret pages
- #23: new logoSize key in Design/Details/Style.txt (multiplier, default 1,
  clamped 0.25-4) applied to header logo (mobile + desktop) and home hero logo
- #24: footer LR Paris logo renders black on light footer backgrounds and
  white on dark ones (luminance check on primary color), transparent
  background enforced; footer text color adapts too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant