Registry Mirror
Skip to content

Conversation

@StiensWout

Copy link
Copy Markdown
Contributor

Automatic thread titles could cut a Devanagari (and other Indic) conjunct such as क्ष in half, so the title ended on a dangling virama like क्.... Truncation now moves the cut back to the start of a virama-linked conjunct, never cuts directly before a zero-width joiner, and treats a zero-width non-joiner as an explicit break between consonants, following the Unicode Indic_Conjunct_Break rules.

Reproduction on main

Commit 8fc71a2eec (main). The title ends in क्..., splitting क्ष in the middle. Expected: The title ends before क्ष because the whole conjunct does not fit.

  1. Open a new thread with Replay (dev).
  2. Send Please review the changes we made in the module क्षमा before publishing the release notes as the first message.
  3. Read the automatic thread title.

The cause is at packages/shared/src/String.ts:41. Ran pnpm scenarios:prove scripts/scenarios/thread-title-keeps-devanagari-conjunct.e2e.ts --target web with the repro scenario added: it failed in 2 of 2 runs on a clean boat.dev VM, with expected "Please review the changes we made in the module क्..." to be "Please review the changes we made in the module..." in the output.

Evidence

Environment: The web app in Chromium on Linux x64, a fresh checkout on a boat.dev VM reset before each run.

Proven: the repro fails at the test commit 4427f7cb35 and passes on the head bbf64e5a62, both on main c5651d74d6.

Before After
Commit 4427f7cb35 bbf64e5a62
Result ASSERTION_FAILED: expected "Please review the changes we made in the module क्..." to be "Please review the changes we made in the module..." passed
first message title Before: first message title Before: first message title (changed region)
The title ends in क्..., splitting क्ष in the middle.
After: first message title After: first message title (changed region)
The title ends before क्ष because the whole conjunct does not fit.
failure Before: failure
Recording Before: recording After: recording

Tests

  • 4427f7cb35 adds the failing test, alone, before the fix.
  • pnpm exec vp run check:changed c5651d74d6d200a7e51341c707fae5adcd058bd4 passed on head.

Not in this change

  • Emoji: a ZWJ at the cutoff that is followed by a non-pictograph now stays with the character before it (UAX feat: Tidy up git integration #29 GB9), so that character is dropped with the ZWJ instead of being kept on its own.
  • CONJUNCT_LINKER and CONJUNCT_CONSONANT list only the Devanagari, Bengali, Gujarati, Oriya, Telugu and Malayalam ranges from Indic_Conjunct_Break, not the full Unicode property data.

Who did the work

  • Repro written by GPT 6.2 Sol, in Codex
  • Written by Claude Opus 5.5, in Claude Code
  • Reviewed by Claude Opus 5.5, in Claude Code, and by GPT 6.2 Sol, in Codex
  • Reproduction, checks and proof run by a program on base and head, not by an agent

Made in T3 Code by GPT 6.2 Sol and Claude Opus 5.5

StiensWout and others added 5 commits December 2, 2026 23:44
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>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Dec 2, 2026
@macroscopeapp

macroscopeapp Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 945f9f2

Macroscope's review found this PR approvable — The shared truncation helper now avoids splitting Indic conjuncts and refines joiner handling. The effects are limited to shortened text, with no change to default length, permissions or operational behavior.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Truncation now adjusts cutoffs to avoid splitting linked Indic consonant clusters and updates emoji-ZWJ cutoff handling. Unit tests cover Devanagari and Bengali conjuncts. An end-to-end test checks a thread title containing a Devanagari conjunct.

Changes: Indic conjunct-aware truncation

Layer / File(s) Summary
Indic conjunct truncation behavior
packages/shared/src/String.ts, packages/shared/src/String.test.ts, scripts/scenarios/thread-title-keeps-devanagari-conjunct.e2e.ts
The truncation logic adds Indic character classes and adjusts cutoffs for linked consonant clusters and emoji-ZWJ sequences. Unit tests cover Devanagari and Bengali conjuncts, including joiner and non-joiner cases. The end-to-end test checks a thread title containing a Devanagari conjunct.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix

Possibly related PRs

  • pingdotgg/t3code#27841: Both changes adjust the cut boundary in the shared truncate function, including for combined text.

Suggested reviewers: saphid

Merge Risk: Minimal · up to 945f9

This change keeps Indic conjuncts whole when thread titles are truncated. No concrete defect was found, and the limited script coverage is a documented, non-blocking limitation.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(shared): truncated titles keep Indic conjuncts whole" states the main change: truncation of automatic thread titles no longer splits Indic conjuncts. The changeset adds conjunct-aware t…
Description check Passed The description follows the template. It gives the problem (a title ending in a dangling virama, such as क्...), and it explains the change (virama-linked conjunct boundaries, ZWJ handling, ZWNJ as …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(shared): truncated titles keep Indic conjuncts whole" states the main change: truncation of automatic thread titles no longer splits Indic conjuncts. The changeset adds conjunct-aware truncation in packages/shared/src/String.ts, tests in String.test.ts, and an e2e scenario for the Devanagari conjunct, all matching the title. It is a conventional commit title in plain language.

Full details: Description check

Explanation

The description follows the template. It gives the problem (a title ending in a dangling virama, such as क्...), and it explains the change (virama-linked conjunct boundaries, ZWJ handling, ZWNJ as a break). It includes a reproduction on main with the commit references, a scope note linking the reproduction, and a verification section with before/after evidence, screenshots, recordings, and test results. It also lists items outside the change and records the models that did the work. The Scope section does not link a GitHub issue that shows the bug. It cites a reproduction instead, and it does not explain why an issue is unnecessary. That gap is minor, so the description is mostly complete.

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 bbf64e5 and 945f9f2.

Files selected for processing: 2

  • packages/shared/src/String.test.ts
  • packages/shared/src/String.ts

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

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Dec 3, 2026
@macroscopeapp
macroscopeapp Bot dismissed their stale review December 3, 2026 00:31

Dismissing prior approval to re-evaluate 945f9f2

@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

On each fresh app database, seed a demo project, open the new-thread composer, select Replay (dev) → Showcase, send “Please review the changes we made in the module क्षमा before publishing the release notes”, and capture the automatic heading during the first turn.

Environment: real web app, headless Chromium 156, Linux, 1280×800, light theme, Noto Sans Devanagari loaded on both sides.

Scenario: Automatic title keeps the Indic conjunct whole

Proven: the scenario fails on base 7f08ea65b3 and passes on head 945f9f20cf.

Base 7f08ea65b3 Head 945f9f20cf
Result ❌ failed
ASSERTION_FAILED: expect.toHaveText failed
locator: getByRole("heading", name: /^Please review the changes we made in the module/)
expected: text "Please review the changes we made in the module..."
observed: text "Please review the changes we made in the module क्..." (match count 1)
✅ passed
automatic indic title Base 7f08ea65b3: automatic indic title Head 945f9f20cf: automatic indic title
failure Base 7f08ea65b3: failure

Before recording · After recording

Scenario driver

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Dec 3, 2026
@juliusmarminge
juliusmarminge merged commit e82da03 into pingdotgg:main Dec 3, 2026
43 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Dec 3, 2026
@StiensWout
StiensWout deleted the wf/find-3f11992f431950b8210ecba9 branch December 3, 2026 07:32
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.

2 participants