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:
@@ -96,6 +96,10 @@ export interface UserSettings {
|
||||
sys2_mode?: 'standard' | 'aggressive' | null
|
||||
active_from: string | null // ISO UTC
|
||||
active_until: string | null // ISO UTC
|
||||
/** Master on/off switches for each module. false = module is disabled;
|
||||
* bot ignores all signals for that module even if subscribed. */
|
||||
trump_enabled?: boolean | null
|
||||
macro_enabled?: boolean | null
|
||||
}
|
||||
|
||||
export interface UserData {
|
||||
@@ -104,6 +108,7 @@ export interface UserData {
|
||||
subscribed_at: string | null
|
||||
hl_api_key_set: boolean
|
||||
hl_api_key_masked: string | null
|
||||
paper_mode: boolean
|
||||
trades: BotTrade[]
|
||||
settings: UserSettings
|
||||
/** ISO-UTC timestamp until which the bot is manually armed (null = use schedule). */
|
||||
|
||||
Reference in New Issue
Block a user