* Raise a rate limit error when Frigate+ returns 429
The shared session's urllib3 Retry honored Retry-After by default, so a
429 on a GET or PUT blocked the calling thread for up to ten times the
requested wait (and fell back to exponential backoff for Retry-After: 0)
before failing with a generic error.
Stop honoring Retry-After in urllib3 and raise PlusRateLimitError with
the parsed wait instead. Retry-After is parsed as either delay-seconds or
an HTTP date per RFC 9110. While the wait is in effect, further requests
are refused locally rather than sent to Frigate+ again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Don't save a failed Frigate+ model download as the model
The model download never checked the response status, so an error body
(a 429 from the download host, for example) was written to the model
cache. Only the file's existence is checked on later starts, so the
error page was loaded as the model from then on.
Raise a config error instead of writing the file, and explain a Frigate+
rate limit at startup with how long to wait when it is known.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Report a rate limited Frigate+ key validation
A 429 while validating the API key was reported as "unreachable". Add a
rate_limited status that records the Retry-After wait, skip asking the
server again while that wait is in effect, and include the remaining
seconds in the /plus/validate response.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Return 429 from the API when Frigate+ is rate limiting
Submitting an event, frame, or false positive reported a rate limit as a
generic 400 upload error, and listing models failed with a 500. Return a
429 with the wait in retry_after and the Retry-After header so the UI can
tell the user how long to wait.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Show Frigate+ rate limits in the UI
Tell the user Frigate+ is rate limiting requests, and how long to wait
when the server said, instead of a generic failure:
- submitting a tracked object or false positive (explore and the review
dialog), a frame from the player, or a frame from tracking details
- validating the API key in Frigate+ settings
- the Frigate+ model list in detection model settings and the setup
wizard
The frame upload from the player also showed failures with a success
toast, and since axios rejects on error statuses it never reached that
branch at all, so failed uploads showed nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Let a failed Frigate+ annotation be retried
send_to_plus saved plus_id as soon as the image uploaded, so when the
annotation then failed (a rate limit, for example) every retry was
refused with "Already submitted to plus" and the image stayed without
its annotation.
Keep the uploaded image id in the event's data until the annotation
succeeds, and only then set plus_id. A retry reuses that image instead
of uploading it again, and since plus_id is still unset the UI already
offers the retry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep the longest Frigate+ wait when replies overlap
Requests to Frigate+ run on several threads. When two were refused at
once, a reply with a shorter Retry-After that was handled last replaced
the longer wait, so requests were sent again before Frigate+ allowed it.
Only move the deadline later, under a lock.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Include days in Frigate+ rate limit waits
formatSecondsToDuration only formats hours, minutes and seconds, so a
wait of a day or more lost its days: 90000 seconds read as "1 hour".
Format the wait from whole days down instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep the Frigate+ rate limit lock out of the client
The config holds the Frigate+ client and is pickled to start worker
processes from the forkserver. The lock added to PlusApi can't be
pickled, so worker startup failed with "cannot pickle '_thread.lock'
object", with or without a Frigate+ key.
Use a module level lock instead. Rate limit state is per process, so one
lock per process is all that's needed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: frigate-agents[bot] <356735177+frigate-agents[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* remove redundant per-view toasters in settings
* add variants to standardize dialog footer button layouts
* remove text-md
this class name compiles to nothing in tailwind. we used to add it to prevent iOS from zooming when focusing on an input, but that is now solved via the viewport meta in index.html
* make wizard footers consistent with dialog footers
* consistent destructive button style
remove text-white from individual buttons and add it to the variant
* mobile page component
* object lifecycle pane tweaks
* use mobile page component for review and search detail
* fix frigate+ dialog when using mobile page component
* small tweaks
* Improve image loading by not loading when off screen
* Add share menu to export
* Add share button and tidy up review detail lists
* Fix missing key
* Use query args for review filter
* Add object lifecycle to explore dialog
* Adjust sizing
* Simplify share button
* Always show snapshot but hide buttons for frigate+ if not applicable
* Handle case when user switches to element missing the previously selected tab
* Handle cases where share is not available
* Fix logic