feat: ship v0.6.0 with cockpit, knowledge base, and chapter bridge

Deliver P5 writer workflow: writing cockpit, manual knowledge CRUD with review, chapter bridge with optional AI, publish status, and stock buffer reminders.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-06 23:03:11 +08:00
parent 78f046890d
commit b33d2e7b34
45 changed files with 2389 additions and 29 deletions
+24
View File
@@ -0,0 +1,24 @@
import { describe, it, expect, afterEach } from 'vitest'
import { DatabaseSync } from 'node:sqlite'
import { migrate } from '../../src/main/db/migrate'
import { KnowledgeRepository } from '../../src/main/db/repositories/knowledge.repo'
import type { SqliteDb } from '../../src/main/db/types'
describe('KnowledgeRepository', () => {
let db: SqliteDb
afterEach(() => db?.close())
it('UT-KNOW-01: CRUD and approve updates status', () => {
db = new DatabaseSync(':memory:')
migrate(db)
const repo = new KnowledgeRepository(db)
const entry = repo.create({
type: 'foreshadow',
title: '测灵石异常',
foreshadowStatus: 'buried'
})
expect(entry.status).toBe('pending')
const approved = repo.update(entry.id, { status: 'approved' })
expect(approved.status).toBe('approved')
})
})