You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): Enter saves monogram or pasted emoji in project icon picker - #42703
In apps/web/src/components/settings/ProjectIconPickerDialog.tsx, the Monogram tab's Letters input and the Emoji tab's "Or paste any emoji" input have no form and no Enter handler. Typing AB or pasting an emoji and pressing Enter does nothing, so the user has to click "Save icon". This is the same pattern fixed for the text generator wizard in #42449.
Change
apps/web/src/components/settings/ProjectIconPickerDialog.tsx: add a shared saveOnEnter keydown handler on the Monogram Letters input and the Emoji "Or paste any emoji" input that calls event.preventDefault() and the existing save(). It ignores composing Enter (isComposing or keyCode === 229), held Enter (repeat), and Enter with Alt, Ctrl, Meta, or Shift. An invalid monogram still does not save because save() already returns early. The Icons tab search input is deliberately not wired: typing a search does not select an icon, so Enter there would save the previously selected one.
apps/web/src/components/settings/ProjectIconPickerDialog.browser.test.tsx: add a browser test (saves on plain Enter in monogram and custom emoji inputs, not icon search). It checks that Enter in icon search (rocket), Enter on an invalid monogram (ABC), and composing, keyCode: 229, repeat, or Shift Enter do not save. Plain Enter on AB saves { kind: "monogram", text: "AB" } and closes; plain Enter on 🦊 saves { kind: "emoji", emoji: "🦊" } and closes.
Verification
An AI agent (Gemini 4 Neon and Claude Opus 5.5, T3 Code) ran the test runs, vp run check:changed, and the before/after captures.
On base (024da4f7), the new browser test fails at expect(onSelect).toHaveBeenCalledTimes(1) with 0 calls.
On head (deb54cae), ProjectIconPickerDialog.browser.test.tsx passes 2/2 tests across 3 runs, and vp run check:changed passes (format, lint, knip, typecheck, tests, React Compiler).
Setup: Web dev build in a browser at a 1280x800 viewport, fresh isolated data on each commit, one synthetic project named "sample-app".
Steps: Settings → Projects → sample-app → Choose icon → Monogram → type "AB" → Enter; then Choose icon → Emoji → type 🦊 in "Or paste any emoji" → Enter (same on both commits).
Before (024da4f7)
After (deb54cae)
Web, 024da4f: Monogram tab, Letters "AB" typed and Enter pressed; the dialog stays open, the project icon remains automatic "SA", and nothing is saved
Web, deb54ca: Monogram tab, Letters "AB" typed and Enter pressed; the dialog closes and Project icon reads "AB · green"
Web, 024da4f: Emoji tab, 🦊 typed in "Or paste any emoji" and Enter pressed; the dialog stays open and nothing is saved
Web, deb54ca: Emoji tab, 🦊 typed in "Or paste any emoji" and Enter pressed; the dialog closes and Project icon shows 🦊
Also checked live on head (deb54cae, not captured): typing "rocket" and pressing Enter in the Icons search keeps the dialog open and leaves the icon unchanged.
Not shown: Mobile has no project icon picker (it only renders icons), so it is unchanged. Desktop bundles the same web UI and was not captured separately. macOS and Windows hosts were not captured.
No actionable comments were generated in the recent review.
Walkthrough
The project icon picker now saves monograms and custom emoji on eligible Enter keydowns. Browser tests check ignored key events and successful submissions.
Changes: Project icon picker Enter handling
Layer / File(s)
Summary
Guarded Enter submission apps/web/src/components/settings/ProjectIconPickerDialog.tsx, apps/web/src/components/settings/ProjectIconPickerDialog.browser.test.tsx
The monogram and custom-emoji inputs use a shared handler that ignores modified, repeated, and composing Enter keydowns. Tests cover ignored events and successful submissions.
pingdotgg/t3code#39131: Adds monogram length validation on the same save path used by the Enter handler.
Suggested labels:bugfix
Suggested reviewers:maria-rcks, macroscopeapp
Merge Risk: Minimal · up to deb54
Pressing Enter in the monogram or custom emoji field now saves the icon, and invalid or composing input is ignored. The change is small, the tests cover the behavior, and no merge-blocking risk remains.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: Enter in the project icon picker now saves the monogram or pasted emoji. It follows the conventional commit format with a clear scope. The raw summary and objectives b…
Description check
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section gives the reproduction steps and expected behavior. The Change section lists the han…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: Enter in the project icon picker now saves the monogram or pasted emoji. It follows the conventional commit format with a clear scope. The raw summary and objectives both describe a shared Enter handler for the Monogram Letters and Emoji inputs, so the title matches the changeset.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section gives the reproduction steps and expected behavior. The Change section lists the handler and the modifier-key and composition guards, and it explains why the Icons search input is left unwired. Scope cites the related pattern in #42449 but does not link a bug issue or explain why the fix needs no issue. Verification gives test results on base and head, the commands run, the setup, and before/after screenshots. It also states what was not checked, which are macOS, Windows, and desktop captures.
Resolution
Optional: link the bug issue in the Scope section, or state why no issue is needed. The template asks for this, and the description cites only #42449, which is a related pattern rather than the bug report. The template also asks for the model and harness at the end. The description mentions Gemini 4 Neon and T3 Code, so this item is already covered.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:S10-29 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In
apps/web/src/components/settings/ProjectIconPickerDialog.tsx, the Monogram tab's Letters input and the Emoji tab's "Or paste any emoji" input have no form and no Enter handler. TypingABor pasting an emoji and pressing Enter does nothing, so the user has to click "Save icon". This is the same pattern fixed for the text generator wizard in #42449.Change
apps/web/src/components/settings/ProjectIconPickerDialog.tsx: add a sharedsaveOnEnterkeydown handler on the Monogram Letters input and the Emoji "Or paste any emoji" input that callsevent.preventDefault()and the existingsave(). It ignores composing Enter (isComposingorkeyCode === 229), held Enter (repeat), and Enter with Alt, Ctrl, Meta, or Shift. An invalid monogram still does not save becausesave()already returns early. The Icons tab search input is deliberately not wired: typing a search does not select an icon, so Enter there would save the previously selected one.apps/web/src/components/settings/ProjectIconPickerDialog.browser.test.tsx: add a browser test (saves on plain Enter in monogram and custom emoji inputs, not icon search). It checks that Enter in icon search (rocket), Enter on an invalid monogram (ABC), and composing,keyCode: 229, repeat, or Shift Enter do not save. Plain Enter onABsaves{ kind: "monogram", text: "AB" }and closes; plain Enter on 🦊 saves{ kind: "emoji", emoji: "🦊" }and closes.Verification
An AI agent (Gemini 4 Neon and Claude Opus 5.5, T3 Code) ran the test runs,
vp run check:changed, and the before/after captures.024da4f7), the new browser test fails atexpect(onSelect).toHaveBeenCalledTimes(1)with 0 calls.deb54cae),ProjectIconPickerDialog.browser.test.tsxpasses 2/2 tests across 3 runs, andvp run check:changedpasses (format, lint, knip, typecheck, tests, React Compiler).Setup: Web dev build in a browser at a 1280x800 viewport, fresh isolated data on each commit, one synthetic project named "sample-app".
Steps: Settings → Projects → sample-app → Choose icon → Monogram → type "AB" → Enter; then Choose icon → Emoji → type 🦊 in "Or paste any emoji" → Enter (same on both commits).
024da4f7)deb54cae)Web, 024da4f: Monogram tab, Letters "AB" typed and Enter pressed; the dialog stays open, the project icon remains automatic "SA", and nothing is saved
Web, deb54ca: Monogram tab, Letters "AB" typed and Enter pressed; the dialog closes and Project icon reads "AB · green"
Web, 024da4f: Emoji tab, 🦊 typed in "Or paste any emoji" and Enter pressed; the dialog stays open and nothing is saved
Web, deb54ca: Emoji tab, 🦊 typed in "Or paste any emoji" and Enter pressed; the dialog closes and Project icon shows 🦊
Also checked live on head (
deb54cae, not captured): typing "rocket" and pressing Enter in the Icons search keeps the dialog open and leaves the icon unchanged.Not shown: Mobile has no project icon picker (it only renders icons), so it is unchanged. Desktop bundles the same web UI and was not captured separately. macOS and Windows hosts were not captured.
Generated with Gemini 4 Neon in T3 Code Nightly