Skip to content

fix(www): restore docs sidebar + footer chrome lost in the compiled-shell refactor - #1318

Merged
SisyphusZheng merged 4 commits into
devfrom
fix/1317-restore-docs-sidebar-footer
Sep 5, 2026
Merged

fix(www): restore docs sidebar + footer chrome lost in the compiled-shell refactor#1318
SisyphusZheng merged 4 commits into
devfrom
fix/1317-restore-docs-sidebar-footer

Conversation

@SisyphusZheng

Copy link
Copy Markdown
Member

Fixes #1317

Root cause

7bbef34b (ADR-0143 compiled-shell refactor, Aug 30) deleted the .docs-sidebar styles and the rich four-column footer from open-layout; the follow-up test cleanup codified the stripped chrome instead of restoring it, while entry-render-runtime.ts kept injecting navItems / currentPath / locale / home shell props every render (the "dead navSections generation" noted in #1317).

What this restores

  • Docs sidebar: desktop sticky nav + mobile native-<details> disclosure ([www][P3] Decompose open-layout along UI-shell behavior boundaries #995 idiom), driven by the previously-dead _generated-nav sections — filtered to the active section family, with aria-current="page" marking; home renders none.
  • Footer: four labeled navigation columns (product / resources / company / legal, en/zh localized) + footer-bottom strip; the orphaned @media (max-width:900px){.app-footer{padding:0}} rule is replaced with a real responsive grid collapse.
  • Header nav: localized hrefs + aria-current state.

Coverage hardening (the process gap that let this ship green)

  • site-chrome.spec.ts (new): semantic sidebar/footer assertions — section filtering, active marking, home-no-sidebar, mobile disclosure, four labeled columns, bilingual targets.
  • visual-baselines.spec.ts: dedicated footer/sidebar element snapshots across locale × theme × viewport on home/guide/architecture — the route sweep's fullPage:false never captured the page bottom.
  • accessibility-performance.spec.ts: footer keeps the zero-headings invariant but now also asserts 4 navigation landmarks + structured link targets, so the bare-strip regression cannot pass again.
  • open-layout-navigation.test.ts: pure-function policy tests (URL safety, locale canonicalization, section filtering, footer model).

Verification

  • deno task build (SSG 150 pages + artifact-truth + link check): pass
  • Deno unit tests (site-ui + open-layout-navigation): 20/20
  • Playwright chromium: site-chrome + accessibility 20/20, reactivity/routing/theme/behaviors 36/36, visual baselines 16/16 (all regenerated + new chrome snapshots reproduced locally)
  • Static-output spot check: sidebar hidden on /, aria-current on guide pages, zh footer columns 产品/资源/项目/法律

…hell refactor (#1317)

Root cause: 7bbef34 (ADR-0143 compiled-shell refactor) deleted the
.docs-sidebar styles and the rich four-column footer from open-layout;
the follow-up test cleanup codified the stripped chrome instead of
restoring it, while entry-render-runtime kept injecting navItems /
currentPath / locale / home into the shell props every render.

Restores:
- docs sidebar (desktop sticky nav + mobile native-details disclosure,
  #995 idiom) driven by the previously-dead _generated-nav navSections,
  filtered to the active section family with aria-current page marking
- four labeled footer navigation columns (product/resources/company/
  legal, en/zh) + footer-bottom strip; orphaned `padding: 0` media rule
  replaced with real responsive grid collapse
- header nav links now carry localized hrefs and aria-current state

Coverage hardening (the process gap that let this ship green):
- site-chrome.spec.ts: semantic sidebar/footer assertions (section
  filtering, active marking, home renders no sidebar, mobile
  disclosure, four labeled columns, bilingual targets)
- visual-baselines.spec.ts: dedicated footer/sidebar element snapshots
  (every locale x theme x viewport on home, guide, architecture) —
  the route sweep's fullPage:false never captured the page bottom
- accessibility-performance.spec.ts: footer keeps the zero-headings
  invariant but now also asserts 4 navigation landmarks + structured
  link targets, so the bare-strip regression cannot pass again
- open-layout-navigation.test.ts: pure-function policy tests for URL
  safety, locale canonicalization, section filtering, footer model
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 5, 2026

Copy link
Copy Markdown

Deploying openelement with  Cloudflare Pages  Cloudflare Pages

Latest commit: dcea257
Status: ✅  Deploy successful!
Preview URL: https://08ab53b1.lessjs.pages.dev
Branch Preview URL: https://fix-1317-restore-docs-sideba.lessjs.pages.dev

View logs

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

APIError: Insufficient Balance

opencode session  |  github run

…e null sets (#1318)

Hydration on every non-default-locale page failed with
`[compiled-claim] item attribute drift on "href"`: the claim-time
re-derivation of computed shell chrome (sidebar rows, footer columns)
saw default-value signals while the SSR DOM was rendered from
locale-injected props.

Root cause chain (facade-host):
1. A pending pre-upgrade property write of `locale: null` (no real
   assignment intent) was coerced by applyPendingOwnValues into the
   compiled default ('en') and applied AFTER syncAttributesToSignals —
   clobbering the attribute-promoted 'zh'.
2. Generated field initializers that merely restate the compiled default
   were likewise captured as pending pre-upgrade sets.

Fixes:
- restatesDefault(): generated initializers that restate the compiled
  default (their documented contract, see reconcileOwnProperties) no
  longer enter pendingOwnValues.
- applyPendingOwnValues(): null/undefined pending values carry no
  pre-upgrade intent and are skipped instead of being coerced to the
  default over the promoted attribute value.

Element suite: 254 passed. WWW e2e chromium: 219 passed including
public-routes zh sweep and visual baselines.
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

APIError: Insufficient Balance

opencode session  |  github run

The footer is identical across routes for a given locale/theme/viewport,
so per-route footer snapshots are byte-identical and fail the
exact-duplicate baseline gate (#1230 M15). The footer now owns ONE
baseline per locale x theme x viewport (shot on the home route); the
docs sidebar keeps its per-route baselines because its section filtering
makes each route's chrome distinct. Desktop sidebar baselines were
regenerated under the fixed property-contract behavior (claim now
succeeds and the island actually hydrates, so the committed pixels
reflect the hydrated shell rather than the pre-fix stuck-SSR state).
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

APIError: Insufficient Balance

opencode session  |  github run

Sidebar labels come from the untranslated generated nav, so en and zh
sidebar pixels are identical and the en/zh pairs fail the
exact-duplicate baseline gate. Sidebar baselines are now shot on the en
locale only, keyed by theme x viewport x route (zh sidebar semantics
stay covered by site-chrome.spec.ts).
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

APIError: Insufficient Balance

opencode session  |  github run

@SisyphusZheng
SisyphusZheng merged commit 005a971 into dev Sep 5, 2026
11 checks passed
@SisyphusZheng
SisyphusZheng deleted the fix/1317-restore-docs-sidebar-footer branch September 5, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant