fix: locate note entries after their content mounts
Cross-platform packages / Validate source (push) Canceled after 0s
Cross-platform packages / macos arm64 (push) Canceled after 0s
Cross-platform packages / Authorize desktop packaging (push) Canceled after 0s
Cross-platform packages / linux arm64 (push) Canceled after 0s
Cross-platform packages / windows arm64 (push) Canceled after 0s
Cross-platform packages / linux x64 (push) Canceled after 0s
Cross-platform packages / macos x64 (push) Canceled after 0s
Cross-platform packages / windows x64 (push) Canceled after 0s
Cross-platform packages / Publish GitHub and OSS release (push) Canceled after 0s

Quick Notes could open the full workspace before its selected record was mounted, losing the scroll request. Perform entry navigation after React commits and retain a deterministic regression. Align the manual-compaction fixture with layered model selection and loaded conversation state.

Release note: 从快速笔记打开完整记录时,等待目标内容挂载后再定位,避免偶发只打开页面却未滚动到所选记录。
This commit is contained in:
mesalogo
2026-09-30 19:46:13 +08:00
parent 89fc100d4f
commit 3be55348a2
7 changed files with 41 additions and 12 deletions
+3 -2
View File
@@ -48,7 +48,7 @@ void app.whenReady().then(async () => {
database.initialize(directory)
const project = database.listProjects()[0]!
const header = { id: randomUUID(), title: 'Manual compaction', projectId: project.id,
runtimeSelection: { provider: 'model' as const, profileId }, updatedAt: Date.now() }
runtimeSelection: { provider: 'model' as const, model: { kind: 'profile' as const, profileId } }, updatedAt: Date.now() }
const messages = ['Remember the project codename is Cedar.', 'Codename recorded.', 'Meeting is Tuesday.', 'Tuesday recorded.']
.map((content, index) => ({ id: randomUUID(), role: index % 2 ? 'assistant' as const : 'user' as const,
content, state: 'complete' as const, createdAt: Date.now() + index }))
@@ -73,6 +73,7 @@ void app.whenReady().then(async () => {
}
try {
await win.loadURL(process.env.GB_COMPACT_URL!)
await wait(() => run(`document.body.innerText.includes('Tuesday recorded.')`), 'selected conversation history rendered')
const button = `[...document.querySelectorAll('button')].find(e => e.textContent.trim() === 'Compact context')`
await wait(() => run(`Boolean(${button}) && !${button}.disabled`), 'manual button with auto disabled')
await run(`${button}.click()`)
@@ -94,7 +95,7 @@ void app.whenReady().then(async () => {
const next = createModelProfileRuntime(directory, settings, settings.modelProfiles[0]!)
try {
for await (const event of next.run({ requestId: randomUUID(), conversationId: header.id,
runtimeSelection: header.runtimeSelection, prompt: 'What is the codename?',
runtimeSelection: { provider: 'model', profileId }, prompt: 'What is the codename?',
history: messages.map(({ role, content }) => ({ role, content })), historyMessageIds: messages.map(({ id }) => id),
contextCompressionState: restored.contextCompressionState
}, AbortSignal.timeout(10000))) {