fix: pre-launch UI hardening + KOL reduce-action type, proxy IP relay, settings redesign

Frontend half of the pre-launch audit campaign:

- types/index.ts + kol/KolPageClient.tsx: add missing 'reduce' KolAction
  (backend emits it; frontend lacked the type + color/label maps → undefined
  styling). Adds ACTION_COLOR/actionLabel/postActionLabel entries.
- proxy/[...path]/route.ts: relay real client IP (x-forwarded-for / x-real-ip)
  so the backend rate limiter buckets per-user instead of per-Next-server (BUG-02).
- Settings/BotConfigPanel redesign, paper-mode clarity, copy cleanup.
- Assorted page/display fixes, loading states, Pagination component.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
k
2026-05-29 11:57:43 +08:00
parent b76de36af0
commit d50c05b120
32 changed files with 1003 additions and 224 deletions
+3 -1
View File
@@ -69,7 +69,9 @@ export default function TradesPageClient() {
}
})()
return () => { cancelled = true }
}, [address, isConnected, isZh])
// isZh intentionally excluded: compile-time constant (always false).
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [address, isConnected])
const needsSetup = mounted && isConnected && (!isSubscribed || !hlApiKeySet)
+21
View File
@@ -0,0 +1,21 @@
export default function TradesLoading() {
return (
<div className="page">
<div className="page-head">
<div className="skeleton sk-title" style={{ width: 140, marginBottom: 8 }} />
</div>
<div style={{ marginTop: 16 }}>
{Array.from({ length: 6 }).map((_, i) => (
<div key={i} className="skeleton-card" style={{ marginBottom: 8, padding: 16 }}>
<div style={{ display: 'flex', gap: 12, alignItems: 'center' }}>
<div className="skeleton sk-line" style={{ width: 40 }} />
<div className="skeleton sk-line" style={{ width: 60 }} />
<div className="skeleton sk-line" style={{ width: 80 }} />
<div className="skeleton sk-line" style={{ width: 100 }} />
</div>
</div>
))}
</div>
</div>
)
}