TradingAgents/frontend/lib
MarkLo 22f57a8674 feat: recover pending analysis tasks after page close
Added task recovery system that allows users to recover and save
analysis results even if they accidentally close the page:

1. New pending-task.ts utility:
   - Saves task info to localStorage when analysis starts
   - Clears after task completes/fails
   - 24-hour expiry for old tasks

2. PendingTaskRecovery component:
   - Shows on history page if pending task found
   - Polls API for task status
   - Saves result to IndexedDB + cloud upon completion

3. Updated useAnalysis hook:
   - Tracks pending tasks in localStorage
   - Clears on completion/failure

Now users visiting /history after closing the page during analysis
will see a prompt to recover and save their completed report.
2025-12-14 03:55:12 +08:00
..
api-helpers.ts 2025-12-11 00:06:09 +08:00
api.ts 2025-11-25 17:03:17 +08:00
crypto.ts 2025-12-13 01:54:47 +08:00
pending-task.ts feat: recover pending analysis tasks after page close 2025-12-14 03:55:12 +08:00
reports-db.ts 2025-12-13 16:19:46 +08:00
storage.ts 2025-12-13 01:54:47 +08:00
types.ts 2025-12-12 19:01:49 +08:00
user-api.ts 2025-12-13 06:00:19 +08:00
utils.ts 2025-11-20 21:56:47 +08:00