Skip to content

build(deps): upgrade ranui to 0.5.2 to stop the language menu flash - #294

Merged
chaxus merged 3 commits into
mainfrom
chore/ranui-0.5.2
Oct 24, 2026
Merged

chaxus merged 3 commits into
mainfrom
chore/ranui-0.5.2

Conversation

@chaxus

@chaxus chaxus commented Oct 24, 2026

Copy link
Copy Markdown
Member

Summary

Upgrades ranui and ranuts to 0.5.2 and ranview to 0.2.2. This fixes the language menu flash: before <r-popover> is defined, its seven language links were laid out in flow and stretched the header from 38 px to about 300 px.

  • The fix lives in ranui (fix(ranui): keep hidden light-DOM content off the page before definition chaxus/ran#444, released as 0.5.2). ranui.css now hides light-DOM content until the element is defined, using :not(:defined) rules for r-popover's r-content, r-select options, r-tabs, r-modal, r-reasoning, r-route, r-markdown, r-math, r-mermaid and r-scratch.
    • This site vendors that sheet as public/ran-tokens.css and links it in <head> on every page, so the upgrade alone fixes the menu. No site CSS is added.
    • The menu markup is unchanged. Adding hidden to <r-content> would only help if the sheet failed to load, which doesn't happen here.
  • dompurify override → 3.4.17. ranui 0.5.2 depends on 3.4.17, and the workspace override was forcing 3.4.16, which has a critical and a high advisory. The app itself never loads ranui's DOMPurify-using chunks (markdown, mermaid, math), so this is dependency hygiene, not a behavior change.
  • minimumReleaseAgeExclude now pins @alixex/ranview@0.2.2. A --frozen-lockfile install passes against the final policy.
  • public/ran-tokens.css is re-synced exactly as bin/build.sh does; it is byte-identical to header + ranui/dist/ranui.css. The IIFE bundles didn't change.

Commits

  1. build(deps): versions, lockfile, workspace policy, synced token sheet
  2. test(e2e): lang-menu-before-upgrade.spec.ts
  3. docs(deps): exploration record and CHANGELOG.

Tests and reverse validation

lang-menu-before-upgrade.spec.ts covers /, /zh-CN/, /help and /history. It blocks /ranui-iife/*.iife.js and /assets/*.js so r-popover is never defined, then asserts the list has no height and the menu stays under 48 px. With public/ran-tokens.css swapped back to the 0.5.1 copy, all four cases fail, with the menu at 245–266 px.

Run locally:

  • lint:ts and format:check: passed.
  • Unit suite: 6805 tests passed.
  • E2E, 59 tests passed: startup payload, portal layer, dictation, main site, history, smoke, sidebar layout, sources/artifacts, embed regression, landing prefetch.
  • The new spec: 4 passed.

The full suites and the Pages/Docker configs are left to CI. An independent subagent review found no blocking issues, and its minor notes are addressed.

🤖 Generated with Claude Code

chaxus and others added 3 commits October 24, 2026 20:22
ranui 0.5.2 (chaxus/ran#444) ships :not(:defined) rules in ranui.css that keep
light-DOM content such as r-popover's r-content off the page until the element
is defined. public/ran-tokens.css is that sheet, re-synced the way bin/build.sh
does, so the language menu no longer spills its seven links before the deferred
popover bundle runs. The release-age exclusion follows ranview to 0.2.2, and
the dompurify override moves to 3.4.17, the version ranui 0.5.2 depends on (the
pin forced 3.4.16, which has a critical and a high advisory).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying document with  Cloudflare Pages  Cloudflare Pages

Latest commit: 840a6bc
Status: ✅  Deploy successful!
Preview URL: https://e1f9c4ae.document-7hm.pages.dev
Branch Preview URL: https://chore-ranui-0-5-2.document-7hm.pages.dev

View logs

@chaxus
chaxus merged commit 75c2cd9 into main Oct 24, 2026
19 checks passed
@chaxus
chaxus deleted the chore/ranui-0.5.2 branch October 24, 2026 13:55
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