GeezerVison is showing github.com — fix(web): match world surface presenter validation with rust wire rules by dezren39 · Pull Request #7120 · developing-today/code
Conversation
dezren39
commented
Nov 8, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Opened by the branch-disposition execution (2026-11-07) from branch fixup/759-world-width.
Branch origin: queue branch for issue #759.
This branch was laptop-local work (or a stranded remote branch) with real changes ahead of main and no PR. Per Drew's 2026-11-07 branch-disposition ruling, ahead branches with real changes get a PR; this PR surfaces the work for triage instead of leaving it stranded on a branch.
Triage owner: batch issue in developing-today/code, "Unowned PR batch from branch disposition (2026-11-07)". Outcome per batch triage: close with reason, or route to impl/finish/merge as a follow-on fix task.
Evidence: branch-ahead review ~/workspace/scratch/branch-ahead-review-2026-11-07.md; execution log ~/workspace/scratch/branch-disposition-2026-11-07.md.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The world-screen presenter previously failed to enforce rules identical
to the Rust backend validator, specifically missing grapheme limits, width
constraints, and bounds for wide/narrow glyphs. This mismatch created
a safety hazard and rendering glitches on invalid input data.
This introduces matching validations:
- Continution cells must have an empty symbol
- Cells must be exactly one grapheme
- The grapheme's width (measured using regex for East Asian Wide/Fullwidth matching and `Intl.Segmenter` for graphemes) must match the column span
Fixes #724
Co-authored-by: dezren39 <[email protected]>
The world-screen presenter previously failed to enforce rules identical
to the Rust backend validator, specifically missing grapheme limits, width
constraints, and bounds for wide/narrow glyphs. This mismatch created
a safety hazard and rendering glitches on invalid input data.
This introduces matching validations:
- Continution cells must have an empty symbol
- Cells must be exactly one grapheme
- The grapheme's width (measured using regex for East Asian Wide/Fullwidth matching and `Intl.Segmenter` for graphemes) must match the column span
Also includes fixes for Nix Flake checks (updated outputHashes) and cargo fmt checks.
Fixes #724
Co-authored-by: dezren39 <[email protected]>
…senter
Fix-up for #761 on top of Jules' #724 fix: the BMP-only isEastAsianWide
regex measured 😀 (U+1F600), 𠮷 (U+20BB7, CJK Ext. B), 👨👩👧 (ZWJ sequence)
and ⚠️ (U+26A0+FE0F) as width 1, while Rust unicode-width 0.2 measures
all four as 2 — valid surfaces were rejected and invalid 1-column
emoji cells were accepted.
Replace the regex with graphemeWidth(): a wide-range table including
the astral emoji/CJK planes, ZWJ sequences containing a wide code
point measuring 2 in total, and U+FE0F forcing emoji presentation
width 2; combining marks / variation selectors measure 0.
New test pins all four #761 glyphs at columns 2 (accepted, with
continuation) and columns 1 (refused). Local: world-surface vitest
5/5 PASS, tsc --noEmit clean; ablation exact (original world-surface.ts
-> only the new test fails).
Fixes #761
Codex Review Summary: ❌ Failed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
❌ Failed 2026-11-09T03:43:46.237953Z We couldn’t complete this review. Comment @codex review to try again. |
0ea7e0a |
New commits |
ℹ️ 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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 8, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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 34 seconds.
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:
4d226cde-7dd8-424f-805c-ce4ba4f1e527
Commits
-
Reviewing files that changed from the base of the PR and between 3ea2a10 and 0ea7e0a.
Files selected for processing: 5
-
pkgs/id/default.nix
pkgs/id/flake.nix
pkgs/id/src/store_traits.rs
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
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d7464462e5
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
return codePoints.some((codePoint) => isWideCodePoint(codePoint)) ? 2 : 1;
|
|
|
}
|
|
|
if (codePoints.includes(0xfe0f)) return 2;
|
|
|
return characters.reduce((total, character, i) => total + codePointWidth(character, codePoints[i]), 0);
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Measure complete grapheme sequences instead of summing code points
For valid two-column graphemes such as 👍🏽 or decomposed Hangul 각, summing code-point widths returns 4 instead of the Rust validator's width of 2. Consequently, the new width check rejects an otherwise valid server-produced surface, and the view handler in world.ts falls back to displaying the serialized screen payload instead of the grid. Use sequence-aware width rules compatible with unicode-width and add regression tests for emoji modifiers and decomposed Hangul.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disposition (task 14055, lane code-e): the finding was real against this branch. It is already fixed on main by the #1581/#4491 line of work — main's codePointWidth measures U+1160-U+11FF at 0 and graphemeWidth measures emoji-modifier sequences as 2 as a whole, with regression tests for both 👍🏽 and decomposed Hangul on main. This PR is therefore closed as superseded by main; full salvage diff is in the PR note (comment 6731732918).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
🤖 Agent note · parked — task 14055, lane code-p (direct): PR #7120 disposition verified but not mergeable as-is: nix flake check FAIL (branch regresses pkgs/id p2panda-core outputHash vs main), and cherry-picking its web world-surface validation onto current main conflicts with the landed #4491 parity work in world-surface.ts/.test.ts (salvage attempt in laptop worktree ~/git/fleet/14055, aborted cleanly). Parked: resume as a direct port session; full note text owed via outbox OB-2026-11-09-T14055 if this short note is the only one present.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…finding); drop nix hash + fmt riders
Emoji modifiers (U+1F3FB-U+1F3FF) and Hangul Jamo medial vowels/finals (U+1160-U+11FF) are zero-width in unicode-width 0.2: modified emoji and decomposed Hangul syllables now measure 2 in total instead of 4, matching the Rust validator. Regression cases added to the wide-glyph test. Also reverts the branch's unrelated p2panda outputHash changes (4 sites) and store_traits formatting to main's versions: the hash is a fix-value that must be proven against a failing build on main, and neither rider belongs to this PR's stated fix.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
🤖 Agent note · closing as superseded — salvage diff vs canonical (current main)
- Agent: repo queue worker, lane code-e (repo-worker-code), task 14055 (pr_shepherd, batch Unowned PR batch from branch disposition (2026-11-07) #7297 part 5)
- Salvage protocol (§8): this branch was diffed file-by-file against current
main before closing. Verdict: nothing unique to salvage.
pkgs/id/web/src/world-surface.ts — the PR's presenter width validation exists on main in a strictly stronger, evolved form: codePointWidth/graphemeWidth there already handle Hangul Jamo vowels/finals U+1160–U+11FF at width 0 (id(web): world presenter still mis-measures ⬛/⭕, narrow-base skin tones, composed Hangul jamo and long graphemes — #1431's folded-in classes survived its fix, and the 16-unit symbol cap has no Rust twin #1581), emoji-modifier sequences measuring 2 as a whole including on narrow bases (id(web): world presenter rejects whole screen when a cell has a skin-tone emoji or tag flag — TS grapheme width sums modifiers instead of measuring the cluster #1431, id(web): world presenter still mis-measures ⬛/⭕, narrow-base skin tones, composed Hangul jamo and long graphemes — #1431's folded-in classes survived its fix, and the 16-unit symbol cap has no Rust twin #1581), tag sequences (id(web): world presenter rejects whole screen when a cell has a skin-tone emoji or tag flag — TS grapheme width sums modifiers instead of measuring the cluster #1431), U+FE0E narrowing and U+FE0F base gating (id(web): world presenter widens every U+FE0F cluster to 2 — a letter+VS16 cell (a️) is Rust-valid at columns 1 but renderWorldSurface refuses the whole screen #3265, id(web): world presenter still mis-measures ⬛/⭕, narrow-base skin tones, composed Hangul jamo and long graphemes — #1431's folded-in classes survived its fix, and the 16-unit symbol cap has no Rust twin #1581), and the id(web): world presenter residual width divergences vs unicode-width 0.2.2 — 2529 code points in classes #1581 never scoped (trigrams, CJK radicals, format chars) #2962 parity pass over the 2372 reachable code points (PR fix(id/web): presenter width parity for the 2372 reachable code points (#2962) #4491), plus an ASCII fast path (0cdca0d).
pkgs/id/web/src/world-surface.test.ts — both regression glyphs this PR's review produced are already tested on main: 👍🏽 U+1F44D U+1F3FD (test at line ~201, id(web): world presenter rejects whole screen when a cell has a skin-tone emoji or tag flag — TS grapheme width sums modifiers instead of measuring the cluster #1431) and decomposed Hangul U+1100 U+1161 / U+1100 U+1161 U+11A8 (lines ~243–244).
pkgs/id/default.nix, pkgs/id/flake.nix — the p2panda-core outputHash rider is not on main and is not salvaged: no failing build on main proves the replacement value, and a hash change rides in only with that proof.
pkgs/id/src/store_traits.rs — formatting-only; main's treefmt passes without it.
- Codex finding disposition: the P2 finding on this PR (grapheme sequences measured per code point — 👍🏽 and decomposed Hangul summing to 4) was real against this branch. It is already fixed on
main by the id(web): world presenter still mis-measures ⬛/⭕, narrow-base skin tones, composed Hangul jamo and long graphemes — #1431's folded-in classes survived its fix, and the 16-unit symbol cap has no Rust twin #1581/fix(id/web): presenter width parity for the 2372 reachable code points (#2962) #4491 line of work cited above (same two cases, plus narrow-base modifier sequences this branch never handled). A fix commit for it (0ea7e0a) was pushed to this branch earlier in this shift and passed the web suite (371 tests) before the fresh main comparison showed the stronger implementation had landed; that commit is superseded together with the rest of the branch.
- Checks at close: the PR's own earlier checks were green where they ran (run/treefmt/flake-eval SUCCESS; nix flake check CANCELLED); no hard-stop labels present at any point this shift (re-checked fresh).
Closing PR #7120 as superseded by main. The branch is not deleted by hand (per packet).
agent-note:v1 lane=code-e state=closed-superseded task=14055 pr=7120
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|