diff --git a/src/lib/components/EventTypeConfig.svelte b/src/lib/components/EventTypeConfig.svelte
index 8d8e17c..f42039e 100644
--- a/src/lib/components/EventTypeConfig.svelte
+++ b/src/lib/components/EventTypeConfig.svelte
@@ -71,6 +71,10 @@
const limit = parseInt(value);
if (!isNaN(limit) && limit > 0) {
visualizationConfig.updateEventLimit(kind, limit);
+ // Update profile stats display limit if it's kind 0
+ if (kind === 0) {
+ profileStats = { ...profileStats, displayLimit: limit };
+ }
}
}
@@ -128,7 +132,7 @@
{#if config.kind === 0}
{},
eventCounts = {},
+ profileStats = { totalFetched: 0, displayLimit: 50 },
} = $props<{
count: number;
totalCount: number;
@@ -25,6 +26,7 @@
starVisualization?: boolean;
onFetchMissing?: (ids: string[]) => void;
eventCounts?: { [kind: number]: number };
+ profileStats?: { totalFetched: number; displayLimit: number };
}>();
let expanded = $state(false);
@@ -134,7 +136,7 @@
{#if eventTypesExpanded}
-
+
{/if}
diff --git a/src/lib/navigator/EventNetwork/index.svelte b/src/lib/navigator/EventNetwork/index.svelte
index 18e4056..099ba6f 100644
--- a/src/lib/navigator/EventNetwork/index.svelte
+++ b/src/lib/navigator/EventNetwork/index.svelte
@@ -74,7 +74,8 @@
onupdate,
onclear = () => {},
onTagExpansionChange,
- onFetchMissing = () => {}
+ onFetchMissing = () => {},
+ profileStats = { totalFetched: 0, displayLimit: 50 }
} = $props<{
events?: NDKEvent[];
followListEvents?: NDKEvent[];
@@ -83,6 +84,7 @@
onclear?: () => void;
onTagExpansionChange?: (depth: number, tags: string[]) => void;
onFetchMissing?: (ids: string[]) => void;
+ profileStats?: { totalFetched: number; displayLimit: number };
}>();
// Error state
@@ -1215,6 +1217,7 @@
{onFetchMissing}
bind:starVisualization
{eventCounts}
+ {profileStats}
/>
diff --git a/src/routes/visualize/+page.svelte b/src/routes/visualize/+page.svelte
index a9964e1..dae1342 100644
--- a/src/routes/visualize/+page.svelte
+++ b/src/routes/visualize/+page.svelte
@@ -57,6 +57,12 @@
? `Loading profiles: ${profileLoadingProgress.current}/${profileLoadingProgress.total}`
: null
);
+
+ // Profile stats for EventTypeConfig
+ let profileStats = $state<{totalFetched: number, displayLimit: number}>({
+ totalFetched: 0,
+ displayLimit: 50
+ });
/**
* Fetches follow lists (kind 3) with depth expansion
@@ -528,14 +534,11 @@
profileLoadingProgress = null;
debug("Profile fetch complete");
- // Store the total count for display
- // The limit in kind0Config now controls display, not fetch
- if (typeof window !== 'undefined' && window.profileStats) {
- window.profileStats = {
- totalFetched: allPubkeys.size,
- displayLimit: kind0Config.limit
- };
- }
+ // Update profile stats for display
+ profileStats = {
+ totalFetched: allPubkeys.size,
+ displayLimit: kind0Config.limit
+ };
}
// Step 7: Apply display limits
@@ -1022,6 +1025,7 @@
onclear={clearEvents}
onTagExpansionChange={handleTagExpansion}
onFetchMissing={fetchMissingEvents}
+ {profileStats}
/>
{/if}