Skip to content

fix: input-group don't have the proper validation attributes - #44703

Merged
dnywh merged 18 commits into
masterfrom
fix-input-groups-ux
Apr 10, 2026
Merged

dnywh merged 18 commits into
masterfrom
fix-input-groups-ux

Conversation

@djhi

@djhi djhi commented Apr 9, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The input groups components introduced in #44282 don't have the validation attributes when invalid. This hurts accessibility and also break the design:
image

Solution

This is because the wrapper <FormControl_Shadcn_> passes the validation props to its direct child.
The solution is to avoid applying them on the <InputGroup> and to apply them manually on the inputs.

I also fixed a small accessibility issue by moving the addon texts after the input so that screen readers announce them in the correct order. No visual change for this

image

Summary by CodeRabbit

  • Style

    • Unified numeric input layout by moving unit labels/suffixes (e.g., "seconds", "GB", "%", "connections", "digits", "IOPS", "MB/s", "rows") to appear after their inputs for a consistent, predictable form appearance.
  • Accessibility

    • Form controls now expose IDs and ARIA attributes from form context when available, improving screen-reader descriptions and error association.

@djhi
djhi requested review from a team as code owners April 9, 2026 08:18
@supabase

supabase Bot commented Apr 9, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@vercel

vercel Bot commented Apr 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview, Comment Apr 9, 2026 2:57pm
docs Ready Ready Preview, Comment, Open in v0 Apr 9, 2026 2:57pm
learn Ready Ready Preview, Comment Apr 9, 2026 2:57pm
studio-self-hosted Ready Ready Preview, Comment Apr 9, 2026 2:57pm
studio-staging Ready Ready Preview, Comment Apr 9, 2026 2:57pm
ui-library Ready Ready Preview, Comment Apr 9, 2026 2:57pm
zone-www-dot-com Ready Ready Preview, Comment, Open in v0 Apr 9, 2026 2:57pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Apr 9, 2026 2:57pm

Request Review

@coderabbitai

coderabbitai Bot commented Apr 9, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Reordered InputGroupAddon elements to render after InputGroupInput across many form components, and updated the core InputGroup implementation to be a client component that integrates with useFormField and applies form-derived ARIA attributes (id, aria-invalid, aria-describedby).

Changes

Cohort / File(s) Summary
Auth UI
apps/studio/components/interfaces/Auth/AuthProvidersForm/FormField.tsx, apps/studio/components/interfaces/Auth/MfaAuthSettingsForm/MfaAuthSettingsForm.tsx, apps/studio/components/interfaces/Auth/PerformanceSettingsForm.tsx, apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx, apps/studio/components/interfaces/Auth/SessionsAuthSettingsForm/SessionsAuthSettingsForm.tsx, apps/studio/components/interfaces/Auth/SmtpForm/SmtpForm.tsx
Moved InputGroupAddon/text elements to render after InputGroupInput in numeric fields; no changes to input props, handlers, validation, or form logic.
Database & Replication
apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx, apps/studio/components/interfaces/Settings/Database/DiskSizeConfigurationModal.tsx
Reordered addon/input within InputGroups for numeric/disabled fields; one InputGroup nesting adjusted in the Disk Size modal; bindings and behavior unchanged.
Connection Pooling
apps/studio/components/interfaces/Settings/Database/ConnectionPooling/ConnectionPooling.tsx
Moved addon placement for pool/client numeric fields; input bindings, disabled state, and conditional rendering unchanged.
Disk Management
apps/studio/components/interfaces/DiskManagement/fields/AutoScaleFields.tsx, apps/studio/components/interfaces/DiskManagement/fields/DiskSizeField.tsx, apps/studio/components/interfaces/DiskManagement/fields/IOPSField.tsx, apps/studio/components/interfaces/DiskManagement/fields/ThroughputField.tsx
Moved unit addons (%, GB, IOPS, MB/s) to follow inputs; event handling, validation, and state updates preserved.
Realtime, JWT & API Settings
apps/studio/components/interfaces/Realtime/RealtimeSettings.tsx, apps/studio/components/interfaces/JwtSecrets/jwt-settings.tsx, apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx
Reordered addons to appear after inputs for realtime, JWT expiry, and PostgREST numeric fields; no behavioral changes.
Misc UI forms
apps/studio/components/interfaces/Auth/PerformanceSettingsForm.tsx, apps/studio/components/interfaces/Auth/MfaAuthSettingsForm/MfaAuthSettingsForm.tsx, apps/studio/components/interfaces/Auth/SessionsAuthSettingsForm/SessionsAuthSettingsForm.tsx
Consistent reordering of addon/input across additional numeric fields; preserved disabled/loading and summary logic.
Core InputGroup (UI package)
packages/ui/src/components/shadcn/ui/input-group.tsx
Added 'use client'; integrated useFormField() (wrapped in try/catch) into InputGroupInput/InputGroupTextarea; set form-derived id, computed aria-invalid, and conditional aria-describedby on controls; extended InputGroup props to accept id, aria-invalid, and aria-describedby.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped through JSX in soft moonlight,
Swapped addons to the right with delight,
I hummed an id, set aria right,
Tiny changes, tidy sight,
Inputs snug — the form feels light!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change—fixing input-group components to have proper validation attributes when invalid.
Description check ✅ Passed The description provides context (problem with validation attributes), the solution (applying attributes to inputs instead of wrapper), and includes screenshots demonstrating the fix.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-input-groups-ux

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@apps/studio/components/interfaces/Settings/Database/DiskSizeConfigurationModal.tsx`:
- Around line 199-209: The FormControl_Shadcn_ is currently wrapping both
InputGroupInput and InputGroupAddon which alters composition and can break
validation/prop forwarding; update the JSX so that InputGroup contains two
direct children: a FormControl_Shadcn_ that wraps only the InputGroupInput (pass
{...field}, id, type, onChange to InputGroupInput inside FormControl_Shadcn_),
and an InputGroupAddon as the sibling (with InputGroupText "GB") so the addon is
not nested inside FormControl_Shadcn_. Ensure InputGroup remains the parent
element.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 070b0e3c-0b4c-42be-8fee-87327a494f07

📥 Commits

Reviewing files that changed from the base of the PR and between 40ce2a1 and abc39a4.

📒 Files selected for processing (17)
  • apps/studio/components/interfaces/Auth/AuthProvidersForm/FormField.tsx
  • apps/studio/components/interfaces/Auth/MfaAuthSettingsForm/MfaAuthSettingsForm.tsx
  • apps/studio/components/interfaces/Auth/PerformanceSettingsForm.tsx
  • apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx
  • apps/studio/components/interfaces/Auth/SessionsAuthSettingsForm/SessionsAuthSettingsForm.tsx
  • apps/studio/components/interfaces/Auth/SmtpForm/SmtpForm.tsx
  • apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx
  • apps/studio/components/interfaces/DiskManagement/fields/AutoScaleFields.tsx
  • apps/studio/components/interfaces/DiskManagement/fields/DiskSizeField.tsx
  • apps/studio/components/interfaces/DiskManagement/fields/IOPSField.tsx
  • apps/studio/components/interfaces/DiskManagement/fields/ThroughputField.tsx
  • apps/studio/components/interfaces/JwtSecrets/jwt-settings.tsx
  • apps/studio/components/interfaces/Realtime/RealtimeSettings.tsx
  • apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx
  • apps/studio/components/interfaces/Settings/Database/ConnectionPooling/ConnectionPooling.tsx
  • apps/studio/components/interfaces/Settings/Database/DiskSizeConfigurationModal.tsx
  • packages/ui/src/components/shadcn/ui/input-group.tsx

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Additional findings (outside current diff — PR may have been updated during review):

  • 🔴 packages/ui/src/components/shadcn/ui/input-group.tsx:133-160 — InputGroupInput and InputGroupTextarea now unconditionally call useFormField() (input-group.tsx lines 136 and 162), which calls useFormContext() from react-hook-form. Since react-hook-form creates its context with createContext(null), calling these components outside a <Form_Shadcn_> or wrapper throws a TypeError: 'Cannot destructure property of null'. The ui-patterns DataInputs/Input.tsx wrapper uses InputGroupInput directly without any form context (lines 75-88), and that component is used throughout the studio (e.g., DisplayApiSettings.tsx, FilterPopover.tsx) without form context — those call sites will crash at render time after this PR.

    Extended reasoning...

    What the bug is and how it manifests

    InputGroupInput and InputGroupTextarea now call useFormField() unconditionally at render time (input-group.tsx lines ~136 and ~162). useFormField() calls useFormContext() from react-hook-form internally (form.tsx line 47). In react-hook-form v7, useFormContext() is created via createContext(null), so it returns null when there is no FormProvider ancestor. The code then does:

    const { getFieldState, formState } = useFormContext()

    When useFormContext() returns null, this destructuring throws: TypeError: Cannot destructure property 'getFieldState' of null.

    The specific code path that triggers it

    packages/ui-patterns/src/DataInputs/Input.tsx renders InputGroupInput directly (lines 75-88) without wrapping it in a Form_Shadcn_ or FormProvider. That Input component is used as a general-purpose UI primitive, not a form-specific component. Callers like DisplayApiSettings.tsx, FilterPopover.tsx, ColumnList.tsx, and TableList.tsx render this Input component outside any form context. After this PR, every such call site will crash on render.

    Why existing code does not prevent this

    The PR author noted that FormControl_Shadcn_ passes id, aria-invalid, and aria-describedby to InputGroup, and that InputGroupInput needs to read these itself. The chosen fix was to call useFormField() directly inside InputGroupInput/InputGroupTextarea. However, useFormField() has no graceful fallback when called outside a FormProvider - it relies on FormContext being non-null, and throws on null. The null check at form.tsx line 51 (if (!fieldContext)) is dead code because FormFieldContext defaults to an empty object {} (truthy), so the guard never triggers and the crash happens at the useFormContext() call above it.

    What the impact would be

    Any consumer of InputGroupInput or InputGroupTextarea that is not inside a Form_Shadcn_/FormProvider will throw a TypeError and crash, producing a broken UI. The most immediate impact is the general-purpose ui-patterns Input wrapper, which is used in non-form UI across the studio - search/filter UIs, API settings displays, column/table list sidebars, etc.

    How to fix it

    Use a defensive check before destructuring. For example, wrap useFormContext() in a try/catch, or check whether the context is non-null before calling useFormField(). A cleaner alternative is to introduce a dedicated React context to pass form field state from InputGroup down to its children, avoiding the dependency on FormProvider altogether.

    Step-by-step proof

    1. User renders Input copy reveal from ui-patterns/DataInputs/Input.tsx outside any form.
    2. Input.tsx renders InputGroupInput at line ~83.
    3. InputGroupInput calls useFormField() unconditionally at line ~136 of input-group.tsx.
    4. useFormField() calls useFormContext() (form.tsx line 47), which returns null (no FormProvider in tree).
    5. const { getFieldState, formState } = null throws TypeError.
    6. React renders an error boundary or blank screen for that component subtree.

@github-actions

github-actions Bot commented Apr 9, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results

passed  187 passed
flaky  4 flaky
skipped  4 skipped

Details

stats  195 tests across 22 suites
duration  15 minutes, 8 seconds
commit  b1b202f

Flaky tests

Features › database-webhooks.spec.ts › Database Webhooks › can edit a webhook with correct toast message
Features › queue-table-operations.spec.ts › Queue Table Operations › pending changes persist when switching between tables
Features › table-editor.spec.ts › table editor › row insert via side panel saves immediately
Features › table-editor.spec.ts › table editor › editing multiple columns via side panel saves all changes

Skipped tests

Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/ui/src/components/shadcn/ui/input-group.tsx`:
- Around line 165-167: The aria-describedby construction currently concatenates
possibly undefined IDs (formItemId, formDescriptionId, formMessageId) causing
strings like "undefined" to be serialized; update the logic in the component
that uses useFormField() (and in the related block around lines using
formItemId/formDescriptionId/formMessageId) to build an array of only defined
IDs, join them with a space, and pass undefined when the resulting string is
empty so aria-describedby is either a valid id list or undefined; ensure the
same fix is applied to the other occurrence referenced (the block that sets
aria-describedby for InputGroupInput/InputGroupTextarea).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 2a6dd159-c71a-4bd4-97f9-19dc698e2ea0

📥 Commits

Reviewing files that changed from the base of the PR and between 295c7a6 and 1502ea3.

📒 Files selected for processing (2)
  • apps/studio/components/interfaces/Auth/PerformanceSettingsForm.tsx
  • packages/ui/src/components/shadcn/ui/input-group.tsx
✅ Files skipped from review due to trivial changes (1)
  • apps/studio/components/interfaces/Auth/PerformanceSettingsForm.tsx

Comment thread packages/ui/index.tsx Resolved

@dnywh dnywh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on staging and locally. Works as expected. Merging so I can base #44690 on these changes, since they both touch packages/ui/src/components/shadcn/ui/input-group.tsx.

@dnywh
dnywh merged commit d95fdfd into master Apr 10, 2026
24 checks passed
@dnywh
dnywh deleted the fix-input-groups-ux branch April 10, 2026 01:45
@github-actions

github-actions Bot commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1775785634)

Score Average Improvements Regressions
Completeness 100% (+2pp) 1 🟢 -
Conciseness 25.5% (+3pp) 5 🟢 3 🔴
Goal Completion 92.2% (+2pp) 2 🟢 -
Knowledge Usage 100% (+0pp) - -
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+7.000000000000001pp) 1 🟢 -
Tool Usage 73.8% (-2pp) - 1 🔴
Docs Faithfulness 73.2% (+4pp) 4 🟢 1 🔴
Correctness 100% (+0pp) - -
URL Validity 66.7% (-33pp) - 1 🔴
Time_to_first_token 0.01tok (0tok) 12 🟢 5 🔴
Llm_calls 12.47 (-0.39) 4 🟢 9 🔴
Tool_calls 3.41 (-0.25) 6 🟢 9 🔴
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 24147.33tok (-583.55tok) 9 🟢 8 🔴
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 676.49tok (+25.8tok) 8 🟢 9 🔴
Completion_reasoning_tokens 0tok (+0tok) - -
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 24823.82tok (-557.75tok) 9 🟢 8 🔴
Estimated_cost 0.01$ (0$) 7 🟢 7 🔴
Duration 15.93s (-0.56s) 11 🟢 6 🔴
Llm_duration 39.32s (-1.18s) 9 🟢 8 🔴

dnywh added a commit that referenced this pull request Apr 10, 2026
## What kind of change does this PR introduce?

Bug fix. Resolves FE-2959.

## What is the current behaviour?

Grouped inputs strip the inner control border with `border-0`, while the
outer `InputGroup` is responsible for the visible outline. After #44703,
grouped form inputs now receive the correct validation attributes, but
the primitive still removes the inner border dimensions entirely. That
keeps the visual layer brittle and can lead to inconsistent error
rendering, especially in light mode where the grouped password field
does not match the Project name input.

The shared `ui-patterns` input wrapper also inherits the generic
`inline-end` button spacing from `InputGroupAddon`, which pushes the
password copy button slightly too far to the right.

## What is the new behaviour?

The shared grouped-input primitive now keeps a transparent inner border
instead of removing border widths entirely. The outer `InputGroup`
continues to own the visible border, focus ring and error treatment, but
the inner control now has stable border metrics and no redundant
dark-mode background override.

The grouped invalid state now also matches the plain input treatment
more closely:

- unfocused error border uses `destructive-400`
- focused error border uses `destructive`
- error background uses `destructive-200`

The `ui-patterns` input wrapper now overrides the inherited `inline-end`
negative margin for its own copy/reveal button addon, so the password
copy button sits in the right place without changing spacing for other
direct `InputGroup` consumers.

| Before | After |
| --- | --- |
| <img width="1338" height="284" alt="CleanShot 2026-04-09 at 13 43
50@2x-91489355-5EEA-4884-BAA2-B93B28F1D7CB"
src="https://github.com/user-attachments/assets/ed40683b-8a87-4deb-8a0f-f892d00894f0"
/>| <img width="1334" height="278" alt="CleanShot 2026-04-09 at 13 41
36@2x-5D7E930B-EDB2-4002-9367-34ACE2DF4DB4"
src="https://github.com/user-attachments/assets/7d9594a4-9988-480e-a809-9f5ed29e8e24"
/> |
| <img width="1336" height="210" alt="CleanShot 2026-04-09 at 14 06
15@2x-05379F74-4CA5-4E6E-9250-CBA2764C1318"
src="https://github.com/user-attachments/assets/25e48cd4-de0a-47f3-9022-d7a3829a0626"
/> | <img width="1334" height="210" alt="CleanShot 2026-04-09 at 14 12
11@2x-11FBC519-D398-4A59-971A-97FBFEF610DE"
src="https://github.com/user-attachments/assets/91c3710c-7773-4286-854d-7b7144db85ab"
/> |

An easy place to test this is the Database password field in the New
Project creation flow. See also the Minimum password length field in
Email (Sign In / Providers).

## Summary

- update `packages/ui/src/components/shadcn/ui/input-group.tsx`
- replace `border-0` on grouped inputs/textareas with transparent
borders
- remove the redundant `dark:bg-transparent`
- keep the inner grouped controls visually neutral so the outer group
owns the rendered border state
- align grouped invalid border and background styling with the plain
input treatment
- update `packages/ui-patterns/src/DataInputs/Input.tsx` so copy/reveal
buttons do not inherit the extra right pull intended for other
`inline-end` addons
ignaciodob pushed a commit that referenced this pull request Apr 11, 2026
## Problem

The input groups components introduced in #44282 don't have the
validation attributes when invalid. This hurts accessibility and also
break the design:
<img width="1730" height="324" alt="image"
src="https://github.com/user-attachments/assets/a3fb8d86-f3a8-46bb-aa53-d0599c11f056"
/>

## Solution

This is because the wrapper `<FormControl_Shadcn_>` passes the
validation props to its direct child.
The solution is to avoid applying them on the `<InputGroup>` and to
apply them manually on the inputs.

I also fixed a small accessibility issue by moving the addon texts after
the input so that screen readers announce them in the correct order. No
visual change for this

<img width="587" height="158" alt="image"
src="https://github.com/user-attachments/assets/1f8858ea-6659-45f9-964e-8c43a7fe14ba"
/>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Style**
* Unified numeric input layout by moving unit labels/suffixes (e.g.,
"seconds", "GB", "%", "connections", "digits", "IOPS", "MB/s", "rows")
to appear after their inputs for a consistent, predictable form
appearance.

* **Accessibility**
* Form controls now expose IDs and ARIA attributes from form context
when available, improving screen-reader descriptions and error
association.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Ivan Vasilov <[email protected]>
ignaciodob pushed a commit that referenced this pull request Apr 11, 2026
## What kind of change does this PR introduce?

Bug fix. Resolves FE-2959.

## What is the current behaviour?

Grouped inputs strip the inner control border with `border-0`, while the
outer `InputGroup` is responsible for the visible outline. After #44703,
grouped form inputs now receive the correct validation attributes, but
the primitive still removes the inner border dimensions entirely. That
keeps the visual layer brittle and can lead to inconsistent error
rendering, especially in light mode where the grouped password field
does not match the Project name input.

The shared `ui-patterns` input wrapper also inherits the generic
`inline-end` button spacing from `InputGroupAddon`, which pushes the
password copy button slightly too far to the right.

## What is the new behaviour?

The shared grouped-input primitive now keeps a transparent inner border
instead of removing border widths entirely. The outer `InputGroup`
continues to own the visible border, focus ring and error treatment, but
the inner control now has stable border metrics and no redundant
dark-mode background override.

The grouped invalid state now also matches the plain input treatment
more closely:

- unfocused error border uses `destructive-400`
- focused error border uses `destructive`
- error background uses `destructive-200`

The `ui-patterns` input wrapper now overrides the inherited `inline-end`
negative margin for its own copy/reveal button addon, so the password
copy button sits in the right place without changing spacing for other
direct `InputGroup` consumers.

| Before | After |
| --- | --- |
| <img width="1338" height="284" alt="CleanShot 2026-04-09 at 13 43
50@2x-91489355-5EEA-4884-BAA2-B93B28F1D7CB"
src="https://github.com/user-attachments/assets/ed40683b-8a87-4deb-8a0f-f892d00894f0"
/>| <img width="1334" height="278" alt="CleanShot 2026-04-09 at 13 41
36@2x-5D7E930B-EDB2-4002-9367-34ACE2DF4DB4"
src="https://github.com/user-attachments/assets/7d9594a4-9988-480e-a809-9f5ed29e8e24"
/> |
| <img width="1336" height="210" alt="CleanShot 2026-04-09 at 14 06
15@2x-05379F74-4CA5-4E6E-9250-CBA2764C1318"
src="https://github.com/user-attachments/assets/25e48cd4-de0a-47f3-9022-d7a3829a0626"
/> | <img width="1334" height="210" alt="CleanShot 2026-04-09 at 14 12
11@2x-11FBC519-D398-4A59-971A-97FBFEF610DE"
src="https://github.com/user-attachments/assets/91c3710c-7773-4286-854d-7b7144db85ab"
/> |

An easy place to test this is the Database password field in the New
Project creation flow. See also the Minimum password length field in
Email (Sign In / Providers).

## Summary

- update `packages/ui/src/components/shadcn/ui/input-group.tsx`
- replace `border-0` on grouped inputs/textareas with transparent
borders
- remove the redundant `dark:bg-transparent`
- keep the inner grouped controls visually neutral so the outer group
owns the rendered border state
- align grouped invalid border and background styling with the plain
input treatment
- update `packages/ui-patterns/src/DataInputs/Input.tsx` so copy/reveal
buttons do not inherit the extra right pull intended for other
`inline-end` addons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants