Skip to content

Commit ae64d40

Browse files
a16iclaude
andcommitted
Show provider names in ticker, faster search debounce
- Stats query JOINs mpp_providers to get provider_name for payments - Ticker shows provider name with hostname fallback - Search debounce reduced from 300ms to 100ms Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 85db5db commit ae64d40

4 files changed

Lines changed: 16 additions & 12 deletions

File tree

src/rating/stats.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,20 @@ export async function getDashboardStats(range: TimeRange = "24h") {
7171
challenge_request: string | null;
7272
output_tx_hash: string | null;
7373
deposit_address: string | null;
74+
provider_name: string | null;
7475
}[]>`
75-
SELECT id, status, created_at,
76-
original_request->>'url' as original_url,
77-
original_request->>'method' as original_method,
78-
challenge->>'realm' as challenge_realm,
79-
challenge->>'description' as challenge_description,
80-
challenge->>'request' as challenge_request,
81-
output_tx_hash,
82-
deposit_address
83-
FROM mpp_payments
84-
ORDER BY created_at DESC LIMIT 20
76+
SELECT p.id, p.status, p.created_at,
77+
p.original_request->>'url' as original_url,
78+
p.original_request->>'method' as original_method,
79+
p.challenge->>'realm' as challenge_realm,
80+
p.challenge->>'description' as challenge_description,
81+
p.challenge->>'request' as challenge_request,
82+
p.output_tx_hash,
83+
p.deposit_address,
84+
prov.name as provider_name
85+
FROM mpp_payments p
86+
LEFT JOIN mpp_providers prov ON p.original_request->>'url' LIKE prov.url || '%'
87+
ORDER BY p.created_at DESC LIMIT 20
8588
`;
8689

8790
return {

web/src/components/ActivityFeed.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function ActivityFeed({ payments }: { payments: RecentPayment[] }) {
8585
<span className={`ticker-col ticker-col-status`}>
8686
<span className={`ticker-badge ${cls}`}>{label}</span>
8787
</span>
88-
<span className="ticker-col ticker-col-service">{host}</span>
88+
<span className="ticker-col ticker-col-service">{p.provider_name || host}</span>
8989
<span className="ticker-col ticker-col-method ticker-mono">{method}</span>
9090
<span className="ticker-col ticker-col-amount ticker-mono">{amount ?? "—"}</span>
9191
<span className="ticker-col ticker-col-desc ticker-desc-text" title={desc}>{desc}</span>

web/src/components/SearchBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function SearchBar({ value, onChange }: { value: string; onChange: (v: st
99
function handleChange(v: string) {
1010
setLocal(v);
1111
clearTimeout(timer.current);
12-
timer.current = setTimeout(() => onChange(v), 300);
12+
timer.current = setTimeout(() => onChange(v), 100);
1313
}
1414

1515
return (

web/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export type RecentPayment = {
5454
challenge_request: string | null;
5555
output_tx_hash: string | null;
5656
deposit_address: string | null;
57+
provider_name: string | null;
5758
};
5859

5960
export type DashboardStats = {

0 commit comments

Comments
 (0)