Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(ui): adjust composer styles for consistent spacing

Steven Enamakelbc36ad37cc38
diff --git a/app/src/components/chat/composer/composerStyles.ts b/app/src/components/chat/composer/composerStyles.ts
index a45fb6e5b4..f3c675fef0 100644
--- a/app/src/components/chat/composer/composerStyles.ts
+++ b/app/src/components/chat/composer/composerStyles.ts
@@ -65,19 +65,9 @@ export const COMPOSER_DROPZONE =
* Only the placeholder colour is remapped. `disabled:` handling is appended:
* upstream has no disabled state because its composer is never locked, while
* this one is (see `composerInteractionBlocked` / `isSending`).
- *
- * `border-0` is also appended, and it is not cosmetic. `@plugin
- * '@tailwindcss/forms'` resets every bare `textarea` to `border-width: 1px`,
- * `border-color: gray-500`, `border-radius: 0` — so this textarea drew a sharp
- * grey rectangle inside the rounded dropzone at all times, turning blue on
- * focus. Upstream never hit it (no forms plugin) and every other textarea in
- * this app happens to set its own `border`/`rounded`, which outranks the reset;
- * this one deliberately sets neither, so it inherited the reset instead. The
- * focus affordance here is the dropzone's `focus-within:bg-surface-muted/75`,
- * which is why the input asks for `outline-hidden` and `ring-0` as well.
*/
export const COMPOSER_INPUT =
- 'max-h-32 min-h-14 w-full resize-none border-0 bg-transparent px-3.5 pt-3 pb-2 text-sm leading-5 ' +
+ 'max-h-32 min-h-14 w-full resize-none bg-transparent px-3.5 pt-3 pb-2 text-sm leading-5 ' +
'text-content outline-hidden placeholder:text-content-muted focus-visible:ring-0 ' +
'disabled:cursor-not-allowed disabled:opacity-50';
diff --git a/app/src/index.css b/app/src/index.css
index abb778f968..dd1a79c908 100644
--- a/app/src/index.css
+++ b/app/src/index.css
@@ -693,6 +693,27 @@
--tw-ring-offset-color: var(--color-background) !important;
}
+ /* Same plugin, its other half: the forms reset also gives every bare
+ `textarea` `border-width: 1px`, `border-color: gray-500` and
+ `border-radius: 0`. A textarea that styles itself never notices — its own
+ `border` utility outranks the reset on layer order, and all four in this
+ app (`ui/TextArea`, `PlanReviewCard`, `ShareCardModal`, the legacy chat
+ composer) do exactly that.
+
+ The ones that notice are the assistant-ui composers. They are written
+ against a registry that assumes no forms plugin: `bg-transparent`, no
+ border, the focus affordance carried by the wrapper instead. Under the
+ reset they drew a sharp grey rectangle inside their rounded pill at all
+ times, turning blue on focus.
+
+ So the default is flipped: no border unless a component asks for one,
+ which is the convention every textarea here already follows. Scoped to
+ `textarea` deliberately — the same reset on `input` is load-bearing for
+ bare checkboxes and radios, whose box IS that border. */
+ textarea {
+ border-width: 0;
+ }
+
/* Smooth scrolling */
html {
scroll-behavior: smooth;