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 connects in the text generator wizard - #42449
In Settings → Providers → Text generators → Add generator, step 1 (Connect) of the wizard ignores Enter in the Base URL, API key, or Name fields even when Connect is enabled; only clicking Connect works. The fields are inside a <form> whose onSubmit connects, but the Connect / Save and continue button sits in the wizard footer outside the form as a plain button, so the form has no submit button and the browser never submits it on Enter.
Change
TextGeneratorWizard in TextGeneratorsSettings.tsx now gives the step 1 <form> an id with useId() and makes the footer's primary button type="submit" form={formId} (replacing its onClick), matching AddUsageLimitSourceDialog.tsx. Pressing Enter and clicking the button now both go through the form's existing onSubmit → connect().
Unchanged: a disabled Connect button (missing required input or while connecting) still blocks submission, because the browser skips implicit submission through a disabled submit button and connect() keeps its own guard. Cancel, Back, Done, and step 2 are untouched, and no key handler was added, so pressing Enter to confirm an IME composition does not submit.
Scope
One bug: step 1 of the text generator wizard ignores Enter instead of connecting. One component (TextGeneratorsSettings.tsx) and its browser test (TextGeneratorsSettings.browser.test.tsx). No issue: a small fix for an obvious bug with the direct repro below.
Verification
An AI agent ran each check below.
Setup: Linux, Chromium (T3 Browser panel, incognito), 1280×800, isolated vp run dev --no-seed server with a local stand-in OpenAI-compatible endpoint that lists 3 synthetic models; main ran on 11edf884, this PR on 55f66a07.
Steps: in Settings → Providers → Text generators, open Add generator → Custom, fill Base URL http://localhost:11434/v1 and Name Demo models (no API key), and press Enter in Base URL.
11edf884 (main)
55f66a07 (this PR)
Custom generator with Base URL and Name filled, Connect enabled; Enter pressed in Base URL, wizard stays on step 1 and no request is sent.
Same inputs, Enter pressed in Base URL; the wizard connects (one model-list request) and shows step 2 "Demo models is connected and lists 3 models".
On 11edf884, pressing Enter sent no request and saved nothing; clicking Connect worked.
On 55f66a07, pressing Enter sent one model-list request, saved the generator, and moved to step 2; clicking Back and then Connect also sent exactly one request (no double submit).
The new browser test submits step 1 of the text generator wizard on Enter when Connect is enabled in TextGeneratorsSettings.browser.test.tsx asserts that pressing Enter with an empty Base URL does not call checkTextGeneratorConfig, and pressing Enter after typing a Base URL calls it once and shows step 2.
The test fails on 11edf884 (expected the check to be called once, got 0 times) and passes 3 of 3 runs on 55f66a07 with the file's other test.
vp run check:changed passes on 55f66a07.
Not checked:
The Edit flow's "Save and continue" uses the same button and form and was not checked separately.
Desktop renders the same web Settings dialog and was not checked separately.
Mobile has no text generator wizard.
IME Enter was not exercised; it relies on the browser's native form submission behavior.
Reviewing files that changed from the base of the PR and between 55f66a0 and 1223384.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The text-generator wizard now submits its form through the Connect button. A browser test checks that Enter does not call the configuration checker while Connect is disabled and does call it after a valid base URL is entered.
Changes: Text generator wizard form submission
Layer / File(s)
Summary
Connect form submission apps/web/src/components/settings/TextGeneratorsSettings.tsx, apps/web/src/components/settings/TextGeneratorsSettings.browser.test.tsx
The wizard assigns an ID to the Connect form, and the footer button submits that form. The browser test checks that Enter does not call the configuration checker while Connect is disabled, then calls it once after a base URL is entered and displays one model.
pingdotgg/t3code#33147: Adds the text-generator feature and wizard whose form-submission behavior this change updates.
Suggested reviewers:maria-rcks, macroscopeapp
Merge Risk: Minimal · previous review 55f66
Pressing Enter in the text generator wizard now connects, the same as clicking Connect, and a disabled Connect button still blocks submission. No merge-blocking risk remains.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(web): Enter connects in the text generator wizard" names the primary change: pressing Enter in step 1 of the wizard now submits the form and connects. It follows conventional commit sty…
Description check
The description follows the template. It has Problem, Change, Scope, and Verification sections, each with substantive content. The Problem section gives the reproduction context. The Change section ex…
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 "fix(web): Enter connects in the text generator wizard" names the primary change: pressing Enter in step 1 of the wizard now submits the form and connects. It follows conventional commit style and matches the summary and objectives. It does not need to list the form ID or footer button change.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections, each with substantive content. The Problem section gives the reproduction context. The Change section explains the useId and type=submit approach and why the disabled-button guard still holds. The Scope section names one bug and one component. The Verification section gives before/after evidence, a new browser test result, and a list of what was not checked. It also includes the agent/model attribution the template asks for.
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; 5 remain after this review.
Evidence: real web app, Chromium 156 on Linux, 1280×800, dark theme, fresh isolated state and a synthetic two-model endpoint on both commits.
Steps: Settings → Providers → Add generator → Custom; Enter with empty Base URL; fill the endpoint URL and press Enter. Repeat in a fresh wizard with Name = Demo endpoint and Enter in Name. On base, click Connect after each failed Enter attempt as a control. Empty URL stayed on step one on both commits.
Scenario and synthetic endpoint driver. Recordings omit initial app loading and begin at the wizard. scenarios:prove exited 0: base failed and head passed.
Not shown:
Required API-key and secret-source validation were not exercised; this reproduction uses Custom without an API key.
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:XS0-9 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
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 Settings → Providers → Text generators → Add generator, step 1 (Connect) of the wizard ignores Enter in the Base URL, API key, or Name fields even when Connect is enabled; only clicking Connect works. The fields are inside a
<form>whoseonSubmitconnects, but the Connect / Save and continue button sits in the wizard footer outside the form as a plain button, so the form has no submit button and the browser never submits it on Enter.Change
TextGeneratorWizardinTextGeneratorsSettings.tsxnow gives the step 1<form>an id withuseId()and makes the footer's primary buttontype="submit" form={formId}(replacing itsonClick), matchingAddUsageLimitSourceDialog.tsx. Pressing Enter and clicking the button now both go through the form's existingonSubmit→connect().Unchanged: a disabled Connect button (missing required input or while connecting) still blocks submission, because the browser skips implicit submission through a disabled submit button and
connect()keeps its own guard. Cancel, Back, Done, and step 2 are untouched, and no key handler was added, so pressing Enter to confirm an IME composition does not submit.Scope
One bug: step 1 of the text generator wizard ignores Enter instead of connecting. One component (
TextGeneratorsSettings.tsx) and its browser test (TextGeneratorsSettings.browser.test.tsx). No issue: a small fix for an obvious bug with the direct repro below.Verification
An AI agent ran each check below.
Setup: Linux, Chromium (T3 Browser panel, incognito), 1280×800, isolated
vp run dev --no-seedserver with a local stand-in OpenAI-compatible endpoint that lists 3 synthetic models; main ran on11edf884, this PR on55f66a07.Steps: in Settings → Providers → Text generators, open Add generator → Custom, fill Base URL
http://localhost:11434/v1and NameDemo models(no API key), and press Enter in Base URL.11edf884(main)55f66a07(this PR)11edf884, pressing Enter sent no request and saved nothing; clicking Connect worked.55f66a07, pressing Enter sent one model-list request, saved the generator, and moved to step 2; clicking Back and then Connect also sent exactly one request (no double submit).submits step 1 of the text generator wizard on Enter when Connect is enabledinTextGeneratorsSettings.browser.test.tsxasserts that pressing Enter with an empty Base URL does not callcheckTextGeneratorConfig, and pressing Enter after typing a Base URL calls it once and shows step 2.11edf884(expected the check to be called once, got 0 times) and passes 3 of 3 runs on55f66a07with the file's other test.vp run check:changedpasses on55f66a07.Not checked:
Generated with Gemini 4 Neon in T3 Code Nightly