Approve
@@ -191,13 +192,7 @@ function ConfidenceBadge({ confidence }: { confidence: string }) {
);
}
-function Meta({
- label,
- value,
-}: {
- label: string;
- value: ReactNode;
-}) {
+function Meta({ label, value }: { label: string; value: ReactNode }) {
return (
diff --git a/apps/web/src/components/ApprovalQueue.tsx b/apps/web/src/components/ApprovalQueue.tsx
index f49a59f..7193fd4 100644
--- a/apps/web/src/components/ApprovalQueue.tsx
+++ b/apps/web/src/components/ApprovalQueue.tsx
@@ -13,12 +13,16 @@ export function ApprovalQueue({
scanId,
scanStatus,
onCardUpdated,
+ guidedMode = false,
+ guidedCardId = null,
}: {
cards: ApiCard[];
systemIds: string[];
scanId: string | null;
scanStatus: string;
onCardUpdated: (card: ApiCard) => void;
+ guidedMode?: boolean;
+ guidedCardId?: string | null;
}) {
const ordered = useMemo(() => sortCards(cards), [cards]);
const unattributed = ordered.filter(isUnattributed);
@@ -37,6 +41,14 @@ export function ApprovalQueue({
setFocusIndex(0);
}, [scanId]);
+ useEffect(() => {
+ if (!guidedCardId) return;
+ document.getElementById(`approval-card-${guidedCardId}`)?.scrollIntoView({
+ behavior: "smooth",
+ block: "center",
+ });
+ }, [guidedCardId]);
+
useEffect(() => {
function onKey(e: KeyboardEvent) {
const tag = (e.target as HTMLElement | null)?.tagName;
@@ -142,7 +154,7 @@ export function ApprovalQueue({
- {pendingCount > 0 && checked.size === 0 ? (
+ {!guidedMode && pendingCount > 0 && checked.size === 0 ? (
>
) : null}
-
+ {!guidedMode ? (
+
+ ) : null}