Repository navigation
feat(web): 移除資料已自動更新的區塊重整按鈕 - #249
Merged
Merged
Conversation
…freshes The server polls SQLite (PRAGMA data_version + total_changes) every 2 s and pushes an SSE event that invalidates every active Pinia Colada query, and Agent requests are additionally polled while pending. Section refresh buttons on Agent reads, open-item cleanup, metadata backfill status, AI synthesis status, report presentation and the work report page therefore refetched data that was already current, so clicking them looked like it did nothing. - Remove those buttons; keep the header refresh, error retries, System status refresh and the backup list refresh (state outside SQLite). - Synthesis re-run buttons no longer say 重新整理 (重新產生/重新產生這份 報告的整理); Knowledge Agent requests use the sparkles icon. - Export progress moves from the removed report refresh button onto the export menu via a new UiActionMenu `loading` prop. - E2E: trigger background refreshes with visibilitychange instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
為什麼
各頁有很多「重新整理」按鈕,但有些按了沒反應。原因是伺服器每 2 秒輪詢 SQLite(
PRAGMA data_version+total_changes),一有變更就推 SSE,讓所有啟用中的 Pinia Colada query 失效重抓;Agent 請求在 pending 時另外每 5 秒輪詢。所以這些區塊的資料本來就是最新的,按鈕只是重抓同一份資料,看起來像「沒效果」。變更
移除(資料已自動更新)
UiActionMenu新增loadingprop)保留:頁首全域重整、錯誤訊息裡的重試、系統狀態「重新整理狀態」、備份清單重整(服務狀態與備份檔不在 SQLite,SSE 不會通知)。
修正誤導文案/圖示
E2E 原本點區塊重整按鈕觸發背景重抓,改成 dispatch
visibilitychange(work-intelligence.spec.ts已有前例)。UI skill 文件同步更新。驗證
pnpm --filter @work-intelligence/web typecheck、pnpm lint、pnpm format:check、web 單元測試 178 筆全部通過🤖 Generated with Claude Code