Skip to content

fix(shared): keep Javanese stacked initials intact in project monograms - #47584

Merged
juliusmarminge merged 3 commits into
pingdotgg:mainfrom
saphid:hunter/c-ed9ab79c89
Dec 2, 2026
Merged

juliusmarminge merged 3 commits into
pingdotgg:mainfrom
saphid:hunter/c-ed9ab79c89

Conversation

@saphid

@saphid saphid commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Problem

Automatic project monograms drop the subjoined consonant from a leading Javanese stack, leaving a visible pangkon before the next initial.

Deterministic repro on origin/main (ca36afaeb1d1045806910c549291b2e51b24cc88): Seed an isolated local project named ꦏ꧀ꦱ Alpha with no favicon or icon override. Open /settings/projects and inspect [data-slot="project-monogram"] text in that project's row. The row calls ProjectFavicon, whose automatic fallback sends deriveProjectIdentity(projectName).monogram to ProjectMonogram as the SVG text.

Run from the repository root:

node --input-type=module -e 'import {projectMonogram as p} from "./packages/shared/src/projectMonogram.ts"; const s="ꦏ꧀ꦱ Alpha"; console.log(p(s), [...new Intl.Segmenter().segment(s)][0].segment+"A")'

Observed: ꦏ꧀A. Expected: ꦏ꧀ꦱA.

Change

Extend the existing stacked-conjunct matcher to recognize a Javanese pangkon followed by a consonant in U+A989–U+A98B or U+A98F–U+A9B2, excluding independent vowels. The shared fix applies to web and Electron project icons and mobile's automatic and colored fallback monograms.

Scope

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

Verification

  • The focused unit test failed on the pinned base with expected 'ꦏ꧀A' to be 'ꦏ꧀ꦱA' and passed on the patch, including the lone-stack and terminal-pangkon cases.
  • Review regression: ꦏ꧀ꦄ Alpha returned ꦏ꧀ꦄA with the original draft range; the narrowed matcher returns ꦏ꧀A. The targeted file passed all 11 tests. In Node, all 47 followers in the old range now agree with ICU segmentation for the same fixture.
  • The isolated web scenario reproduced ꦏ꧀A in the Projects row on base and asserted ꦏ꧀ꦱA on the initial patch. vp run scenarios:prove exited 0; the amended patch retained that output in the unit test and Node.
  • vp run check:changed exited 0 on the amended patch: format, lint, knip, typecheck, and 13 tests across two affected files.
  • Runtime transcript, web result, and before/after screenshots. Download the raw web-screenshots.html to view both cropped captures.
  • Not shown: Browser rendering of the independent-vowel edge case, Electron and native mobile rendering, remote or tunneled sessions, and manually overridden icons.

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

@github-actions github-actions Bot added the vouch:trusted Author is trusted by repo permissions or the VOUCHED list. label Dec 2, 2026
@macroscopeapp

macroscopeapp Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at a660ae2

Macroscope's review found this PR approvable — Preserves Javanese stacked initials in project monograms on web and mobile. The change is confined to generated display text, without changing stored project data or product defaults.

Notes:

  • All code in this push has already been reviewed. Approvability was decided on eligibility alone.

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

@github-actions github-actions Bot added the size:XS 0-9 changed lines (additions + deletions). label Dec 2, 2026
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The monogram pattern now recognizes a Javanese consonant stack. The conjunct test adds expected monograms for that sequence with and without following text.

Changes: Monogram clustering

Layer / File(s) Summary
Script-specific monogram clustering
packages/shared/src/projectMonogram.ts, packages/shared/src/projectMonogram.test.ts
STACKED_CONJUNCT adds matching for a Javanese consonant stack. The test checks the resulting monogram with " Alpha" and when the sequence stands alone.

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

Change: Bug fix

Suggested reviewers: iamshadmantaqi

Merge Risk: Minimal · up to a660a

This change keeps Javanese stacked initials intact in automatic project monograms. The change is small and tested, and no merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: Javanese stacked initials are kept intact in project monograms. It follows the conventional commit format and matches the raw summary (STACKED_CONJUNCT extended to Jav…
Description check Passed The description covers the required sections. Problem gives the bug, reproduction steps, and expected and observed output. Change explains the matcher extension and the platforms it affects. Scope sta…
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 names the main change: Javanese stacked initials are kept intact in project monograms. It follows the conventional commit format and matches the raw summary (STACKED_CONJUNCT extended to Javanese stacks) and the test addition. Its scope (shared package) matches the changed files.

Full details: Description check

Explanation

The description covers the required sections. Problem gives the bug, reproduction steps, and expected and observed output. Change explains the matcher extension and the platforms it affects. Scope states why no issue is linked and that the change is a small obvious-bug fix. Verification lists focused tests, the scenario run, and the check run with results, and it names what was not checked. The template's optional model/harness line is present. 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 d1e2dab and a660ae2.

Files selected for processing: 2

  • 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; 4 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Dec 2, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Seed a fresh project named ꦏ꧀ꦱ Alpha with no favicon or custom icon, open Settings → Projects, and select it. Compare its automatic SVG monogram. Web browser, 1280×800, light theme, fresh database on each commit. Temporary folder paths are hidden in captures; monogram content is untouched. The browser lacks a Javanese font, so glyphs render as boxes.

Scenario: Project monogram keeps the Javanese pangkon stack

Proven: the scenario fails on base 9e0de5137b and passes on head a660ae2ed2.

Base 9e0de5137b Head a660ae2ed2
Result ❌ failed
ASSERTION_FAILED: expect.toHaveText failed
locator: locator("[role="region"][aria-label="Settings content"] [data-slot="project-monogram"] text").first()
expected: text "ꦏ꧀ꦱA"
observed: text "ꦏ꧀A" (match count 1)
✅ passed
javanese project monogram Base 9e0de5137b: javanese project monogram Head a660ae2ed2: javanese project monogram
failure Base 9e0de5137b: failure

Scenario source

Not shown:

  • Javanese font shaping could not be judged because the browser has no Javanese font; the real rendered SVG text and missing/preserved consonant were verified.

@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 2, 2026
@juliusmarminge
juliusmarminge merged commit a52a0f7 into pingdotgg:main Dec 2, 2026
6 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants