Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(shared): keep Tai Tham stacked conjuncts intact in automatic project monograms #48222

Opensaphid(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/48222/headopened View on GitHub

Problem

An automatic project monogram can drop the consonant after a Tai Tham sakot, so the icon shows a dangling mark instead of the full stacked initial.

Deterministic repro on origin/main (7b7ca65f9a02b63df912168cea04c5a5f4d055c1): Create or rename a project with no favicon or icon override to ᨠ᩠ᨠ Alpha ("\u1A20\u1A60\u1A20 Alpha"), then open one of its threads. The web sidebar row passes the project name through ProjectFavicon → deriveProjectIdentity → projectMonogram and renders the result directly as SVG text; mobile passes the same result to the favicon fallback's one-line text. To reproduce at the source, run vp test run packages/shared/src/projectMonogram.test.ts -t 'Tai Tham' with the regression test applied and the implementation still on base.

  • Observed: "\u1A20\u1A60A" (ᨠ᩠A).
  • Expected: "\u1A20\u1A60\u1A20A" (ᨠ᩠ᨠA).

Change

Keep sakot-linked Tai Tham consonants together in the shared generator, including the normalized tone-mark-plus-ZWJ fixture. The web picker and server save command use the same Tai Tham-aware count without raising the two-grapheme limit, so the generated text can also be saved on Node 22.16.0; web, desktop, and mobile already consume the shared generator for automatic icons.

Scope

Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.

Verification

  • On base, the shared regression and real web sidebar SVG assertion both received ᨠ᩠A instead of ᨠ᩠ᨠA. On patched source, all 21 focused tests and the same isolated web scenario passed.
  • On Node 22.16.0, base rejected the intact prefill at project.meta.update. Patched source accepted and preserved it, and still rejected a third grapheme.
  • vp run check:changed exited 0: 23 affected tests passed, plus format, lint, knip, GraphQL, typecheck, and the React Compiler check.
  • Before/after transcript, reproducible scenario, and sidebar PNG crops (PNG crops are base64-encoded in the gist).
  • Not shown: Native one-line fitting, the Electron shell, or an end-to-end picker click on a Node 22 server; the picker validator and actual Node 22 save command were checked separately.

Authored by GPT-6.2 Sol (Codex); reviewed by Gemini 4 Neon (Antigravity).

Not shown

  • apps/web/src/components/ProjectMonogram.tsx:41 still uses raw Intl.Segmenter for the 1-vs-2-glyph SVG textLength check, so a lone Tai Tham stacked cluster on a pre-ICU-76 browser renders with textLength=12 instead of 6 (modern Chromium/Electron ICU 76+ already counts it as 1 grapheme).
    1. tanstack-source added labelsbug

    2. Approvability

      Verdict: Needs Human Approval

      Macroscope's review found this PR requires human approval — Tai Tham stacked initials remain intact in automatic project icons, with matching web and server validation. Human confirmation is required for the resulting change to default-generated project icons.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. Explain Change →

      No actionable comments were generated in the recent review.

      Walkthrough

      Project monogram extraction now recognizes Tai Tham consonant stacks. Web and server validation use a shared grapheme-count helper to apply the existing two-grapheme limit to monograms.

      Changes: Tai Tham monogram handling

      Layer / File(s)Summary
      Tai Tham recognition and counting
      packages/shared/src/projectMonogram.ts, packages/shared/src/projectMonogram.test.ts
      Monogram extraction recognizes Tai Tham stacks. The shared count helper adjusts grapheme counts for these stacks. Tests cover stacked initials, tone marks, and joiners.
      Web monogram validation
      apps/web/src/projectIconOptions.ts, apps/web/src/projectIconOptions.test.ts
      Web validation uses the shared count helper. Tests cover valid and invalid Tai Tham inputs.
      Server command validation
      apps/server/src/orchestration-v2/ProjectCommands.ts, apps/server/src/orchestration-v2/ProjectCommands.test.ts
      Server validation uses the shared count helper. A test checks the saved prefilled monogram and rejects an appended third grapheme.

      Estimated code review effort: 3 (Moderate) | ~20 minutes

      Change: Bug fix

      Merge Risk: Minimal · up to 91d76

      Automatic project monograms now keep the consonant after a Tai Tham sakot, and the same count is used when saving. No merge-blocking risk was identified. On older browsers a lone stacked cluster may be sized slightly wide in the SVG.

      Pre-merge checks: Passed 4

      Check nameStatusExplanation
      Title checkPassedThe title names the main change: keeping Tai Tham stacked conjuncts intact in automatic project monograms. The raw summary and objectives confirm that the change adds Tai Tham stack handling to the sh…
      Description checkPassedThe description follows the template's sections: Problem, Change, Scope, and Verification. The Problem section gives a reproduction with expected and observed output. The Change section explains the s…
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Full details: Title check

      Explanation

      The title names the main change: keeping Tai Tham stacked conjuncts intact in automatic project monograms. The raw summary and objectives confirm that the change adds Tai Tham stack handling to the shared monogram generator and the shared grapheme count. The title uses a conventional commit prefix and stays within one sentence, though at 82 characters it is somewhat long.

      Full details: Description check

      Explanation

      The description follows the template's sections: Problem, Change, Scope, and Verification. The Problem section gives a reproduction with expected and observed output. The Change section explains the shared generator fix and the Node 22.16.0 save path. The Scope section states that the change is a small bug fix and that no issue is needed. The Verification section lists focused tests, a repo check run, and a linked before/after transcript. It also names unshown checks and a known remaining gap at ProjectMonogram.tsx:41. The template asks for a conventional commit title, and the title satisfies that. The description states it was authored by an agent and names the model and harness, which the template asks for. The description also has a few minor gaps: the Scope section does not link an issue, and the Change section does not explain why the server and picker count changes are required for the same fix beyond a brief note. These gaps are minor.

      Finishing Touches

      Generate unit tests (beta)

      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
      Recent review info

      Run configuration

      Commits

      Reviewing files that changed from the base of the PR and between 7eba80e43120c8533738e7b5149f5b08b7ab0b14 and 91d76512ca799b786c80194c0b649d6d1ce8ad6f.

      Files selected for processing: 6

      • apps/server/src/orchestration-v2/ProjectCommands.test.ts
      • apps/server/src/orchestration-v2/ProjectCommands.ts
      • apps/web/src/projectIconOptions.test.ts
      • apps/web/src/projectIconOptions.ts
      • packages/shared/src/projectMonogram.test.ts
      • packages/shared/src/projectMonogram.ts

      Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

Sign in to join this conversation.