* Add score fusion helpers for find_similar_objects chat tool
* Add candidate query builder for find_similar_objects chat tool
* register find_similar_objects chat tool definition
* implement _execute_find_similar_objects chat tool dispatcher
* Dispatch find_similar_objects in chat tool executor
* Teach chat system prompt when to use find_similar_objects
* Add i18n strings for find_similar_objects chat tool
* Add frontend extractor for find_similar_objects tool response
* Render anchor badge and similarity scores in chat results
* formatting
* filter similarity results in python, not sqlite-vec
* extract pure chat helpers to chat_util module
* Teach chat system prompt about attached_event marker
* Add parseAttachedEvent and prependAttachment helpers
* Add i18n strings for chat event attachments
* Add ChatAttachmentChip component
* Make chat thumbnails attach to composer on click
* Render attachment chip in user chat bubbles
* Add ChatQuickReplies pill row component
* Add ChatPaperclipButton with event picker popover
* Wire event attachments into chat composer and messages
* add ability to stop streaming
* tweak cursor to appear at the end of the same line of the streaming response
* use abort signal
* add tooltip
* display label and camera on attachment chip
* display area as proper percentage in debug view
* match replay objects list with debug view
* motion search fixes
- tweak progress bar to exclude heatmap and inactive segments
- show metrics immediately on search start
- fix preview frame loading race
- fix polygon missing after dialog remount
- don't try to drag the image when dragging vertex of polygon
* add activity indicator to storage metrics
* make sub label query for events API endpoints case insensitive
* fix mobile export crash by removing stale iOS non-modal drawer workaround
* Remove titlecase to avoid Gemma4 handling plain labels as proper nouns
* Improve titling:
* Make directions more clear
* Properly capitalize delivery services
* update dispatcher config reference on save
* subscribe to review topic so ReviewDescriptionProcessor knows genai is enabled
* auto-send ON genai review WS message when enabled_in_config transitions to true
* remove unused object level
* update docs to clarify pre/post capture settings
* add ui docs links
* improve known_plates field in settings UI
* only show save all when multiple sections are changed
or if the section being changed is not currently being viewed
* fix docs
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* refresh model dropdown after changing provider or base url
* decouple list_models from provider init
switching providers in the UI left an invalid model in the config, then _init_provider would fail and list_models would return an empty list, making it impossible to select a valid model
* add DictAsYamlField for genai provider and runtime options
* regenerate config translations
* chat tweaks
- add page title
- scroll if near bottom
- add tool call group that dynamically updates as tool calls are made
- add bouncing loading indicator and other UI polish
* tool call grouping
* Switch to a feature-based roles so it is easier to choose models for different tasks
* Fallback and try llama-swap format
* List models supported by provider
* Cleanup
* Add frontend
* Improve model loading
* Make it possible to update genai without restarting
* Cleanup
* Cleanup
* Mypy
* add ability to order subfields with dot notation
* put review genai enabled at the top of the genai subsection
* fix genai summary title truncation issue in detail stream
* add guards to reject missing sub commands
* mask/zone bugfixes
- fix websocket crash when creating a new mask or zone before a name is assigned
- fix deleted masks and zones not disappearing from the list until navigating away
- fix deleting profile override not reverting to the base mask in the list
- fix inertia defaulting to nan
* disable save button on invalid form state
* fix validation for speed estimation
* ensure polygon is closed before allowing save
* require all masks and zones to be on the base config
* clarify dialog message and tooltip when removing an override
* clarify docs
* set edgetpu for multi-instance
* improve error messages when mixing/matching detectors
* allow custom add button text via uiSchema
* clarify language in docs for configuring detectors via the UI
* add config messages to sections and fields
* add alert variants
* add messages to types
* add detect fps, review, and audio messages
* add a basic set of messages
* remove emptySelectionHintKey from switches widget
use the new messages framework and revert the changes made in #22664
* implement hook to return resolved "24hour" | "12hour" string
delegate to existing use24HourTime(), which correctly detects the browser's locale preference via Intl.DateTimeFormat
* update frontend to use use24HourTime(config) or useTimeFormat(config) instead of directly comparing config.ui.time_format
* embed cpu/mem stats into detectors, cameras, and processes
so history consumers don't need the full cpu_usages dict
* support dot-notation for nested keys
to avoid returning large objects when only specific subfields are needed
* fix setLastUpdated being called inside useMemo
this triggered a setState-during-render warning, so moved to a useEffect
* frontend types
* frontend
hide instead of unmount all graphs - re-rendering is much more expensive and disruptive than the amount of dom memory required
keep track of visited tabs to keep them mounted rather than re-mounting or mounting all tabs
add isActive prop to all charts to re-trigger animation when switching metrics tabs
fix chart data padding bug where the loop used number of series rather than number of data points
fix bug where only a shallow copy of the array was used for mutation
fix missing key prop causing console logs
* add isactive after rebase
* formatting
* skip None values in filtered output for dot notation
* add review labels widget
* register widget and add to review section
* i18n
* add border to switches widget
* padding tweaks
* don't show audio labels if audio is not enabled
* add docs links
* ability to add custom labels to review
* add hint for empty selection in review labels and SwitchesWidget
* language consistency
* tweak language
* show validation errors in json response
* fix export hwaccel args field in UI
* increase annotation offset consts
* fix save button race conditions, add reset spinner, and fix enrichments profile leak
- Disable both Save and SaveAll buttons while either operation is in progress so users cannot trigger concurrent saves
- Show activity indicator on Reset to Default/Global button during the API call
- Enrichments panes (semantic search, genai, face recognition) now always show base config fields regardless of profile selection in the header dropdown
* fix genai additional_concerns validation error with textarea array widget
The additional_concerns field is list[str] in the backend but was using the textarea widget which produces a string value, causing validation errors.
Created a TextareaArrayWidget that converts between array (one item per line) and textarea display, and switched additional_concerns to use it
* populate and sort global audio filters for all audio labels
* add column labels in profiles view
* enforce a minimum value of 2 for min_initialized
* reuse widget and refactor for multiline
* fix
* change record copy preset to transcode audio to aac
* Mark items as reviewed as a group with keyboard
* Improve handling of half model regions
* update viewport meta tag to prevent user scaling
fixes https://github.com/blakeblackshear/frigate/issues/22017
* add small animation to collapsible shadcn elements
* add proxy auth env var tests
* Improve search effect
* Fix mobile back navigation losing overlay state on classification page
* undo historyBack changes
* fix classification history navigation
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* add randomness to object classification
also ensure train_dir is fresh if user has regenerated examples
* frontend refresh button
* fix radix dropdown issue
* i18n
* mobile button spacing
* prevent console warning about div being descendant of p
* ensure consistent spacing
* add missing i18n keys
* i18n fixes
- add missing translations
- fix dot notation keys
* use plain string
* add missing key
* add i18next-cli commands for extraction and status
also add false positives removal for several keys
* add i18n key check step to PR workflow
* formatting
* fix genai settings ui
- add roles widget to select roles for genai providers
- add dropdown in semantic search to allow selection of embeddings genai provider
* tweak grouping to prioritize fieldOrder before groups
previously, groups were always rendered first. now fieldOrder is respected, and any fields in a group will cause the group and all the fields in that group to be rendered in order. this allows moving the enabled switches to the top of the section
* mobile tweaks
stack buttons, add more space on profiles pane, and move the overridden badge beneath the description
* language consistency
* prevent camera config sections from being regenerated for profiles
* conditionally import axengine module
to match other detectors
* i18n
* update vscode launch.json for new integrated browser
* formatting
* Add go2rtc settings section
- create separate settings section for all go2rtc streams
- extract credentials mask code into util
- create ffmpeg module utility
- i18n
* add camera config updater topic for live section
to support adding go2rtc streams after configuring a new one via the UI
* clean up
* tweak delete button color for consistency
* tweaks
* add CameraProfileConfig model for named config overrides
* add profiles field to CameraConfig
* add active_profile field to FrigateConfig
Runtime-only field excluded from YAML serialization, tracks which
profile is currently active.
* add ProfileManager for profile activation and persistence
Handles snapshotting base configs, applying profile overrides via
deep_merge + apply_section_update, publishing ZMQ updates, and
persisting active profile to /config/.active_profile.
* add profile API endpoints (GET /profiles, GET/PUT /profile)
* add MQTT and dispatcher integration for profiles
- Subscribe to frigate/profile/set MQTT topic
- Publish profile/state and profiles/available on connect
- Add _on_profile_command handler to dispatcher
- Broadcast active profile state on WebSocket connect
* wire ProfileManager into app startup and FastAPI
- Create ProfileManager after dispatcher init
- Restore persisted profile on startup
- Pass dispatcher and profile_manager to FastAPI app
* add tests for invalid profile values and keys
Tests that Pydantic rejects: invalid field values (fps: "not_a_number"),
unknown section keys (ffmpeg in profile), invalid nested values, and
invalid profiles in full config parsing.
* formatting
* fix CameraLiveConfig JSON serialization error on profile activation
refactor _publish_updates to only publish ZMQ updates for
sections that actually changed, not all sections on affected cameras.
* consolidate
* add enabled field to camera profiles for enabling/disabling cameras
* add zones support to camera profiles
* add frontend profile types, color utility, and config save support
* add profile state management and save preview support
* add profileName prop to BaseSection for profile-aware config editing
* add profile section dropdown and wire into camera settings pages
* add per-profile camera enable/disable to Camera Management view
* add profiles summary page with card-based layout and fix backend zone comparison bug
* add active profile badge to settings toolbar
* i18n
* add red dot for any pending changes including profiles
* profile support for mask and zone editor
* fix hidden field validation errors caused by lodash wildcard and schema gaps
lodash unset does not support wildcard (*) segments, so hidden fields like
filters.*.mask were never stripped from form data, leaving null raw_coordinates
that fail RJSF anyOf validation. Add unsetWithWildcard helper and also strip
hidden fields from the JSON schema itself as defense-in-depth.
* add face_recognition and lpr to profile-eligible sections
* move profile dropdown from section panes to settings header
* add profiles enable toggle and improve empty state
* formatting
* tweaks
* tweak colors and switch
* fix profile save diff, masksAndZones delete, and config sync
* ui tweaks
* ensure profile manager gets updated config
* rename profile settings to ui settings
* refactor profilesview and add dots/border colors when overridden
* implement an update_config method for profile manager
* fix mask deletion
* more unique colors
* add top-level profiles config section with friendly names
* implement profile friendly names and improve profile UI
- Add ProfileDefinitionConfig type and profiles field to FrigateConfig
- Use ProfilesApiResponse type with friendly_name support throughout
- Replace Record<string, unknown> with proper JsonObject/JsonValue types
- Add profile creation form matching zone pattern (Zod + NameAndIdFields)
- Add pencil icon for renaming profile friendly names in ProfilesView
- Move Profiles menu item to first under Camera Configuration
- Add activity indicators on save/rename/delete buttons
- Display friendly names in CameraManagementView profile selector
- Fix duplicate colored dots in management profile dropdown
- Fix i18n namespace for overridden base config tooltips
- Move profile override deletion from dropdown trash icon to footer
button with confirmation dialog, matching Reset to Global pattern
- Remove Add Profile from section header dropdown to prevent saving
camera overrides before top-level profile definition exists
- Clean up newProfiles state after API profile deletion
- Refresh profiles SWR cache after saving profile definitions
* remove profile badge in settings and add profiles to main menu
* use icon only on mobile
* change color order
* docs
* show activity indicator on trash icon while deleting a profile
* tweak language
* immediately create profiles on backend instead of deferring to Save All
* hide restart-required fields when editing a profile section
fields that require a restart cannot take effect via profile switching,
so they are merged into hiddenFields when profileName is set
* show active profile indicator in desktop status bar
* fix profile config inheritance bug where Pydantic defaults override base values
The /config API was dumping profile overrides with model_dump() which included
all Pydantic defaults. When the frontend merged these over
the camera's base config, explicitly-set base values were
lost. Now profile overrides are re-dumped with exclude_unset=True so only
user-specified fields are returned.
Also fixes the Save All path generating spurious deletion markers for
restart-required fields that are hidden during profile
editing but not excluded from the raw data sanitization in
prepareSectionSavePayload.
* docs tweaks
* docs tweak
* formatting
* formatting
* fix typing
* fix test pollution
test_maintainer was injecting MagicMock() into sys.modules["frigate.config.camera.updater"] at module load time and never restoring it. When the profile tests later imported CameraConfigUpdateEnum and CameraConfigUpdateTopic from that module, they got mock objects instead of the real dataclass/enum, so equality comparisons always failed
* remove
* fix settings showing profile-merged values when editing base config
When a profile is active, the in-memory config contains effective
(profile-merged) values. The settings UI was displaying these merged
values even when the "Base Config" view was selected.
Backend: snapshot pre-profile base configs in ProfileManager and expose
them via a `base_config` key in the /api/config camera response when a
profile is active. The top-level sections continue to reflect the
effective running config.
Frontend: read from `base_config` when available in BaseSection,
useConfigOverride, useAllCameraOverrides, and prepareSectionSavePayload.
Include formData labels in Object/Audio switches widgets so that labels
added only by a profile override remain visible when editing that profile.
* use rasterized_mask as field
makes it easier to exclude from the schema with exclude=True
prevents leaking of the field when using model_dump for profiles
* fix zones
- Fix zone colors not matching across profiles by falling back to base zone color when profile zone data lacks a color field
- Use base_config for base-layer values in masks/zones view so profile-merged values don't pollute the base config editing view
- Handle zones separately in profile manager snapshot/restore since ZoneConfig requires special serialization (color as private attr, contour generation)
- Inherit base zone color and generate contours for profile zone overrides in profile manager
* formatting
* don't require restart for camera enabled change for profiles
* publish camera state when changing profiles
* formatting
* remove available profiles from mqtt
* improve typing
The connect() function creates a WebSocket but never stores the
reference. The useEffect cleanup only closes the RTCPeerConnection
via pcRef, leaving the WebSocket open.
Each time the component re-renders with changed deps (camera switch,
playback toggle, microphone toggle), a new WebSocket is created
without closing the previous one. This leaks connections until the
browser garbage-collects them or the server times out.
Store the WebSocket in a ref and close it in the cleanup function.
* add shm frame lifetime calculation and update UI for shared memory metrics
* consistent sizing on activity indicator in save buttons
* fix offline overlay overflowing on mobile when in grid mode
* refactor websockets to remove react-tracked
react 19 removed useReducer eager bailout, which broke react-tracked.
react-tracked works by wrapping state in a JavaScript Proxy. When a component reads state.someField, the proxy records that access. On the next state update, it compares only the fields each component actually touched and skips re-renders if those fields are unchanged. Under the hood, this relies on useReducer — and in React 18, useReducer had an "eager bail-out" that short-circuited rendering when the new state was === to the old state. React 19 removed that optimization, so every dispatch now schedules a render regardless, and the proxy comparison runs too late to prevent it.
useSyncExternalStore is a React primitive (added in 18, stable in 19) designed for exactly this pattern: subscribing to an external store:
useSyncExternalStore(
subscribe, // (listener) => unsubscribe — called when the store changes
getSnapshot // () => value — returns the current value for this subscriber
)
React calls getSnapshot during render and compares the result with Object.is. If the value is the same reference, the component bails out — no re-render. The key difference from react-tracked is that this bail-out is built into React's reconciler, not bolted on via proxy tricks and useReducer.
The per-topic subscription model makes this efficient. Instead of one global store where every subscriber has to check if their fields changed, each useWs("some/topic", ...) call subscribes only to that topic's listener set. When a message arrives for front_door/detect/state, only components subscribed to that exact topic get their listener fired → React calls their getSnapshot → Object.is compares the value → bail-out if unchanged. Components watching back_yard/detect/state are never even notified.
* remove react-tracked and react-use-websocket
* refactor usePolygonStates to use ws topic subscription
* fix TimeAgo refresh interval always returning 1s due to unit mismatch (seconds vs milliseconds)
older events now correctly refresh every minute/hour instead of every second
* simplify
* clean up
* don't resend onconnect
* clean up
* remove patch
* optimize recordings/summary endpoint db query
replace strftime with integer arithmetic. increases speed by about 6x, especially noticeable for installs with long retention days
* optimize calendar rendering with Set lookups and remove unnecessary remount key
The old code built Date[] arrays with a TZDate object for every day in recording history (365+ timezone-aware date constructions). react-day-picker then did O(visible × history) date comparisons to match each of the displayed days against these arrays. Now we build Set<string> from the raw keys (zero date construction), and pass matcher functions that do O(1) Set.has() lookups. react-day-picker only calls these for visible days
* clean up
* add optional field widget
adds a switch to enable nullable fields like skip_motion_threshold
* config field updates
add skip_motion_threshold optional switch
add fps back to detect restart required
* don't use ternary operator when displaying motion previews
the main previews were being unnecessarily unmounted
* lazy mount motion preview clips to reduce DOM overhead