Skip to content

fix(web): keep emoji intact in manually added folder names - #42244

Open
jadelike-wine wants to merge 3 commits into
pingdotgg:mainfrom
jadelike-wine:codex/fix-manual-folder-label
Open

jadelike-wine wants to merge 3 commits into
pingdotgg:mainfrom
jadelike-wine:codex/fix-manual-folder-label

Conversation

@jadelike-wine

Copy link
Copy Markdown

Problem

In Settings → Projects, select a project and use Repositories → Add folder to add a directory named 127 as followed by 🚀. The saved label ends in � because the 128-code-unit limit cuts the rocket in half. With 126 as, the rocket fits.

Change

Trim leading whitespace before measuring the basename and use the existing surrogate-pair check to cut before a character that crosses the limit. The full directory path is preserved.

Scope

This is a small, reproducible bug in the Web settings form, so there is no separate issue. The CLI and server discovery paths already handle this boundary (#42083, #42133). Only the Web helper and its tests change.

Verification

  • Ran vp test run apps/web/src/components/settings/trackedFolders.logic.test.ts. On the baseline, the 127-a and leading-whitespace cases failed. All 16 tests pass with the fix, including the 126-a case that keeps the rocket.
  • Used the real Web settings form against a local server to add both directories. The first saved label kept 🚀. The second saved label contained exactly 127 as. Both rows kept their original paths. The screenshots repeat the same boundaries with narrower letters so the ends of the labels are visible. Compare the cut- row in each image.
  • vp run check:changed upstream/main passed formatting, lint, both Knip checks, typechecking, focused tests and the React Compiler check.

Before

Before the fix, the cut- folder label ends with a replacement character.

After

After the fix, the cut- folder label ends cleanly and the fits- label still includes the rocket.

Model: GPT-6. Harness: Codex Desktop.

@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 24, 2026
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

resolveTrackedFolderInput trims leading whitespace before truncating folder names. It avoids splitting a surrogate pair at the 128-character boundary, then trims trailing whitespace. Tests cover emoji boundaries and leading whitespace.

Changes: Tracked folder name handling

Layer / File(s) Summary
Name trimming, truncation, and tests
apps/web/src/components/settings/trackedFolders.logic.ts, apps/web/src/components/settings/trackedFolders.logic.test.ts
The resolver trims leading whitespace before truncation and adjusts the limit if truncation would split a surrogate pair. Tests cover an emoji after 127 characters or spaces, and confirm that the input path remains unchanged.

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

Change: Bug fix

Possibly related PRs

  • pingdotgg/t3code#42083: This PR applies a parallel surrogate-pair truncation fix to the CLI --track path.
  • pingdotgg/t3code#35921: This PR adds tracked-folder settings and repository management, which are related to the settings helper changed here.

Suggested labels: bugfix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to abe60

This is a small fix that keeps emoji intact in folder labels at the 128-character limit. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: folder labels keep emoji intact when a manually added folder name is cut at the 128-code-unit limit. It follows conventional commit form and is specific to the changes…
Description check Passed The description follows the template. It has Problem, Change, Scope, and Verification sections, with reproduction steps, a rationale for no issue, focused test results, and before/after screenshots. I…
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: folder labels keep emoji intact when a manually added folder name is cut at the 128-code-unit limit. It follows conventional commit form and is specific to the changeset.

Full details: Description check

Explanation

The description follows the template. It has Problem, Change, Scope, and Verification sections, with reproduction steps, a rationale for no issue, focused test results, and before/after screenshots. It also names the model and harness as the template asks. The template asks for a short recording only when motion or timing matters, so it is not required here. The objectives describe a helper change with a matching test run, which is consistent with the description.

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 8aea0cf and abe60bf.

Files selected for processing: 1

  • apps/web/src/components/settings/trackedFolders.logic.test.ts

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

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

This branch has not been deployed

No deployments
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). takeover:in-progress A takeover lead is working on this PR 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