refactor(form): replace inline error text with tooltip icon

Instead of rendering error messages as `<small class="form-error">`
below inputs, errors now display as a circle-x icon inside the input
area. Hovering the icon shows the error text in a danger-styled tooltip.

- Wrap children in `.form-field-control` when error is present
- Use existing tooltip + icon components for the error indicator
- Add CSS for positioning, padding-right offset, and danger color overrides
- Update tests to match new structure
- Add pre-commit tmux server check instructions to AGENTS.md
This commit is contained in:
Florian Schroedl
2026-03-05 14:01:26 +01:00
parent d5473b1bbf
commit b52361ebf1
4 changed files with 105 additions and 17 deletions

View File

@@ -190,9 +190,28 @@ Add the component to all three dev targets so it renders in the visual test page
```sh
bb build-theme # Regenerate CSS with new component styles
bb test # All tests pass
bb dev-hiccup # Visual check
```
### 6. Check running dev servers before committing — CRITICAL
A tmux session `ui-dev` runs all three dev servers (`bb dev-all`). **Always check every pane for compile errors before committing:**
```sh
# List panes, then check each for errors
tmux list-panes -t ui-dev -F "#{pane_index}: #{pane_current_command}"
for i in $(tmux list-panes -t ui-dev -F "#{pane_index}"); do
echo "=== pane $i ==="
tmux capture-pane -t "ui-dev:bash.$i" -p -S -30 | grep -v '^$' | tail -10
done
```
Look for:
- **shadow-cljs** (Replicant): `Build failure`, warnings, or `CompilerException`
- **Vite/Squint**: `ERROR`, `SyntaxError`, or failed imports
- **Hiccup** (Babashka): stack traces or `Exception`
Do **not** commit if any pane shows errors. Fix them first.
## Theme System
### Token naming