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

Showing 6 changed files with 28 additions and 1 deletion (loading 3).

x
0 of 6 viewed, 6 left
23 additions and 0 deletionsapps/server/src/orchestration-v2/ProjectCommands.test.tsModified
View file
@@ -1,5 +1,6 @@
import { assert, describe, it } from "@effect/vitest";
import { CommandId, EventId, ProjectId, type ProjectScript } from "@t3tools/contracts";
+import { projectMonogram } from "@t3tools/shared/projectMonogram";
import * as DateTime from "effect/DateTime";
import * as Result from "effect/Result";
​
@@ -60,6 +61,28 @@
};
​
describe("planProjectCommand", () => {
+ it("saves the prefilled Tai Tham monogram but rejects a third grapheme", () => {
+ const title = "\u1A20\u1A60\u1A20 Alpha";
+ const prefilled = projectMonogram(title).normalize("NFKC").trim().toUpperCase();
+ const save = (text: string) =>
+ plan(
+ {
+ type: "project.meta.update",
+ commandId: CommandId.make("cmd-save-monogram"),
+ projectId,
+ projectIcon: { kind: "monogram", text, color: "blue" },
+ },
+ { project: row({ title }) },
+ );
+​
+ assert.deepEqual(payloadOf(save(prefilled)).projectIcon, {
+ kind: "monogram",
+ text: "\u1A20\u1A60\u1A20A",
+ color: "blue",
+ });