A lexicon-driven AppView for ATProto. happyview.dev
backfill firehose jetstream atproto appview oauth lexicon
8
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: remove derelict Tap references

Trezy a43951be ffa5dff9

+7 -67
+2 -2
src/admin/lexicons.rs
··· 13 13 use super::permissions::Permission; 14 14 use super::types::{LexiconSummary, UploadLexiconBody}; 15 15 16 - /// Send the current record collection list to the Tap task so it 17 - /// syncs the updated filter. 16 + /// Broadcast the current record collection list so the Jetstream 17 + /// subscription syncs its filter. 18 18 async fn notify_collections(state: &AppState) { 19 19 let collections = state.lexicons.get_record_collections().await; 20 20 let _ = state.collections_tx.send(collections);
+2 -2
src/admin/network_lexicons.rs
··· 13 13 use super::permissions::Permission; 14 14 use super::types::{AddNetworkLexiconBody, NetworkLexiconSummary}; 15 15 16 - /// Send the current record collection list to the Tap task so it 17 - /// syncs the updated filter. 16 + /// Broadcast the current record collection list so the Jetstream 17 + /// subscription syncs its filter. 18 18 async fn notify_collections(state: &AppState) { 19 19 let collections = state.lexicons.get_record_collections().await; 20 20 let _ = state.collections_tx.send(collections);
+1 -1
src/jetstream.rs
··· 106 106 // Public API 107 107 // --------------------------------------------------------------------------- 108 108 109 - /// Spawn a background task that connects to Jetstream's WebSocket firehose and 109 + /// Spawn a background task that connects to Jetstream's WebSocket stream and 110 110 /// processes record + identity events. Uses exponential backoff on disconnects. 111 111 pub fn spawn(state: AppState, mut collections_rx: watch::Receiver<Vec<String>>) { 112 112 tokio::spawn(async move {
+2 -49
web/src/app/dashboard/backfill/page.tsx
··· 3 3 import { useCallback, useEffect, useState } from "react"; 4 4 5 5 import { useCurrentUser } from "@/hooks/use-current-user"; 6 - import { 7 - createBackfillJob, 8 - getBackfillJobs, 9 - getLexicons, 10 - getTapStats, 11 - } from "@/lib/api"; 6 + import { createBackfillJob, getBackfillJobs, getLexicons } from "@/lib/api"; 12 7 import type { BackfillJob } from "@/types/backfill"; 13 - import type { TapStatsResponse } from "@/types/tap"; 14 8 import { SiteHeader } from "@/components/site-header"; 15 9 import { Button } from "@/components/ui/button"; 16 10 import { 17 - Card, 18 - CardDescription, 19 - CardHeader, 20 - CardTitle, 21 - } from "@/components/ui/card"; 22 - import { 23 11 Combobox, 24 12 ComboboxContent, 25 13 ComboboxEmpty, ··· 51 39 export default function BackfillPage() { 52 40 const { hasPermission } = useCurrentUser(); 53 41 const [jobs, setJobs] = useState<BackfillJob[]>([]); 54 - const [tapStats, setTapStats] = useState<TapStatsResponse | null>(null); 55 42 const [error, setError] = useState<string | null>(null); 56 43 57 44 const load = useCallback(() => { 58 45 getBackfillJobs() 59 46 .then(setJobs) 60 47 .catch((e) => setError(e.message)); 61 - if (hasPermission("stats:read")) { 62 - getTapStats() 63 - .then(setTapStats) 64 - .catch(() => setTapStats(null)); 65 - } 66 - }, [hasPermission]); 48 + }, []); 67 49 68 50 useEffect(() => { 69 51 load(); ··· 80 62 <SiteHeader title="Backfill" /> 81 63 <div className="flex flex-1 flex-col gap-4 p-4 md:p-6"> 82 64 {error && <p className="text-destructive text-sm">{error}</p>} 83 - 84 - {hasPermission("stats:read") && ( 85 - <div className="grid grid-cols-1 gap-4 sm:grid-cols-3"> 86 - <Card> 87 - <CardHeader className={"text-center sm:text-left"}> 88 - <CardDescription>Tap Repos</CardDescription> 89 - <CardTitle className="text-xl sm:text-2xl font-semibold tabular-nums"> 90 - {tapStats ? tapStats.repo_count.toLocaleString() : "--"} 91 - </CardTitle> 92 - </CardHeader> 93 - </Card> 94 - <Card> 95 - <CardHeader className={"text-center sm:text-left"}> 96 - <CardDescription>Tap Records</CardDescription> 97 - <CardTitle className="text-xl sm:text-2xl font-semibold tabular-nums"> 98 - {tapStats ? tapStats.record_count.toLocaleString() : "--"} 99 - </CardTitle> 100 - </CardHeader> 101 - </Card> 102 - <Card> 103 - <CardHeader className={"text-center sm:text-left"}> 104 - <CardDescription>Outbox Buffer</CardDescription> 105 - <CardTitle className="text-xl sm:text-2xl font-semibold tabular-nums"> 106 - {tapStats ? tapStats.outbox_buffer.toLocaleString() : "--"} 107 - </CardTitle> 108 - </CardHeader> 109 - </Card> 110 - </div> 111 - )} 112 65 113 66 <div className="flex items-center justify-between"> 114 67 <h2 className="text-lg font-semibold">Backfill Jobs</h2>
-1
web/src/app/dashboard/events/page.tsx
··· 375 375 { label: "Script", value: "script" }, 376 376 { label: "Admin", value: "admin" }, 377 377 { label: "Backfill", value: "backfill" }, 378 - { label: "Tap", value: "tap" }, 379 378 ], 380 379 }, 381 380 },
-7
web/src/lib/api.ts
··· 2 2 import type { StatsResponse } from "@/types/stats" 3 3 import type { LexiconSummary, LexiconDetail } from "@/types/lexicons" 4 4 import type { NetworkLexiconSummary } from "@/types/network-lexicons" 5 - import type { TapStatsResponse } from "@/types/tap" 6 5 import type { BackfillJob } from "@/types/backfill" 7 6 import type { UserSummary } from "@/types/users" 8 7 import type { AdminListRecordsResponse } from "@/types/records" ··· 24 23 export type { CollectionStat, StatsResponse } from "@/types/stats" 25 24 export type { LexiconSummary, LexiconDetail } from "@/types/lexicons" 26 25 export type { NetworkLexiconSummary } from "@/types/network-lexicons" 27 - export type { TapStatsResponse } from "@/types/tap" 28 26 export type { BackfillJob } from "@/types/backfill" 29 27 export type { UserSummary } from "@/types/users" 30 28 export type { AdminRecord, AdminListRecordsResponse } from "@/types/records" ··· 143 141 `/admin/network-lexicons/${encodeURIComponent(nsid)}`, 144 142 { method: "DELETE" } 145 143 ) 146 - } 147 - 148 - // Tap Stats 149 - export function getTapStats() { 150 - return apiFetch<TapStatsResponse>("/admin/tap/stats") 151 144 } 152 145 153 146 // Backfill
-5
web/src/types/tap.ts
··· 1 - export interface TapStatsResponse { 2 - repo_count: number 3 - record_count: number 4 - outbox_buffer: number 5 - }