Skip to content

fix(id/web): presenter width parity for the 2372 reachable code points (#2962) - #4491

Merged
dezren39 merged 1 commit into
mainfrom
queue/5514-2962-width-parity
Nov 2, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/5514-2962-width-parity

Conversation

@dezren39

@dezren39 dezren39 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Fixes #2962 (fix task 5514; triage task 4251).

Syncs the WIDE_RANGES table in pkgs/id/web/src/world-surface.ts with Rust unicode-width 0.2.2 for the three reachable singleton classes:

  • rust=2 / ts=1 — 2,295 points now measure 2 (trigrams U+2630..U+2637, Khmer U+17A4, Yi U+A000..U+A4C6, Tangut/Kana-ext additions, new emoji points, …)
  • rust=1 / ts=2 — 76 points now measure 1: CJK radicals carved out of the broad 0x2E80..0x303E / 0x3040..0x33FF wide ranges (e.g. U+2E9A, U+2EF4..U+2EFF) plus tail carve-outs in the Hangul-jamo and halfwidth ranges, expressed as split ranges so the table stays the single source of truth
  • rust=1 / ts=0 — U+2D7F now measures 1 (explicit case in codePointWidth: it is Mn/Grapheme_Extend but width 1 in unicode-width 0.2.2)

Verification — exhaustive differential re-run (Rust probe pinned to unicode-width =0.2.2, scan.tsv over U+0020..U+2FFFF; Bun graphemeWidth from the patched file), alone and +U+FE0E:

  • Before: 2,372 reachable mismatches (2295 + 76 + 1)
  • After: 0 reachable mismatches in both scans; residual is exactly the 156 unreachable-alone points (rust=0 at ts=1: 143, rust=0 at ts=2: 12, U+17D8 at rust=3), which the presenter can never admit as cells — unchanged by design

Tests: new regression test in world-surface.test.ts covers representatives of each class through renderWorldSurface; vitest run src/world-surface.test.ts 12/12 pass on the laptop. Note: tsc --noEmit shows one pre-existing error in src/image-upload.test.ts:429 (untouched by this PR, present in the worktree install).

Scope stays exactly as triaged: cluster/FE0F behaviour is #3265's, the rust=0/rust=3 classes are documented no-ops.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

#2962)

Sync WIDE_RANGES in world-surface.ts with unicode-width 0.2.2 for the three reachable singleton classes found by the exhaustive differential (task 4251): rust=2/ts=1 points (2295, e.g. trigrams U+2630..U+2637, Khmer U+17A4, Yi U+A000..U+A4C6) now measure 2; rust=1/ts=2 points (76 CJK radicals inside the broad 0x2E80..0x303E / 0x3040..0x33FF ranges and tail carve-outs) now measure 1 via split ranges; U+2D7F measures 1 despite being Mn/Grapheme_Extend. Verified by re-running the exhaustive differential over U+0020..U+2FFFF (alone and +U+FE0E): reachable mismatches are now zero; the residual is exactly the 156 unreachable-alone points (rust=0: 143 at ts=1 and 12 at ts=2, plus U+17D8 at rust=3). New regression test covers representatives of each class; world-surface suite 12/12.
@dezren39
dezren39 requested a review from a team as a code owner November 2, 2026 17:34
@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 33 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0e261a76-a8d8-453c-89ef-e0af6daae534
Commits

Reviewing files that changed from the base of the PR and between 748d2e5 and acad12b.

Files selected for processing: 2
  • pkgs/id/web/src/world-surface.test.ts
  • pkgs/id/web/src/world-surface.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T17:36:24.548156Z acad12b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit c9f0309 into main Nov 2, 2026
2 checks passed
@dezren39
dezren39 deleted the queue/5514-2962-width-parity branch November 2, 2026 18: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

1 participant