You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(server): workflow run titles no longer end in a broken character - #41924
A workflow can name its run with T3.title(text), and the server stores the title cut at 200 UTF-16 units with title.slice(0, 200) (runTitle in WorkflowStore.ts). When an emoji straddles unit 200, the cut keeps only its first half; SQLite stores the lone surrogate as U+FFFD, so the run's heading on the Workflows page ends in �. The same stored title is shown in the runs list, on mobile and by t3 workflow show.
Change
The cut stops one unit earlier when unit 200 would split a surrogate pair, with the splitsSurrogatePair check the file already uses for the step result and failure detail cuts. The 200 limit is unchanged, and titles that fit or are cut between whole characters are stored as before.
Scope
A small fix of an obvious bug, so it has no issue. It is the same defect as the merged #41723 and #41808, at the run title cut in the same file, which those left alone.
Verification
Unit test.vp test run apps/server/src/workflows/WorkflowStore.test.ts, with one new case: a title of 199 as, U+1F680 and more text must be stored as the 199 as. With WorkflowStore.ts from base b3fff82014: 1 failed | 9 passed (10). On head: 10 passed (10).
Scenario.vp run scenarios:prove scripts/scenarios/workflow-run-title-keeps-whole-characters.e2e.ts --base upstream/main exits 0. The scenario writes a definition whose body calls T3.title with 199 as and 😀, turns Workflows on through server.updateSettings, starts the run with t3 workflow start, opens the run in the web app once its title has committed, and reads the heading's text.
Proven: the scenario fails on base b3fff82014 and passes on head 45c1af14f1.
Base b3fff82014
Head 45c1af14f1
Result
❌ failed ASSERTION_FAILED: expect.toHaveText failed locator: getByRole("heading", name: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") expected: text "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" observed: text "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�" (match count 1)
✅ passed
Captures. The scenario takes one screenshot of the run (run-heading). On base the heading ends in �; on head it ends at the last a. They are not attached here, since the assertion above carries the same text.
Changed-file checks.vp run check:changed upstream/main passed: format, lint, knip (2/2), graphql, typecheck (3 packages) and tests (2 files, 12 passed).
Not checked: the mobile client and t3 workflow show were not opened; they show the stored title and are not changed. The proof ran on the web target on macOS, not Linux; the fix is string handling with no platform-specific code.
Reviewing files that changed from the base of the PR and between 45c1af1 and 97906d3.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
Run titles are truncated at 200 UTF-16 code units. If the boundary splits a surrogate pair, the stored title ends at 199 code units. Unit and end-to-end tests cover a title with an emoji at that boundary.
Changes: Workflow run title
Layer / File(s)
Summary
Title truncation and boundary tests apps/server/src/workflows/WorkflowStore.ts, apps/server/src/workflows/WorkflowStore.test.ts, scripts/scenarios/workflow-run-title-keeps-whole-characters.e2e.ts
runTitle now avoids truncating between the two code units of a surrogate pair. Unit and end-to-end tests assert that the title ends at the intact 199-character prefix when an emoji falls across the 200-code-unit boundary.
Workflow run titles no longer end in a broken character when the 200-unit cut falls inside an emoji. Other titles are unchanged. No merge-blocking risk remains.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(server): workflow run titles no longer end in a broken character" states the main change: run titles are no longer cut in the middle of a surrogate pair. It matches the WorkflowStore.ru…
Description check
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section explains the broken U+FFFD character and the reproduction path. The Change section e…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix(server): workflow run titles no longer end in a broken character" states the main change: run titles are no longer cut in the middle of a surrogate pair. It matches the WorkflowStore.runTitle truncation fix, the new unit test, and the e2e scenario. It is specific, follows the conventional commit format, and is one sentence.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section explains the broken U+FFFD character and the reproduction path. The Change section explains the one-unit-earlier cut that avoids splitting a surrogate pair. The Scope section explains why no issue is linked and cites related PRs. Verification gives a focused unit test with base and head results, a scenario proof with base and head results, the changed-file checks, and items not checked. The model and harness line is present. Minor gap: no screenshots are attached, but the description explains why they are not included and the scenario output carries the same evidence.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Real web app, Chromium on Linux, 1280×800, light theme, fresh isolated databases on both commits. Enable Workflows in Labs, save the reported titled workflow through the app RPC, start it with workflow start titled --key one --json, then open its completed run. The title input is 199 ASCII characters followed by 😀 trailing text.
Proven: the scenario fails on base and passes on head. Base displays 199 a characters followed by �; head displays exactly 199 a characters. Read-only SQLite inspection confirms lengths 200 and 199 respectively.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:M30-99 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
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.
Problem
A workflow can name its run with
T3.title(text), and the server stores the title cut at 200 UTF-16 units withtitle.slice(0, 200)(runTitleinWorkflowStore.ts). When an emoji straddles unit 200, the cut keeps only its first half; SQLite stores the lone surrogate as U+FFFD, so the run's heading on the Workflows page ends in�. The same stored title is shown in the runs list, on mobile and byt3 workflow show.Change
The cut stops one unit earlier when unit 200 would split a surrogate pair, with the
splitsSurrogatePaircheck the file already uses for the step result and failure detail cuts. The 200 limit is unchanged, and titles that fit or are cut between whole characters are stored as before.Scope
A small fix of an obvious bug, so it has no issue. It is the same defect as the merged #41723 and #41808, at the run title cut in the same file, which those left alone.
Verification
vp test run apps/server/src/workflows/WorkflowStore.test.ts, with one new case: a title of 199as, U+1F680 and more text must be stored as the 199as. WithWorkflowStore.tsfrom baseb3fff82014:1 failed | 9 passed (10). On head:10 passed (10).vp run scenarios:prove scripts/scenarios/workflow-run-title-keeps-whole-characters.e2e.ts --base upstream/mainexits 0. The scenario writes a definition whose body callsT3.titlewith 199as and 😀, turns Workflows on throughserver.updateSettings, starts the run witht3 workflow start, opens the run in the web app once its title has committed, and reads the heading's text.Proven: the scenario fails on base
b3fff82014and passes on head45c1af14f1.b3fff8201445c1af14f1ASSERTION_FAILED: expect.toHaveText failed
locator: getByRole("heading", name: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
expected: text "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
observed: text "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�" (match count 1)
run-heading). On base the heading ends in�; on head it ends at the lasta. They are not attached here, since the assertion above carries the same text.vp run check:changed upstream/mainpassed: format, lint, knip (2/2), graphql, typecheck (3 packages) and tests (2 files, 12 passed).t3 workflow showwere not opened; they show the stored title and are not changed. The proof ran on the web target on macOS, not Linux; the fix is string handling with no platform-specific code.Claude Opus 5.5 via T3 Code