Skip to content

feat(ui): share one set of form controls - #67

Merged
oliverxu1996 merged 4 commits into
masterfrom
feat/form-primitives
Nov 28, 2026
Merged

oliverxu1996 merged 4 commits into
masterfrom
feat/form-primitives

Conversation

@oliverxu1996

@oliverxu1996 oliverxu1996 commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add shared Form, Field, Input, Select, Textarea and InlineNotice primitives under components/ui with sm/md sizes.
  • Move the new-session, new-bot, new-group, group-settings and bot-settings forms onto them.
  • Bot, group and bot-settings dialogs now submit their primary action on Enter; the template filter keeps Enter for filtering.
  • Restore the app-wide focus ring on fields, add an aria-invalid destructive treatment, and keep inline notice text at full contrast.

Verification

  • pnpm typecheck
  • pnpm test — 321 files / 3,084 tests passed with the watcher suites excluded (this host has exhausted fs.inotify.max_user_instances: 140 open vs a limit of 128).
  • pnpm build:app
  • pnpm smoke:ui — passed (evidence: artifacts/work6/ui-smoke.json, 25 steps)
  • pnpm smoke:bots — passed (evidence: artifacts/bots-smoke/bots-smoke.json)

Notes

  • Field associates its label with the control via htmlFor; hints and errors ride on aria-describedby, and an error also sets aria-invalid.
  • Form uses display: contents so wrapping the dialog body does not change layout, and noValidate leaves validation to the app.
  • Bot settings submits from the identity tab only; the skills and automations panes keep their own buttons and never submit the bot.
  • Sizes are minimums for single-line controls (sm 32px, md 36px); textareas take their own height.
  • The settings cards (AssistantSettingsCard and the other dense cards) still use their compact h-7 filled fields; they need an xs/filled variant and are left for a follow-up.

🤖 Generated with Claude Code

Add Field, Input, Select, Textarea and InlineNotice under components/ui with sm
and md sizes, then move the new-session and bot forms onto them.

- Field is a real label in row or stack layout, so clicking it focuses its
  control.
- Controls keep the app-wide focus ring, turn destructive from aria-invalid,
  and share one border/placeholder/disabled treatment.
- Inline notices keep their text at full contrast instead of dimming the tone.
Field now associates the label with htmlFor instead of wrapping the control, so
a hint no longer becomes part of the accessible name. Hints and errors render
through aria-describedby, and an error also sets aria-invalid.
Add a native Form wrapper (contents layout, noValidate) and use it in the
new-session, new-bot, new-group and group-settings dialogs. The primary button
is the form's submit target, so Enter in a field submits the dialog; the
template filter keeps Enter for itself.
Wrap the identity form in Form and point the Save button at it with the form
attribute while that tab is active. Other tabs keep the plain click save, so
the actions inside the skills and automations panes never submit the bot.
@oliverxu1996
oliverxu1996 merged commit e960e34 into master Nov 28, 2026
20 of 21 checks passed
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.

1 participant