Commit e59ff2f
committed
fix: accurate duration and actual model in enrichment progress
Duration fix:
- onEnrich callback now uses parseFloat(((end-start)/1000).toFixed(1))
for precise sub-second display (was Math.round which lost precision)
- Elapsed counter now updates every 500ms (was 2500ms) for smooth display
- Timer is cleared immediately when backend returns — no over-counting
- Summary duration comes from actual request timing, not the UI counter
Model fix:
- handleAiIdentify now returns { modelUsed, provider, confidence, specs,
images, sellers, tags } from the actual API response
- onEnrich callback uses result.modelUsed (actual model from OpenRouter)
instead of hardcoded 'Auto'
- Provider comes from result, not hardcoded 'OpenRouter'
- Summary card displays the real model name returned by the provider
(e.g. 'nvidia/nemotron-3-super-120b-a12b:free' not 'Auto')
No hardcoded values:
- Removed: provider: 'OpenRouter' (now from result)
- Removed: model: 'Auto' (now from result.modelUsed)
- All summary data comes from the completed backend response
- If no result, returns { success: false } instead of fake summary
Timer architecture:
- Fast timer (500ms): elapsed display only
- Slow timer (2500ms): activity rotation, step advancement, stat growth
- Both cleared in finally block when enrichment completes1 parent 237470b commit e59ff2f
2 files changed
Lines changed: 49 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
147 | 148 | | |
148 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
149 | 155 | | |
150 | 156 | | |
151 | 157 | | |
| |||
211 | 217 | | |
212 | 218 | | |
213 | 219 | | |
| 220 | + | |
214 | 221 | | |
215 | 222 | | |
216 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
517 | | - | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
518 | 526 | | |
519 | 527 | | |
520 | 528 | | |
| |||
647 | 655 | | |
648 | 656 | | |
649 | 657 | | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
650 | 667 | | |
651 | 668 | | |
652 | 669 | | |
| 670 | + | |
653 | 671 | | |
654 | 672 | | |
655 | 673 | | |
656 | 674 | | |
| 675 | + | |
657 | 676 | | |
658 | 677 | | |
659 | 678 | | |
| |||
889 | 908 | | |
890 | 909 | | |
891 | 910 | | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
906 | 931 | | |
907 | 932 | | |
908 | 933 | | |
| |||
0 commit comments