fix(web): honor the scratch project name and icon#23894
Renaming the built-in No project entry and choosing an icon saves correctly, but the chat breadcrumb, draft project trigger, and command palette's New thread in… menu still show hardcoded defaults. Use the saved title in those views and the existing ProjectFavicon renderer in the palette. Scratch groups retain the preferred environment's saved title instead of replacing it with No project. Fixes #23757.
This is a focused correction to existing project customization under CONTRIBUTING.md's obvious-bug exception. Scratch classification, grouping keys, environment selection, and thread creation paths are unchanged. There are no new settings or workflows.
Verification
- Added a regression to the existing project-grouping tests. It failed before the fix with
expected 'No project' to be 'Scratchpad'and passes afterward. It covers two differently named scratch homes, preferred-environment selection, saved icons, and continued grouping. - Focused grouping/environment tests: 28 passed. Command palette logic and mobile home project-scope tests: 21 passed.
vp run check:changedpassed formatting, lint, Knip, affected typechecks, and adjacent tests. A follow-up lint run after removing an unused import reports only the existing Date purity warning.- In T3's Browser panel on Linux Chromium, saved Scratchpad with a gray info icon through Settings, then checked the breadcrumb, draft project trigger, and New thread in… palette. The palette uses the saved info icon and title. Checked the draft at 1280×800 dark and 480×800 light; the narrow view has no horizontal overflow.
- Web and desktop share the changed views. Mobile consumes the shared grouping label change and its project-scope tests pass. Electron, native mobile, and a live multi-environment connection were not exercised; preferred-environment behavior is covered by the regression test. No provider turn was started.
Screenshots
Both sides use the same saved Scratchpad name and info icon in isolated dev state. Before is 200dad3b39aa; after is this patch.
| View | Before | After |
|---|---|---|
| Draft and breadcrumb | Before: saved name ignored | After: Scratchpad in the draft and breadcrumb |
| New thread in… | Before: default name and chat icon | After: saved Scratchpad name and info icon |
Model: GPT-6.1-Sol. Harness: Codex through T3 Code.
Checks
- SuccessfulCodeRabbitGitHub
Review completed
- Successful
Skipped - Not affected
- Skipped
- Skipped
- SuccessfulLabel PR 23894GitHub
- Skipped
- SuccessfulLabel PR sizeGitHub
- Skipped
- Skipped
- Successful
- Successful
- SuccessfulPrepare PR size configGitHub
- SuccessfulCollect PR targetsGitHub
Added 1 commit
- fix(web): honor the scratch project name and icon060c24e
Approvability
Verdict: Approved at 060c24e
Macroscope's review found this PR approvable — This is a focused UI bug fix that makes the existing saved scratch-project title and icon appear in the breadcrumb, draft selector, command palette, and grouped label. It preserves the existing scratch fallback and project/thread behavior without changing defaults, schemas, or workflows.
You can add or adjust custom eligibility rules. Learn more.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 200dad3
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
b8eb1dc1-a01a-4b90-ba8b-82f5d8cba513
📥 Commits
Reviewing files that changed from the base of the PR and between 200dad3b39aa9c2562b4bae54106ab8acdcc4163 and 060c24ead5d984beec33dd176c7e7abf1fca27eb.
📒 Files selected for processing: 5
apps/web/src/components/CommandPalette.tsxapps/web/src/components/chat/ChatHeader.tsxapps/web/src/components/chat/DraftHeroHeadline.tsxpackages/client-runtime/src/state/projectGrouping.test.tspackages/client-runtime/src/state/projectGrouping.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.
📝 Walkthrough
Scratch-project labels now use the project title in grouped project names, chat headers, draft selectors, and the command palette. The command palette also uses the scratch project's favicon when one exists in the target environment. Tests cover representative selection for grouped local and remote scratch projects.
Changes: Scratch Project Display
Layer / File(s) Summary Grouped scratch project labels
packages/client-runtime/src/state/projectGrouping.ts,packages/client-runtime/src/state/projectGrouping.test.tsGrouped scratch projects use the representative project's title as the group label. Tests check the label and representative icon for each preferred environment. Scratch project titles and icons in interface views
apps/web/src/components/CommandPalette.tsx,apps/web/src/components/chat/ChatHeader.tsx,apps/web/src/components/chat/DraftHeroHeadline.tsxThe command palette uses the matching scratch project's title and favicon, or retains its fallback when no project matches. The chat header and draft selector use the project title. Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers:
t3dotgg,bentbrain
Merge Risk: ⚪ Minimal · up to 060c2
The change is mergeable; no verified regression remains in the updated scratch-project labels or icons.
Pre-merge checks: Passed 4
Check name Status Explanation Title check Passed The title clearly and concisely describes the main change: honoring saved scratch project names and icons in the web UI. Description check Passed The description explains the problem, fix, scope, issue reference, verification results, UI evidence, limitations, and agent details. It provides the required information, although it does not use sep… Linked Issues check Passed Issue [ #23757] requires the built-in scratch entry to use its saved name and icon in the thread heading, project picker, and command palette. The supplied PR evidence reports these views now use the s…Out of Scope Changes check Passed The changes are limited to the three affected shared views, scratch group-label selection, and a focused grouping regression test. The grouping change supports consistent saved scratch titles and pres… Full details: Description check
Explanation
The description explains the problem, fix, scope, issue reference, verification results, UI evidence, limitations, and agent details. It provides the required information, although it does not use separate Problem, Change, or Scope and approval headings.
Full details: Linked Issues check
Explanation
Issue [
#23757] requires the built-in scratch entry to use its saved name and icon in the thread heading, project picker, and command palette. The supplied PR evidence reports these views now use the saved title andProjectFavicon.ChatHeaderreadsactiveProject?.title, and the reviewed source rendersProjectFaviconfor the breadcrumb.CommandPaletteimportsProjectFavicon. The change also usesrepresentative.titlefor grouped scratch labels. The added regression test covers different scratch titles, preferred-environment selection, saved icons, and continued grouping.
Full details: Out of Scope Changes check
Explanation
The changes are limited to the three affected shared views, scratch group-label selection, and a focused grouping regression test. The grouping change supports consistent saved scratch titles and preserves grouping keys, environment selection, and member retention. No unrelated workflow, setting, or project-grouping behavior is introduced.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.