refactor(settings): redesign BotConfigPanel + fix paper mode + clarify all copy

BotConfigPanel (full rewrite, 1113→858 lines):
- Remove 3-tab layout; replace with two expandable cards (Trump Signal /
  Macro Vibes) + collapsed Advanced block — fewer decisions, less noise
- Fix paper mode bug: UserResponse now returns paper_mode; BotConfigPanel
  tracks it in state; missingItems skips HL key requirement for paper users;
  HL key card shows paper status instead of empty input
- Add "Switch to live →" upgrade path — calls /subscribe with paper_mode=false
  so paper users can promote without re-subscribing from scratch
- Add confirmSign before manual override window (consistent with all other
  mutations); rename "Arm/Disarm" → "Override/Cancel override" throughout
- Fix all ambiguous copy: subscribe card, Macro Vibes description (manual
  /adopt flow, not auto-manage), missingItems strings, TP/SL "Not saved yet"
  → "Required — not saved", "Daily spend cap" → "Daily trading cap",
  "Active schedule" → "Trading schedule", "Get started" confirmSign labels

lib/api.ts:
- Add paper_mode: boolean to UserData interface (was missing)

OpenPositions:
- "Load your settings once…" → "Sign in once to view open positions" (removes
  implementation-detail explanation)
- "Today realised" → "Today's realized"; "banked" → "locked in" throughout
- "The bot will appear here" → "When the bot opens a trade, it will show up here"

SystemControl:
- "Net result" → "Current status"

settings/SettingsClient.tsx:
- id="btc-settings" → id="macro-settings" (stale rename)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
k
2026-05-27 23:10:55 +08:00
parent a1e9ec49ef
commit b76de36af0
5 changed files with 530 additions and 656 deletions
+5 -5
View File
@@ -76,16 +76,16 @@ export default function SettingsClient() {
<div className="settings-scope-copy">
Position size, Trump leverage, and minimum AI confidence used when a Truth Social post becomes actionable.
</div>
<a href="#trump-settings-panel" className="settings-scope-link">Open panel </a>
<a href="#bot-config" className="settings-scope-link">Trump Signal tab </a>
</section>
<section id="btc-settings" className="settings-scope-card btc">
<section id="macro-settings" className="settings-scope-card btc">
<div className="settings-scope-eyebrow">Macro Vibes</div>
<div className="settings-scope-title">BTC manage-only settings</div>
<div className="settings-scope-copy">
Strategy mode, BTC leverage, and de-risk behavior used by the Macro Vibes sleeve.
</div>
<a href="#btc-settings" className="settings-scope-link">Open panel </a>
<a href="#bot-config" className="settings-scope-link">Macro Vibes tab </a>
</section>
<section id="global-settings" className="settings-scope-card global">
@@ -94,7 +94,7 @@ export default function SettingsClient() {
<div className="settings-scope-copy">
Subscription, Hyperliquid API wallet, manual window, schedule, and guardrails that apply across the account.
</div>
<a href="#global-settings-panel" className="settings-scope-link">Open panel </a>
<a href="#bot-config" className="settings-scope-link">Global tab </a>
</section>
</div>
@@ -126,7 +126,7 @@ export default function SettingsClient() {
</div>
</div>
<div className="settings-section-shell">
<div id="bot-config" className="settings-section-shell">
<div className="settings-section-head">
<div>
<div className="settings-section-kicker">Execution setup</div>