Keep blank pause errors inside conversation settings - #4
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR fixes blank pause-field handling by routing empty input through existing validation, adding browser-side required validation, and limiting HTMX 422 swaps to HTML responses so JSON errors do not appear in the settings card. It also updates host and firmware documentation to reflect that ESP-IDF 5.5.4 is active and COM15 is the observed USB serial device. Sequence diagram for blank pause validationsequenceDiagram
actor User
participant Browser
participant Settings as HostSettings
participant FastAPI
User->>Browser: Submit settings form
alt pause_seconds is blank
Browser-->>User: required validation
else form is submitted
Browser->>FastAPI: host_settings_save(request, profile, pause_seconds, idle_mode)
FastAPI->>Settings: validate pause_seconds
alt HTML validation response
Settings-->>Browser: 422 text/html
Browser->>Browser: Replace host-settings card
else JSON validation response
Settings-->>Browser: 422 application/json
Browser-->>User: Keep settings card unchanged
end
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
🟢 Approval recommended
The changes correctly contain HTML validation errors without exposing JSON responses in the settings card.
Pull request overview
Keeps blank pause validation within the settings card and updates Windows firmware handoff documentation.
Changes:
- Accept empty pause form values for application-level validation.
- Restrict HTMX 422 swaps to HTML responses and require the browser field.
- Refresh ESP-IDF and COM15 documentation.
File summaries
| File | Description |
|---|---|
bridge/dashboard.py |
Routes blank pause values through form validation. |
bridge/templates/host_settings.html |
Adds required validation and safe HTML-only swapping. |
firmware/STAKIA-BUILD.md |
Updates Windows setup status. |
docs/implementation-status.md |
Updates firmware handoff details. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
An empty speech-pause field could trigger FastAPI's JSON validation response, and the settings form's 422 handler could insert that JSON into the page.
Send empty pause input through the existing form validation, mark the field required in the browser, and replace the settings card only for HTML validation responses. Also update the Windows handoff to reflect the latest screenshot confirming ESP-IDF 5.5.4 is active and COM15 is listed as USB Serial Device.
Validation: 42 tests and 10 subtests passed locally with the pinned upstream fixture. Scoped code review closed with no outstanding findings. The repository tree matches the tested local checkout. Firmware compilation and physical device checks remain Windows bench steps.
This is a small follow-up to merged PRs #3 and #2. It does not block starting the firmware build from main.
Summary by Sourcery
Keep conversation settings validation contained to the settings card and refresh the Windows firmware setup status.
Bug Fixes:
Enhancements:
Documentation: