perf: preload and cache countdowns
ci / docker (push) Successful in 3m49s

This commit is contained in:
2026-09-07 17:50:26 +08:00
parent 635930db50
commit a02b6f660c
6 changed files with 64 additions and 5 deletions
+8 -1
View File
@@ -156,6 +156,13 @@ describe('mobile touch targets', () => {
})
describe('unified floating add interaction', () => {
it('preloads countdowns after authentication', () => {
expect(app).toContain('void preloadCountdowns()')
expect(app).toContain("const active = await api('/countdowns')")
expect(app).toContain("const archived = await api('/countdowns?archived=true')")
expect(app).toContain('writeCountdownCache(active ?? [], archived ?? [])')
})
it('reuses one draggable FAB component for task, habit, and countdown views', () => {
expect(app).toContain("import FloatingAddButton from './components/FloatingAddButton.vue'")
expect(app).toContain('<FloatingAddButton')
@@ -254,7 +261,7 @@ describe('sidebar layout', () => {
})
it('loads archived lists during bootstrap so archived rows are visible after refresh', () => {
expect(app).toContain('expandedFolders.value = new Set(folders.value.map((folder) => folder.id))\n await loadArchivedLists()\n await loadAll()')
expect(app).toContain('expandedFolders.value = new Set(folders.value.map((folder) => folder.id))\n await loadArchivedLists()\n void preloadCountdowns()\n await loadAll()')
})
it('styles archived rows through the new list-row-main structure', () => {