Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 14, 2025

后台同步任务需要在前端可见、可恢复,并同时展示整体进度与当前对话进度。

  • Storage & state
    • Persist takeout tasks per session in useSyncTaskStore, aggregate batch progress (all chats) and per-chat progress, and expose running/error tasks for UI.
  • Event wiring
    • On takeout:task:progress, upsert tasks into the store; abort now targets all running tasks.
  • UI
    • Sync page shows dual progress bars (batch vs current chat) and keeps the background task drawer toggle in the layout.
    • New TaskDrawer lists queued/running/failed tasks with quick dismiss and batch summary.
  • i18n & tests
    • Added translations for new task UI strings (EN/zh-CN).
    • New unit test covering session-scoped task persistence and aggregated progress.

Example (task normalization):

function normalizeTask(task: CoreTaskData<'takeout'>): TakeoutTaskView {
  return {
    ...task,
    chatId: task.metadata?.chatIds?.[0],
    createdAt: new Date(task.createdAt).getTime(),
    updatedAt: new Date(task.updatedAt).getTime(),
  }
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/telegram-search/telegram-search/node_modules/.bin/../vite/bin/vite.js build (dns block)
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/telegram-search/telegram-search/node_modules/.bin/../vitest/vitest.mjs (dns block)
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/telegram-search/telegram-search/node_modules/.bin/../vitest/vitest.mjs packages/client/src/stores/__test__/useSyncTask.test.ts mkcert bin/�� (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

需要在前端展示后台任务的进度页面(抽屉),同步任务同样也可以放在后台执行。如果是自部署模式启动,重新打开页面也可以恢复当前后台进行的任务的显示。如果同步多个会话,要求可以看到各个正在同步的会话的进度。

后端在同步任务进行的时候,会发送 task:progress,这个时候前端就能拿到状态,可以直接用这个状态显示。

并且,前端需要在当前的同步进度条里面显示两个条,一个是有总对话的数量,一个是当前对话的进度。

具体的 UI 你看着来,总之要简洁。


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 14, 2025 19:10
Copilot AI changed the title [WIP] Add front-end task progress display page Add background sync drawer with per-chat progress tracking Dec 14, 2025
Copilot AI requested a review from luoling8192 December 14, 2025 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants