Skip to content

fix(web): Enter connects in the text generator wizard - #42449

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
only21mil:fix/web-text-generator-wizard-enter
Nov 24, 2026
Merged

juliusmarminge merged 2 commits into
pingdotgg:mainfrom
only21mil:fix/web-text-generator-wizard-enter

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

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> 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)
11edf884: 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. 55f66a07: same inputs, Enter pressed in Base URL; the wizard connects and shows step 2 "Demo models is connected and lists 3 models".
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.

Generated with Gemini 4 Neon in T3 Code Nightly

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 24, 2026
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

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.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • 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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between dfa7321 and 55f66a0.

Files selected for processing: 2

  • apps/web/src/components/settings/TextGeneratorsSettings.browser.test.tsx
  • apps/web/src/components/settings/TextGeneratorsSettings.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 24, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

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.

Before 30f141e2e7 After 122338471e
Base URL Enter Before: stuck on Connect After: connected on step two
Name Enter Before: Name Enter does nothing After: Demo endpoint connected
Recording Before: Enter failures and successful click controls After: both Enter attempts connect

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.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 24, 2026
@juliusmarminge
juliusmarminge merged commit 9ca304d into pingdotgg:main Nov 24, 2026
56 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants