fix(web): honor the scratch project name and icon#23894

open1
main
GitHub fork: fix/scratch-project-identity
opened1d agobySshethshlok
View on GitHubTwo-way sync enabledPR last imported 1d ago

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:changed passed 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.

Saved project settings.

Model: GPT-6.1-Sol. Harness: Codex through T3 Code.

Checks

All checks passed

Added 1 commit

  • fix(web): honor the scratch project name and icon060c24e
Synced from GitHub

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.

Synced from GitHub

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
📥 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.tsx
  • apps/web/src/components/chat/ChatHeader.tsx
  • apps/web/src/components/chat/DraftHeroHeadline.tsx
  • packages/client-runtime/src/state/projectGrouping.test.ts
  • packages/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.ts
Grouped 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.tsx
The 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 nameStatusExplanation
Title checkPassedThe title clearly and concisely describes the main change: honoring saved scratch project names and icons in the web UI.
Description checkPassedThe 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 checkPassedIssue [#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 checkPassedThe 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 and ProjectFavicon. ChatHeader reads activeProject?.title, and the reviewed source renders ProjectFavicon for the breadcrumb. CommandPalette imports ProjectFavicon. The change also uses representative.title for 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.