From a43951be51cf360d19c6f5e572dcf0005db3b740 Mon Sep 17 00:00:00 2001 From: Trezy Date: Mon, 13 Apr 2026 10:26:15 -0500 Subject: [PATCH] chore: remove derelict Tap references --- src/admin/lexicons.rs | 4 +- src/admin/network_lexicons.rs | 4 +- src/jetstream.rs | 2 +- web/src/app/dashboard/backfill/page.tsx | 51 +------------------------ web/src/app/dashboard/events/page.tsx | 1 - web/src/lib/api.ts | 7 ---- web/src/types/tap.ts | 5 --- 7 files changed, 7 insertions(+), 67 deletions(-) delete mode 100644 web/src/types/tap.ts diff --git a/src/admin/lexicons.rs b/src/admin/lexicons.rs index b652ac2..f238fe0 100644 --- a/src/admin/lexicons.rs +++ b/src/admin/lexicons.rs @@ -13,8 +13,8 @@ use super::auth::UserAuth; use super::permissions::Permission; use super::types::{LexiconSummary, UploadLexiconBody}; -/// Send the current record collection list to the Tap task so it -/// syncs the updated filter. +/// Broadcast the current record collection list so the Jetstream +/// subscription syncs its filter. async fn notify_collections(state: &AppState) { let collections = state.lexicons.get_record_collections().await; let _ = state.collections_tx.send(collections); diff --git a/src/admin/network_lexicons.rs b/src/admin/network_lexicons.rs index 1b762fa..cc6f3b3 100644 --- a/src/admin/network_lexicons.rs +++ b/src/admin/network_lexicons.rs @@ -13,8 +13,8 @@ use super::auth::UserAuth; use super::permissions::Permission; use super::types::{AddNetworkLexiconBody, NetworkLexiconSummary}; -/// Send the current record collection list to the Tap task so it -/// syncs the updated filter. +/// Broadcast the current record collection list so the Jetstream +/// subscription syncs its filter. async fn notify_collections(state: &AppState) { let collections = state.lexicons.get_record_collections().await; let _ = state.collections_tx.send(collections); diff --git a/src/jetstream.rs b/src/jetstream.rs index 370c14c..385fea8 100644 --- a/src/jetstream.rs +++ b/src/jetstream.rs @@ -106,7 +106,7 @@ fn build_subscribe_url(base_url: &str, collections: &[String]) -> String { // Public API // --------------------------------------------------------------------------- -/// Spawn a background task that connects to Jetstream's WebSocket firehose and +/// Spawn a background task that connects to Jetstream's WebSocket stream and /// processes record + identity events. Uses exponential backoff on disconnects. pub fn spawn(state: AppState, mut collections_rx: watch::Receiver>) { tokio::spawn(async move { diff --git a/web/src/app/dashboard/backfill/page.tsx b/web/src/app/dashboard/backfill/page.tsx index da11be3..f728902 100644 --- a/web/src/app/dashboard/backfill/page.tsx +++ b/web/src/app/dashboard/backfill/page.tsx @@ -3,22 +3,10 @@ import { useCallback, useEffect, useState } from "react"; import { useCurrentUser } from "@/hooks/use-current-user"; -import { - createBackfillJob, - getBackfillJobs, - getLexicons, - getTapStats, -} from "@/lib/api"; +import { createBackfillJob, getBackfillJobs, getLexicons } from "@/lib/api"; import type { BackfillJob } from "@/types/backfill"; -import type { TapStatsResponse } from "@/types/tap"; import { SiteHeader } from "@/components/site-header"; import { Button } from "@/components/ui/button"; -import { - Card, - CardDescription, - CardHeader, - CardTitle, -} from "@/components/ui/card"; import { Combobox, ComboboxContent, @@ -51,19 +39,13 @@ import { export default function BackfillPage() { const { hasPermission } = useCurrentUser(); const [jobs, setJobs] = useState([]); - const [tapStats, setTapStats] = useState(null); const [error, setError] = useState(null); const load = useCallback(() => { getBackfillJobs() .then(setJobs) .catch((e) => setError(e.message)); - if (hasPermission("stats:read")) { - getTapStats() - .then(setTapStats) - .catch(() => setTapStats(null)); - } - }, [hasPermission]); + }, []); useEffect(() => { load(); @@ -81,35 +63,6 @@ export default function BackfillPage() {
{error &&

{error}

} - {hasPermission("stats:read") && ( -
- - - Tap Repos - - {tapStats ? tapStats.repo_count.toLocaleString() : "--"} - - - - - - Tap Records - - {tapStats ? tapStats.record_count.toLocaleString() : "--"} - - - - - - Outbox Buffer - - {tapStats ? tapStats.outbox_buffer.toLocaleString() : "--"} - - - -
- )} -

Backfill Jobs

{hasPermission("backfill:create") && ( diff --git a/web/src/app/dashboard/events/page.tsx b/web/src/app/dashboard/events/page.tsx index fefa428..94f082b 100644 --- a/web/src/app/dashboard/events/page.tsx +++ b/web/src/app/dashboard/events/page.tsx @@ -375,7 +375,6 @@ export default function EventsPage() { { label: "Script", value: "script" }, { label: "Admin", value: "admin" }, { label: "Backfill", value: "backfill" }, - { label: "Tap", value: "tap" }, ], }, }, diff --git a/web/src/lib/api.ts b/web/src/lib/api.ts index 3cc0af0..06ec4b2 100644 --- a/web/src/lib/api.ts +++ b/web/src/lib/api.ts @@ -2,7 +2,6 @@ import type { ApiKeySummary, CreateApiKeyResponse } from "@/types/api-keys" import type { StatsResponse } from "@/types/stats" import type { LexiconSummary, LexiconDetail } from "@/types/lexicons" import type { NetworkLexiconSummary } from "@/types/network-lexicons" -import type { TapStatsResponse } from "@/types/tap" import type { BackfillJob } from "@/types/backfill" import type { UserSummary } from "@/types/users" import type { AdminListRecordsResponse } from "@/types/records" @@ -24,7 +23,6 @@ export type { ApiKeySummary, CreateApiKeyResponse } from "@/types/api-keys" export type { CollectionStat, StatsResponse } from "@/types/stats" export type { LexiconSummary, LexiconDetail } from "@/types/lexicons" export type { NetworkLexiconSummary } from "@/types/network-lexicons" -export type { TapStatsResponse } from "@/types/tap" export type { BackfillJob } from "@/types/backfill" export type { UserSummary } from "@/types/users" export type { AdminRecord, AdminListRecordsResponse } from "@/types/records" @@ -145,11 +143,6 @@ export function deleteNetworkLexicon( ) } -// Tap Stats -export function getTapStats() { - return apiFetch("/admin/tap/stats") -} - // Backfill export function getBackfillJobs() { return apiFetch("/admin/backfill/status") diff --git a/web/src/types/tap.ts b/web/src/types/tap.ts deleted file mode 100644 index 4bc823f..0000000 --- a/web/src/types/tap.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface TapStatsResponse { - repo_count: number - record_count: number - outbox_buffer: number -} -- 2.51.2