feat(t03): improve performance and UX

- add category/tag caching and optimistic updates

- add stats dashboard aggregation and batched tracking

- add undo delete snackbar and group read-only view mode

- improve app-ready timeout handling and refresh guards
This commit is contained in:
2026-06-11 16:26:46 +08:00
parent 5a0ae0b28d
commit b33ebf0879
40 changed files with 761 additions and 132 deletions

View File

@@ -14,8 +14,8 @@ interface TrackEvent {
/** 上报队列(批量上报,减少请求) */
let eventQueue: TrackEvent[] = []
let flushTimer: number | null = null
const FLUSH_INTERVAL = 5000 // 5秒上报一次
const MAX_QUEUE_SIZE = 20
const FLUSH_INTERVAL = 500 // 500ms 攒批
const MAX_QUEUE_SIZE = 10 // 10 条立即发送
/** 获取当前页面路径 */
function getCurrentPage(): string {