feat: ship v0.9.0 with pomodoro, achievements, and injection history

Add pomodoro timer with goal notifications, writing streak milestones, and knowledge injection logging with UI previews across AI writing flows.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-07 19:15:52 +08:00
parent 255f1a99a0
commit d4122c8f95
53 changed files with 1679 additions and 80 deletions
+27
View File
@@ -0,0 +1,27 @@
import { describe, it, expect, afterEach } from 'vitest'
import { DatabaseSync } from 'node:sqlite'
import { migrate } from '../../src/main/db/migrate'
import type { SqliteDb } from '../../src/main/db/types'
describe('migrate v8', () => {
let db: SqliteDb
afterEach(() => db?.close())
it('UT-MIG-08: v7 database migrates to v8 with injection table', () => {
db = new DatabaseSync(':memory:')
migrate(db)
const version = db.prepare('SELECT MAX(version) AS v FROM schema_version').get() as { v: number }
expect(version.v).toBe(8)
const table = db
.prepare(
"SELECT name FROM sqlite_master WHERE type='table' AND name='knowledge_injection_logs'"
)
.get()
expect(table).toBeTruthy()
const cols = db.prepare('PRAGMA table_info(knowledge_injection_logs)').all() as Array<{
name: string
}>
expect(cols.some((c) => c.name === 'knowledge_entry_id')).toBe(true)
expect(cols.some((c) => c.name === 'flow_mode')).toBe(true)
})
})