From 945317b44e910eed1a72a2967eb8946a9dc66afa Mon Sep 17 00:00:00 2001
From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
Date: Thu, 6 Nov 2025 10:22:52 -0600
Subject: [PATCH] Tracked Object Details pane tweaks (#20830)
* add prev/next buttons on desktop
* buttons should work with summary and grid view
* i18n
* small tweaks
* don't change dialog size
* remove heading and count
* remove icons
* spacing
* two column detail view
* add actions to dots menu
* move actions menu to its own component
* set modal to false on face library dropdown to guard against improper closures
https://github.com/shadcn-ui/ui/discussions/6908
* frigate plus layout
* remove face training
* clean up unused
* refactor to remove duplication between mobile and desktop
* turn annotation settings into a popover
* fix popover
* improve annotation offset popver
* change icon and popover text in detail stream for annotation settings
* clean up
* use drawer on mobile
* fix setter function
* use dialog ref for popover portal
* don't portal popover
* tweaks
* add button type
* lower xl max width
* fixes
* justify
---
web/public/locales/en/views/explore.json | 4 +-
.../overlay/detail/AnnotationOffsetSlider.tsx | 4 +-
.../overlay/detail/AnnotationSettingsPane.tsx | 72 +-
.../overlay/detail/DetailActionsMenu.tsx | 118 ++
.../overlay/detail/SearchDetailDialog.tsx | 1350 +++++++++--------
.../overlay/detail/TrackingDetails.tsx | 141 +-
web/src/components/timeline/DetailStream.tsx | 12 +-
web/src/components/ui/popover.tsx | 28 +-
web/src/context/detail-stream-context.tsx | 2 +-
web/src/pages/FaceLibrary.tsx | 2 +-
web/src/views/search/SearchView.tsx | 157 +-
11 files changed, 1013 insertions(+), 877 deletions(-)
create mode 100644 web/src/components/overlay/detail/DetailActionsMenu.tsx
diff --git a/web/public/locales/en/views/explore.json b/web/public/locales/en/views/explore.json
index 787581bf7..afc81eaa6 100644
--- a/web/public/locales/en/views/explore.json
+++ b/web/public/locales/en/views/explore.json
@@ -74,7 +74,7 @@
"label": "Annotation Offset",
"desc": "This data comes from your camera's detect feed but is overlayed on images from the the record feed. It is unlikely that the two streams are perfectly in sync. As a result, the bounding box and the footage will not line up perfectly. You can use this setting to offset the annotations forward or backward in time to better align them with the recorded footage.",
"millisecondsToOffset": "Milliseconds to offset detect annotations by. Default: 0",
- "tips": "TIP: Imagine there is an event clip with a person walking from left to right. If the event timeline bounding box is consistently to the left of the person then the value should be decreased. Similarly, if a person is walking from left to right and the bounding box is consistently ahead of the person then the value should be increased.",
+ "tips": "Lower the value if the video playback is ahead of the boxes and path points, and increase the value if the video playback is behind them. This value can be negative.",
"toast": {
"success": "Annotation offset for {{camera}} has been saved to the config file. Restart Frigate to apply your changes."
}
@@ -215,6 +215,8 @@
"trackedObjectsCount_other": "{{count}} tracked objects ",
"searchResult": {
"tooltip": "Matched {{type}} at {{confidence}}%",
+ "previousTrackedObject": "Previous tracked object",
+ "nextTrackedObject": "Next tracked object",
"deleteTrackedObject": {
"toast": {
"success": "Tracked object deleted successfully.",
diff --git a/web/src/components/overlay/detail/AnnotationOffsetSlider.tsx b/web/src/components/overlay/detail/AnnotationOffsetSlider.tsx
index 4af982da5..9f4851d42 100644
--- a/web/src/components/overlay/detail/AnnotationOffsetSlider.tsx
+++ b/web/src/components/overlay/detail/AnnotationOffsetSlider.tsx
@@ -121,13 +121,13 @@ export default function AnnotationOffsetSlider({ className }: Props) {
- {t("trackingDetails.annotationSettings.offset.desc")}
+ {t("trackingDetails.annotationSettings.offset.tips")}
diff --git a/web/src/components/overlay/detail/AnnotationSettingsPane.tsx b/web/src/components/overlay/detail/AnnotationSettingsPane.tsx
index c180502f4..33bf10c5c 100644
--- a/web/src/components/overlay/detail/AnnotationSettingsPane.tsx
+++ b/web/src/components/overlay/detail/AnnotationSettingsPane.tsx
@@ -1,6 +1,3 @@
-import Heading from "@/components/ui/heading";
-import { Label } from "@/components/ui/label";
-import { Switch } from "@/components/ui/switch";
import { Event } from "@/types/event";
import { FrigateConfig } from "@/types/frigateConfig";
import { zodResolver } from "@hookform/resolvers/zod";
@@ -8,7 +5,6 @@ import axios from "axios";
import { useCallback, useState } from "react";
import { useForm } from "react-hook-form";
import { LuExternalLink } from "react-icons/lu";
-import { PiWarningCircle } from "react-icons/pi";
import { Link } from "react-router-dom";
import { toast } from "sonner";
import useSWR from "swr";
@@ -31,15 +27,11 @@ import { useDocDomain } from "@/hooks/use-doc-domain";
type AnnotationSettingsPaneProps = {
event: Event;
- showZones: boolean;
- setShowZones: React.Dispatch>;
annotationOffset: number;
setAnnotationOffset: React.Dispatch>;
};
export function AnnotationSettingsPane({
event,
- showZones,
- setShowZones,
annotationOffset,
setAnnotationOffset,
}: AnnotationSettingsPaneProps) {
@@ -140,26 +132,12 @@ export function AnnotationSettingsPane({
}
return (
-