Commit d90b8cd
fix: comprehensive bug fixes and UX improvements for z-dev-v2
This commit includes multiple critical fixes and improvements:
**P0 Fixes (Critical):**
- ✅ Fix trader deletion logic order (manager/trader_manager.go, api/server.go)
- Added RemoveTrader() method to safely remove traders from memory
- Fixed order: stop & remove from memory → delete from DB
- Prevents "ghost traders" running without DB records
- Clears competition cache on deletion
**P1 Fixes (Important):**
- ✅ Fix two-stage private key input validation (web/src/components/TwoStageKeyModal.tsx)
- Normalize "0x" prefix before length validation
- Support keys with or without "0x" prefix
- ✅ Fix competition page showing deleted traders
- RemoveTrader() now clears competition cache
- Deleted traders no longer appear in rankings
**P2 Improvements (General):**
- ✅ Add duplicate trader name check (api/server.go)
- Prevents creating traders with identical names
- Returns clear error message
- ✅ Improve Dashboard empty state messages (web/src/i18n/translations.ts)
- More welcoming title: "Let's Get Started!" / "開始使用吧!"
- Specific action guidance: connect exchange, choose AI model
- Better call-to-action button text
- ✅ Improve login error messages (web/src/i18n/translations.ts)
- More helpful error hints
- Clearer guidance for users
**Cherry-picked from upstream:**
- ✅ Initial balance and equity calculation fixes (NoFxAiOS#901, 4 commits)
- ✅ Dynamic minimum position size for small accounts (NoFxAiOS#902, 1 commit)
Related: NoFxAiOS#787, NoFxAiOS#807, NoFxAiOS#790, NoFxAiOS#813, NoFxAiOS#883
Files changed: 4 (backend: 2, frontend: 2)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 8834c88 commit d90b8cd
File tree
4 files changed
+85
-26
lines changed- api
- manager
- web/src
- components
- i18n
4 files changed
+85
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
489 | 502 | | |
490 | 503 | | |
491 | 504 | | |
| |||
794 | 807 | | |
795 | 808 | | |
796 | 809 | | |
797 | | - | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
798 | 817 | | |
799 | 818 | | |
800 | 819 | | |
801 | 820 | | |
802 | 821 | | |
803 | 822 | | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
| 823 | + | |
814 | 824 | | |
815 | 825 | | |
816 | 826 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
428 | 470 | | |
429 | 471 | | |
430 | 472 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
132 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| |||
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
141 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
142 | 148 | | |
143 | 149 | | |
144 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | | - | |
152 | | - | |
| 151 | + | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
462 | | - | |
463 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
464 | 465 | | |
465 | 466 | | |
466 | 467 | | |
| |||
947 | 948 | | |
948 | 949 | | |
949 | 950 | | |
950 | | - | |
| 951 | + | |
951 | 952 | | |
952 | | - | |
953 | | - | |
| 953 | + | |
| 954 | + | |
954 | 955 | | |
955 | 956 | | |
956 | 957 | | |
| |||
1223 | 1224 | | |
1224 | 1225 | | |
1225 | 1226 | | |
1226 | | - | |
1227 | | - | |
1228 | | - | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
1229 | 1230 | | |
1230 | 1231 | | |
1231 | 1232 | | |
| |||
0 commit comments