Commit Graph

20 Commits

Author SHA1 Message Date
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
MarkLo bddcca3ebb 2025-12-13 16:19:46 +08:00
MarkLo 5d3751602e 2025-12-13 06:00:19 +08:00
MarkLo 8204aff28b 2025-12-13 01:54:47 +08:00
MarkLo 4269fdec26 2025-12-12 19:01:49 +08:00
MarkLo da7d05ecc9 2025-12-12 05:30:04 +08:00
MarkLo 138cd922c6 2025-12-11 00:06:09 +08:00
MarkLo 33e58ff389 2025-12-07 21:40:58 +08:00
MarkLo c2b8706bf2 2025-12-07 17:13:57 +08:00
MarkLo 43658df2a0 2025-12-06 02:28:43 +08:00
MarkLo a0e4365fc3 2025-12-06 01:50:41 +08:00
MarkLo 8d679007bf 2025-11-25 17:03:17 +08:00
MarkLo 6c5a505282 2025-11-23 10:47:41 +08:00
MarkLo 4ce2a96956 2025-11-21 23:34:39 +08:00
MarkLo d3ab03ccd9 2025-11-21 13:16:04 +08:00
MarkLo 710ff8c855 2025-11-21 10:17:55 +08:00
MarkLo aef7b5942d 2025-11-21 03:57:08 +08:00
MarkLo 44fd92850d 2025-11-20 23:19:22 +08:00
MarkLo 0a203fa475 2025-11-20 22:36:58 +08:00
MarkLo 2872f18b47 2025-11-20 21:56:47 +08:00