GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||
GeezerVison is showing github.com — fix(client-runtime): scheduled task worktree base refs keep Unicode whitespace in branch names by saphid · Pull Request #44562 · pingdotgg/t3code Conversation
Contributor
ProblemSelecting a Git branch with leading or trailing Unicode whitespace as a scheduled task's worktree base can send Git a different, possibly nonexistent ref. When the branch name consists only of Unicode whitespace, the editors also treat it as an automatic base and the mobile picker highlights the default branch. Deterministic repro on Run from the repository root with Node 24. The fixture simulates a selected branch ending in a literal non-breaking space (U+00A0), with node --input-type=module -e 'import { scheduledTaskWorktreeBaseRef } from "./packages/client-runtime/src/scheduledTaskWorktree.ts"; const base = "feat\u00a0"; console.log(scheduledTaskWorktreeBaseRef(base, [{ name: "main", isDefault: true }]) === base);'
ChangeUse the existing contracts helper ScopeSmall fix for an obvious bug; no issue needed under CONTRIBUTING.md. Verification
Authored by GPT-6.2 Sol (Codex); reviewed by Gemini 4 Neon (Antigravity).
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…hitespace in branch names
|
There was an error while loading. Please reload this page.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Runtime base-reference normalization packages/client-runtime/src/scheduledTaskWorktree.ts, packages/client-runtime/src/scheduledTaskWorktree.test.ts |
The base-reference helper uses trimAsciiWhitespace. Tests verify that trailing and whitespace-only non-breaking spaces are preserved. |
Settings automatic-base checks apps/mobile/src/features/settings/ScheduledTaskPickerScreens.tsx, apps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsx, apps/web/src/components/settings/ScheduledTasksSettings.tsx |
The mobile and web screens use trimAsciiWhitespace when checking whether a base reference is empty. The picker’s existing query and branch-data conditions remain unchanged. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
Suggested labels: bugfix
Suggested reviewers: binjamshid, only21mil, macroscopeapp
9dcdbScheduled-task worktree base refs with leading or trailing Unicode whitespace are now preserved exactly, while ASCII-whitespace-only input still selects the default branch. No concrete merge-blocking risk was found, and the regression tests cover the changed behavior.
Explanation
The title names the change: scheduled task worktree base refs now keep Unicode whitespace in branch names. It matches the changeset, which swaps String.trim() for trimAsciiWhitespace in the shared resolver and in the web and mobile editor checks. The title uses a conventional commit format and a specific scope.
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section gives a reproduction, expected and observed behavior, and the affected components. The Change section explains the helper swap across the resolver, the web and mobile editors, and the mobile picker. The Scope section states that the fix is small and needs no issue. The Verification section lists the regression test, the check run, and a before/after transcript. It also says which UI runs were not shown. The description does not include before/after screenshots, but this change has no UI copy changes, so the template does not require them. The description also names the authoring model, as the template asks.
c7f90663-6e70-483e-a66e-af9153636ba9apps/mobile/src/features/settings/ScheduledTaskPickerScreens.tsxapps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsxapps/web/src/components/settings/ScheduledTasksSettings.tsxpackages/client-runtime/src/scheduledTaskWorktree.test.tspackages/client-runtime/src/scheduledTaskWorktree.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
EvidenceReal web app, Chromium, 1280×800, light theme; fresh synthetic state on each commit. Select Proven: the scenario fails on base and passes on head. Base shows
Not shown:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.