perf: reduce streaming render cost and refresh activity page on demand

- Segment streaming Markdown so completed blocks are reused and only the growing tail is re-parsed; fall back to whole-document parsing for document-wide constructs
- Memoize conversation sidebar rows and cache per-conversation derived activity, ordering and pending approvals
- Activity page loads on entry, refreshes every 15 s while visible, and has a single header refresh button
- Include pending settings, model download source, device sharing and knowledge gateway changes in the working tree
- Add Electron streaming input benchmark and regression tests
This commit is contained in:
mesalogo
2026-10-01 21:49:09 +08:00
parent 016f987026
commit c8f327fc4e
75 changed files with 3042 additions and 905 deletions
+8
View File
@@ -35,6 +35,14 @@ void app.whenReady().then(async () => {
try {
await win.loadURL(process.env.GB_SHARING_RENDERER!)
await wait(`!![...document.querySelectorAll('article')].find(e => e.textContent.includes('Device Sharing'))`)
assert.equal(await js(`[...document.querySelectorAll('article')].find(e=>e.textContent.includes('Device Sharing')).querySelector('button').disabled`), true)
await js(`document.querySelector('[aria-label="Device Sharing (Technical Preview) Application settings"]').click()`)
await wait(`!!document.querySelector('input[role="switch"]')`)
assert.equal(await js(`document.querySelectorAll('input[role="switch"]').length`), 1)
await js(`document.querySelector('input[role="switch"]').click()`)
await wait(`document.querySelector('input[role="switch"]').checked`)
await js(`document.querySelector('[aria-label="Back to application center"]').click()`)
await wait(`!![...document.querySelectorAll('article')].find(e => e.textContent.includes('Device Sharing'))`)
await js(`[...document.querySelectorAll('article')].find(e=>e.textContent.includes('Device Sharing')).querySelector('button').click()`)
await click('Register this device')
await wait(`!!document.querySelector('#sharing-devices + article') || document.querySelector('[aria-labelledby="sharing-devices"]').textContent.includes('Sharing smoke device')`)