Skip to content

Commit f6ad5c5

Browse files
r4topunkclaude
andcommitted
fix(feed): broaden window + dedupe auction lifecycle cards
Users reported feed showing only auction activity. Root causes: 1. Server filtered by timestamp_gt (30d). Gnars has quiet stretches (weeks of auctions only, no votes/proposals). Old code quietly bypassed the filter via a fallback when all three legacy subqueries were empty; the unified feedEvents port lost that fallback. 2. Every Gnars auction emitted two cards (Created + Settled). Daily auctions alone saturated PAGE_SIZE=20 before any governance event could render. 3. UI default timeRange="30d" hid events just outside 30d. Changes: - feed-events.ts: drop timestamp_gt; rely on first:250 + desc sort. - feed-events.ts: skip AuctionCreatedEvent when auction.settled is true (the Settled card represents it already, or it was a no-bid non-event). Live/unsettled auctions still surface. - LiveFeedView: bump initial PAGE_SIZE 20 → 50 so governance activity is not pushed past the fold by auction lifecycle spam. - LiveFeedView: default timeRange "30d" → "all". hasActiveFilters now compares against "all". Verified on dev: /feed first page now shows 43 votes + 3 executed + 3 proposals + 1 propdate + 1 bid + 1 won auction + 1 live auction, versus pre-fix 49 auction + 1 propdate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 105194c commit f6ad5c5

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

src/components/feed/LiveFeedView.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ export interface LiveFeedViewProps {
2626
export const DEFAULT_FILTERS: FeedFilters = {
2727
priorities: ["HIGH", "MEDIUM", "LOW"],
2828
categories: ["governance", "auction", "token", "delegation", "treasury", "admin", "settings"],
29-
timeRange: "30d",
29+
// Default to the full fetched window (subgraph caps at ~250 events).
30+
// Gnars has quiet stretches where 30d contains auctions only; a wider
31+
// default surfaces the most recent proposal/vote/propdate/droposal
32+
// activity even when it sits just outside 30 days.
33+
timeRange: "all",
3034
showOnlyWithComments: false,
3135
};
3236

@@ -148,8 +152,12 @@ export function LiveFeedView({
148152
).acc;
149153
}, [filteredEvents]);
150154

151-
// Incremental rendering for performance
152-
const PAGE_SIZE = 20;
155+
// Incremental rendering for performance. Bumped from 20 to 50 so the
156+
// first page surfaces governance activity that would otherwise sit
157+
// below a wall of daily auction events (Gnars emits 2 auction events
158+
// per day, which alone would fill 20 slots before any vote/proposal
159+
// showed up).
160+
const PAGE_SIZE = 50;
153161
const [visibleCount, setVisibleCount] = useState<number>(PAGE_SIZE);
154162
const sentinelRef = useRef<HTMLDivElement | null>(null);
155163

@@ -393,7 +401,7 @@ function EmptyState({ filters }: { filters: FeedFilters }) {
393401
const hasActiveFilters =
394402
filters.priorities.length < 3 ||
395403
filters.categories.length < 7 ||
396-
filters.timeRange !== "30d" ||
404+
filters.timeRange !== "all" ||
397405
filters.showOnlyWithComments;
398406

399407
return (

0 commit comments

Comments
 (0)