Skip to content

fix(server): imported thread titles no longer end in a broken emoji - #39548

Merged
juliusmarminge merged 1 commit into
pingdotgg:mainfrom
tiliakoos:fix/imported-title-broken-emoji
Nov 20, 2026
Merged

juliusmarminge merged 1 commit into
pingdotgg:mainfrom
tiliakoos:fix/imported-title-broken-emoji

Conversation

@tiliakoos

Copy link
Copy Markdown
Contributor

Problem

An imported Codex, Claude or Pi session with no saved name is titled after its first message line, cut to 100 UTF-16 code units. When an emoji straddles the 100th unit the cut keeps half of it, and the lone surrogate is stored as U+FFFD, so the thread title ends in �.

Change

deriveTitle cuts one unit earlier when the 100th boundary falls inside a surrogate pair, using the existing splitsSurrogatePair from @t3tools/shared/assistantCitations. The limit, trimming, Codex preamble stripping and wake envelope stripping are unchanged.

This re-lands MarcoDotIO's #30970 (Macroscope-approved, closed by its author as cosmetic), with him as co-author.

Scope

A very small fix for an obvious bug, so no issue: shortening a valid title should not make it malformed. The same fix class merged as #30390 and #30391. Grapheme clusters such as ZWJ sequences stay out of scope, as in those.

Verification

Added parseAgentSessionTranscript > does not split an emoji when shortening a long first message into a title to AgentSessionScanner.test.ts (99 as, then 🚀).

On main it fails:

Expected: "aaaa…aaaa"   (99 a's)
Received: "aaaa…aaaa�"

With the fix it passes, along with the rest of the file except excludes sandboxes reached through a symlink into the worktrees dir, which fails the same way on unmodified main on this macOS machine and does not involve titles. vp run check:changed passes format, lint, knip and typecheck; its test step fails only on that symlink case.

Not checked: an import in a running client; the test drives the parser the scanner and importer use.

Claude Opus 5.5 via T3 Code

The 100-unit title cut could land inside a surrogate pair, leaving a lone
half that persists as U+FFFD. Re-lands pingdotgg#30970.

Co-authored-by: MarcoDotIO <20867620+MarcoDotIO@users.noreply.github.com>
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 20, 2026
@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Title derivation now checks whether truncation at 100 code units would split a surrogate pair. A regression test covers a Codex prompt with 99 ASCII characters followed by an emoji.

Changes: Agent session title truncation

Layer / File(s) Summary
Surrogate-pair boundary handling
apps/server/src/project/AgentSessionScanner.ts, apps/server/src/project/AgentSessionScanner.test.ts
deriveTitle uses a 99-code-unit slice if the 100-code-unit boundary splits a surrogate pair. The test checks that a prompt with 99 ASCII characters followed by an emoji produces a title containing only the ASCII characters.

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

Change: Bug fix · Severity of issue fixed: Low

Suggested labels: bugfix

Suggested reviewers: only21mil, juliusmarminge, macroscopeapp

Merge Risk: Minimal · up to eee28

Imported session titles will no longer end in a broken emoji character when the first message is shortened. The change is small and localized, with a regression test, and carries minimal merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the primary change: imported thread titles no longer end in a broken emoji. The raw summary confirms the change caps titles at 100 code units without splitting a surrogate pair in der…
Description check Passed The description follows the template. It has Problem, Change, Scope, and Verification sections, and each section has concrete content. The Problem section explains the UTF-16 cut and the U+FFFD output…
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 states the primary change: imported thread titles no longer end in a broken emoji. The raw summary confirms the change caps titles at 100 code units without splitting a surrogate pair in deriveTitle, which matches the title. The title follows conventional commit format and is specific.

Full details: Description check

Explanation

The description follows the template. It has Problem, Change, Scope, and Verification sections, and each section has concrete content. The Problem section explains the UTF-16 cut and the U+FFFD output. The Change section names the function and helper. The Scope section explains why no issue link is given and cites related PRs. The Verification section names the new test, shows main failing and the fix passing, lists the unrelated symlink failure, and notes what was not checked. The description does not link a GitHub issue, but the template allows a justified no-issue reason for small obvious bugs, which the author gives. The model and harness line is present.

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 59651c1 and eee28ba.

Files selected for processing: 2

  • apps/server/src/project/AgentSessionScanner.test.ts
  • apps/server/src/project/AgentSessionScanner.ts

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

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

Copy link
Copy Markdown
Member

Evidence

Imported the same unnamed synthetic Codex session through Welcome → Review all → select demo-project → Import 1 project and start, then opened its settled thread. The first message contains 99 ASCII a characters followed by 🚀 and then deploy. Both captures use Chromium on Linux, light theme, 1920×1080, fresh databases with seeding disabled, and an enabled ref selector showing master. Each selected frame matches another frame 500 ms earlier. Base shows a broken title glyph; head contains exactly 99 a characters. The message body preserves 🚀 on both sides. The images differ only at the title glyph.

Before After
Before: imported title ends in a broken glyph After: imported title contains only 99 a characters
59651c1761 eee28bae15

Scenario · Synthetic session seed script

scenarios:prove exited 0: fails on base, passes on head.

Not shown:

  • Claude and Pi imports also use deriveTitle, but their import paths were not exercised; this proof covers the reported Codex reproduction.

@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 Nov 20, 2026
@juliusmarminge
juliusmarminge merged commit 272cd38 into pingdotgg:main Nov 20, 2026
72 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 20, 2026
@tiliakoos
tiliakoos deleted the fix/imported-title-broken-emoji branch November 20, 2026 07:38
adampeterhiggins added a commit to adampeterhiggins/t3code that referenced this pull request Nov 20, 2026
* fix(server): Antigravity usage skips agy index databases instead of reporting partial history (pingdotgg#39435)

* fix(web): a later thread error with the same text shows its banner again (pingdotgg#37419)

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(client-runtime): connection supervisor restarts its background listeners after a defect (pingdotgg#39431)

* fix(cursor): Max Mode tiers keep working after Cursor changes a model (pingdotgg#39453)

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(web): choose which projects the issues list shows (pingdotgg#38799)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* perf(server): refreshing a branch list frees the snapshot it replaces (pingdotgg#39440)

* feat(web): reference a side chat from its main thread with Add to chat and @ (pingdotgg#38323)

Co-authored-by: Yash Singh <saiansh2525@gmail.com>

* fix(server): refuse Antigravity runtimes below 1.5 (pingdotgg#38970)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(server): one compatibility lookup and one refusal for broken provider versions (pingdotgg#39427)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>

* fix(server): OpenCode and Pi read their minimum version from the manifest (pingdotgg#39434)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>

* feat(issues): a fork lists its upstream's issues and its own (pingdotgg#39159)

* fix(server): background subagents can delegate after their parent's turn ends (pingdotgg#38869)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): show status for grouped sidebar issues (pingdotgg#39351)

* feat(antigravity): Auto uses agy's own Auto review (pingdotgg#39378)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(server): compacting a subagent thread no longer adds a task to its parent (pingdotgg#39455)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(antigravity): accept UTF-16 text attachments with a BOM (pingdotgg#39456)

Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(server): signed URLs stay out of HTTP request logs (pingdotgg#39464)

* fix(server): Antigravity drops a stale sign-in failure once a session signs in (pingdotgg#39443)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(server): keep escaped spaces in Codex launch overrides (pingdotgg#39458)

Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>

* feat(server): links between environments renew while they are used (pingdotgg#39399)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>

* fix(opencode): label xhigh reasoning Extra High (pingdotgg#39451)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(web): keep revealed folder in view while restored folders load (pingdotgg#39470)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* feat: link several environments at once (pingdotgg#39426)

* fix(server): Linux keep-awake no longer blocks screen lock and display-off (pingdotgg#39490)

* fix(evals): GPT run summaries capitalise the cost sentence (pingdotgg#39380)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* docs(codex): explain Chrome extension connection errors (pingdotgg#38429)

Co-authored-by: maria-rcks <maria@kuuro.net>

* fix(shared): count each pending subagent thread once (pingdotgg#39501)

* fix(github): keep the enterprise token off hosts other than GH_HOST (pingdotgg#39480)

* fix(web): keep long-named VS Code themes separate on import (pingdotgg#39493)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(antigravity): MCP calls through call_mcp_tool show the tool, not "Ran command" (pingdotgg#39474)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(relay): refuse to relink an active environment under a different key (pingdotgg#39482)

* fix(server): secret names can no longer leave the secrets directory (pingdotgg#39483)

* fix(server): a linked workspace file is served only if its target is previewable (pingdotgg#39491)

* fix(server): revoking all other clients also revokes unspent pairing codes (pingdotgg#39495)

* fix(web): the preview only embeds PDFs from its own environment (pingdotgg#39497)

* fix(relay): parse Hermes stack frames in linear time (pingdotgg#39498)

* perf(server): rank queued provider snapshots by focus and combine superseded ones (pingdotgg#39502)

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(gitlab): keep the environment token off hosts a caller names (pingdotgg#39522)

* fix(server): stop managed Antigravity CLI from self-updating in place and recover on reinstall (pingdotgg#39363)

* fix(server): a killed Antigravity subagent no longer keeps its turn running (pingdotgg#39519)

* fix(server): Claude history import skips sessions answered only by a synthetic error (pingdotgg#39527)

* fix(server): deliver child results to running Claude turns (pingdotgg#39528)

* fix(server): Antigravity threads follow the user's global AGENTS.md and GEMINI.md (pingdotgg#39531)

* fix(server): launches whose caller goes away still start (pingdotgg#36499)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(server): each Antigravity Google sign-in stays in its own instance (pingdotgg#39485)

* fix(web): Retry on the Pull Requests list only refetches the environments that failed (pingdotgg#39536)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(web): scope checkout errors to the selected pull request (pingdotgg#39554)

* fix(web): ignore superseded microphone refreshes in voice setup (pingdotgg#39552)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(web): fold accents in thread link picker search (pingdotgg#39557)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(server): imported thread titles no longer end in a broken emoji (pingdotgg#39548)

Co-authored-by: MarcoDotIO <20867620+MarcoDotIO@users.noreply.github.com>

* chore(release): prepare v0.1.11

* fix(mobile): keep chat open when branch actions finish after dismissal (pingdotgg#39562)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(composer): keep screenshots preparing after an unanswered question closes (pingdotgg#39569)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(web): keep reopened pairing link dialogs open on completion (pingdotgg#39579)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(server): Codex web searches list the query once (pingdotgg#39585)

Co-authored-by: MarcoDotIO <20867620+MarcoDotIO@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>

* test(server): use the live clock for theme watch notifications (pingdotgg#39598)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(cursor): stop repeating runtime instructions on every turn (pingdotgg#39605)

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): file find scrolls to matches below wrapped lines (pingdotgg#39616)

---------

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
Co-authored-by: Yash Singh <saiansh2525@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Bilal Bakr <62337003+Bil0000@users.noreply.github.com>
Co-authored-by: miley <mkantenko@gmail.com>
Co-authored-by: Noah Sigel <30538387+nsigel@users.noreply.github.com>
Co-authored-by: Simone <lucenz@proton.me>
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: Daniel <rootdevdb@gmail.com>
Co-authored-by: Jex <jieyuexing@outlook.com>
Co-authored-by: Lenori <richter.leander@icloud.com>
Co-authored-by: DukMaxxi <Samuel.Wamwiri@gmail.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: Soroush Baraouf <soroushraouf44@gmail.com>
Co-authored-by: Hayden <121905330+hh36000@users.noreply.github.com>
Co-authored-by: Theo Browne <me@t3.gg>
Co-authored-by: Shlok Sheth <92412925+shethshlok@users.noreply.github.com>
Co-authored-by: Manuel Huez <manuel.huez@gmail.com>
Co-authored-by: tiliakoos <73005126+tiliakoos@users.noreply.github.com>
Co-authored-by: Wout Stiens <71498452+StiensWout@users.noreply.github.com>
Co-authored-by: MarcoDotIO <20867620+MarcoDotIO@users.noreply.github.com>
Co-authored-by: t3-code-bot[bot] <269035359+t3-code-bot[bot]@users.noreply.github.com>
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Nov 20, 2026
**v0.1.12-nightly.20261120.4994** · 30 changes from 12 contributors

- **Screen reader navigation.** Jump between pull request reviews and comments, and issue comments, using heading navigation.
- **Cursor background commands.** Cursor agents can wait for background builds, tests, and watchers and resume when they finish.
- **Screenshot drafts.** Screenshots finish preparing and stay in your draft when an unanswered question closes.
- **Pull request checks.** Agents are notified when remaining pull request checks finish after an earlier failure.
- **File selection.** Select text across long editable files while scrolling without losing your selection.
- **Scheduled task threads.** Clear a scheduled task’s thread so its next run starts a new conversation.
- **Find in files.** Find-in-file now scrolls to matches below wrapped lines.

### Plus 19 more bug fixes and performance improvements.

<details>
<summary>Full changelog</summary>

## What's Changed
* fix(web): scope checkout errors to the selected pull request by @StiensWout in pingdotgg/t3code#39554
* fix(web): ignore superseded microphone refreshes in voice setup by @StiensWout in pingdotgg/t3code#39552
* fix(web): fold accents in thread link picker search by @StiensWout in pingdotgg/t3code#39557
* fix(server): imported thread titles no longer end in a broken emoji by @tiliakoos in pingdotgg/t3code#39548
* fix(mobile): keep chat open when branch actions finish after dismissal by @StiensWout in pingdotgg/t3code#39562
* fix(composer): keep screenshots preparing after an unanswered question closes by @StiensWout in pingdotgg/t3code#39569
* fix(web): keep reopened pairing link dialogs open on completion by @StiensWout in pingdotgg/t3code#39579
* fix(server): Codex web searches list the query once by @tiliakoos in pingdotgg/t3code#39585
* test(server): use the live clock for theme watch notifications by @StiensWout in pingdotgg/t3code#39598
* fix(cursor): stop repeating runtime instructions on every turn by @Yash-Singh1 in pingdotgg/t3code#39605
* fix(web): file find scrolls to matches below wrapped lines by @juliusmarminge in pingdotgg/t3code#39616
* fix(gitlab): load issue details where GitLab has no Note.awardEmoji by @juliusmarminge in pingdotgg/t3code#39621
* fix(cursor): background commands survive the turn and wake the agent when they exit by @Yash-Singh1 in pingdotgg/t3code#38348
* fix(grok): stop rechecking a healthy Grok CLI every refresh interval by @juliusmarminge in pingdotgg/t3code#39623
* fix(server): a PR watch tells the agent when the checks finish after a failure by @aglowienka in pingdotgg/t3code#39596
* test(server): expect the checks-finished wake in PR watch runtime tests by @juliusmarminge in pingdotgg/t3code#39646
* fix(acp-registry): detect droid, glm, and vibe flavors for local commands by @ndycode in pingdotgg/t3code#39618
* fix(scheduled-tasks): clearing a task's thread no longer keeps the old one by @juliusmarminge in pingdotgg/t3code#39639
* fix(web): editable file drag selection no longer breaks across virtualized scroll windows by @ryush00 in pingdotgg/t3code#39574
* fix(web): the provider update pill no longer recounts dismissed updates by @Tiaxi in pingdotgg/t3code#39636
* fix(web): strip terminal colors from saved notebook output by @geezoria in pingdotgg/t3code#39643
* fix(web): a drag selection released during a window shift keeps its unmounted anchor by @juliusmarminge in pingdotgg/t3code#39681
* fix(mobile): route all external URL opens through the error-handling helper by @ndycode in pingdotgg/t3code#39665
* perf(usage): match transcript markers as bytes without a per-line latin1 string by @ndycode in pingdotgg/t3code#39659
* fix(server): t3_project_read shows the actions saved in Settings by @imqdee in pingdotgg/t3code#39676
* fix(server): Claude text generation retries without images when the model rejects them by @juliusmarminge in pingdotgg/t3code#39684
* fix(web,mobile): make comment and review author lines headings by @juliusmarminge in pingdotgg/t3code#39648
* fix(server): preview browser downloads Chrome 158.0.8127.36 with its security fixes by @rubas in pingdotgg/t3code#39669
* fix(antigravity): stop double-counting thinking tokens in turn output usage by @MusseJusse in pingdotgg/t3code#39686

## New Contributors
* @aglowienka made their first contribution in pingdotgg/t3code#39596
* @ndycode made their first contribution in pingdotgg/t3code#39618
* @ryush00 made their first contribution in pingdotgg/t3code#39574
* @rubas made their first contribution in pingdotgg/t3code#39669

**Full Changelog**: pingdotgg/t3code@v0.1.11-nightly.20261120.4979...v0.1.12-nightly.20261120.4994

</details>


Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.12-nightly.20261120.4994
HNRow pushed a commit to HNRow/r3code that referenced this pull request Nov 20, 2026
…ingdotgg#39548)

Co-authored-by: MarcoDotIO <20867620+MarcoDotIO@users.noreply.github.com>
(cherry picked from commit 272cd38)
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:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants