Skip to content

UI fixes#23127

Merged
hawkeye217 merged 21 commits intodevfrom
ui-fixes
May 7, 2026
Merged

UI fixes#23127
hawkeye217 merged 21 commits intodevfrom
ui-fixes

Conversation

@hawkeye217
Copy link
Copy Markdown
Collaborator

@hawkeye217 hawkeye217 commented May 6, 2026

Please read the contributing guidelines before submitting a PR.

Proposed change

This PR makes a number of changes to the frontend:

  • Hide camera overrides badge from all System sections in Settings
  • Show empty card on camera metrics page when no cameras are defined
  • Show correct enabled switch state in the Camera Management pane after adding a camera via the Wizard
  • Guard camera enabled access in use-stats for new cameras added via the Wizard
  • Fix useOptimisticState dropping debounced setState under StrictMode
    • The mount-only cleanup in useOptimisticState cleared the pending setTimeout when strict mode re-ran effects, so the debounced setState never fired and Settings panes wouldn't switch on URL navigation. The fix was to move the debounce into an effect keyed on the optimistic value so its cleanup only cancels the timer it scheduled, and keep the external-sync guard so strict mode's stale-closure re-run can't clobber in-flight optimistic updates.
  • Sync object filter entries with tracked labels
    • When switching to a profile, object filter collapsibles did not show the correct object label list
  • Revalidate raw paths swr cache after config save so CameraPathWidget shows updated credentials
  • Keep recording button in single camera live view disabled until recording is enabled in config
  • Improve override detection for sections unset in the global config - consolidate and use a single helper function
  • Add support for config-aware pattern in hiddenFields, fixes an issue where objects and attribute_map interaction would cause the override badge to be incorrectly shown
  • Small language tweaks and field error conditions
  • Add special case for genai provider field - prevent validation errors from appearing on initial creation of genai provider by setting the first option in the select dropdown as default.

Backend:

  • Use OpenVINO on CPU as default detector and add detector and model to auto-generated config
  • Restore masked ffmpeg credentials when persisting camera config
    • The /config response masks RTSP credentials as *:*, so the settings UI ships them back unchanged when sibling fields like hwaccel_args are edited, clobbering the real credentials in yaml. This uses similar logic as clean_camera_user_pass and swaps any incoming *:*@ (or user=*&password=*) ffmpeg input path with the existing in-memory value before writing the yaml config.
  • Rebuild ffmpeg commands when enabling recording for the first time
    • Toggling record.enabled from the config UI updated the in-memory config but left ffmpeg running with its original command, so the record output args were never wired in and nothing landed in the cache for the maintainer to move. The record config update now rebuilds ffmpeg_cmds when enabled_in_config transitions, and the camera watchdog restarts ffmpeg on a false to true transition so the record output gets wired in. MQTT toggles, which only flip record.enabled at runtime, are unaffected and continue to work via the maintainer's drop/keep gate.
  • Make genai provider a required field

Docs:

  • Update docs for new default detector

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code
  • Documentation Update

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to discussion with maintainers (required for any large or "planned" features):

For new features

  • There is an existing feature request or discussion with community interest for this change.
    • Link:

AI disclosure

  • No AI tools were used in this PR.
  • AI tools were used in this PR. Details below:

AI tool(s) used (e.g., Claude, Copilot, ChatGPT, Cursor):

How AI was used (e.g., code generation, code review, debugging, documentation):

Extent of AI involvement (e.g., generated entire implementation, assisted with specific functions, suggested fixes):

Human oversight: Describe what manual review, testing, and validation you performed on the AI-generated portions.

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I can explain every line of code in this PR if asked.
  • UI changes including text have used i18n keys and have been added to the en locale.
  • The code has been formatted using Ruff (ruff format frigate)

hawkeye217 added 10 commits May 6, 2026 11:43
Cameras added mid-session have no WS state until the dispatcher publishes camera_activity (which only happens on a fresh onConnect). Fall back to the config's enabled value so the switch reflects reality immediately after the wizard closes.
console would throw errors after adding via camera wizard
- faster than tflite on cpu
- add to default generated config
the frontend will then render this as a select dropdown because of the changes in the json schema
Filter sub-collapsibles in the camera Objects section are driven by `filters` dict keys, but profile merges and live track-switch edits don't add matching entries, so newly tracked labels (like from a profile override) had no collapsible. Synthesize default filter entries from `track` in the form data so every tracked label renders a collapsible; baseline data also gets the synthesized entries, so save payloads are unchanged.
@hawkeye217 hawkeye217 marked this pull request as draft May 6, 2026 20:52
hawkeye217 added 10 commits May 6, 2026 15:55
Toggling record.enabled from the config UI updated the in-memory config but left ffmpeg running with its original command, so the record output args were never wired in and nothing landed in the cache for the maintainer to move. The record config update now rebuilds ffmpeg_cmds when enabled_in_config transitions, and the camera watchdog restarts ffmpeg on a false to true transition so the record output gets wired in. MQTT toggles, which only flip record.enabled at runtime, are unaffected and continue to work via the maintainer's drop/keep gate.
Override badges and the blue dot now compare against schema defaults for sections like motion that the API serializes as null when omitted from the global YAML, instead of treating any populated camera config as an override
Section configs can now declare dynamic hidden-field entries as functions of the loaded config; objects.ts uses this to hide auto-populated attribute filters (DHL, face, license_plate, etc.) from the form, save flow, and override popover when those labels aren't user-settable
live updating was getting very messy. users will just need to save once they enable a new object in order to see filters for that object
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying frigate with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6ca60dd
Status: ✅  Deploy successful!
Preview URL: https://e0ce7084.frigate.pages.dev
Branch Preview URL: https://ui-fixes.frigate.pages.dev

View logs

prevent validation errors from appearing on initial creation of genai provider by setting the first option in the select dropdown as default
@hawkeye217 hawkeye217 marked this pull request as ready for review May 7, 2026 13:49
@hawkeye217 hawkeye217 merged commit d0f44de into dev May 7, 2026
10 checks passed
@hawkeye217 hawkeye217 deleted the ui-fixes branch May 7, 2026 13:53
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.

2 participants