feat: add frosted glass appearance and improve local MCP recovery

Add an opt-in persistent frosted glass setting for the top bar and runtime checklist, with chat scrolling behind the header while preserving scroll anchors and window controls.

Retry transient local MCP initialization failures once after cleanup, include redacted connection diagnostics in feedback, and index lifecycle events to reduce execution statistics scans.

Release note: Add optional frosted glass appearance with chat visible behind the title bar; improve local tool connection recovery and diagnostic feedback.
This commit is contained in:
mesalogo
2026-09-30 23:37:26 +08:00
parent e4f7b8d993
commit f7f501a8e3
39 changed files with 1666 additions and 251 deletions
@@ -3709,6 +3709,8 @@ describe('AssistantDatabase', () => {
ALTER TABLE tasks DROP COLUMN current_user_message_id;
ALTER TABLE tasks DROP COLUMN remote_recoverable;
DROP INDEX task_events_remote_provenance_unique;
DROP INDEX task_events_remote_task_idx;
DROP INDEX task_events_lifecycle_idx;
ALTER TABLE task_events DROP COLUMN remote_event_index;
ALTER TABLE task_events DROP COLUMN remote_semantic_sequence;
ALTER TABLE task_events DROP COLUMN remote_operation_id;
+15 -1
View File
@@ -133,7 +133,7 @@ import {
SUBAGENT_PROGRESS_STORAGE_SCHEMA_VERSION
} from './subagent-progress-storage'
export const ASSISTANT_DATABASE_SCHEMA_VERSION = 51
export const ASSISTANT_DATABASE_SCHEMA_VERSION = 52
export type RemoteTaskEventInput = {
taskId: string
@@ -11895,6 +11895,20 @@ export class AssistantDatabase {
database.exec('PRAGMA user_version = 51; COMMIT;')
} catch (error) { database.exec('ROLLBACK'); throw error }
}
if (version.user_version < 52) {
database.exec('BEGIN IMMEDIATE')
try {
// Execution stats poll every few seconds. Filtering lifecycle and remote
// rows through task_events_task_idx reads every large stream payload row.
database.exec(`
CREATE INDEX IF NOT EXISTS task_events_lifecycle_idx
ON task_events(task_id, id) WHERE kind IN ('status', 'done', 'error');
CREATE INDEX IF NOT EXISTS task_events_remote_task_idx
ON task_events(task_id) WHERE remote_operation_id IS NOT NULL;
`)
database.exec('PRAGMA user_version = 52; COMMIT;')
} catch (error) { database.exec('ROLLBACK'); throw error }
}
}
supervisionReviewStore(): SupervisionReviewStore {
@@ -427,9 +427,12 @@ describe('execution duration evidence', () => {
const pairMs = (performance.now() - start) / 5
const query = prepare.mock.calls.find(([sql]) => sql.includes('WITH scoped AS MATERIALIZED'))![0]
const plan = raw.prepare(`EXPLAIN QUERY PLAN ${query}`).all(projectId).map(row => row.detail as string)
for (const alias of ['proof', 'remote', 'tail', 'previous', 'e']) {
for (const alias of ['proof', 'tail', 'previous']) {
expect(plan.some(detail => detail.includes(`SEARCH ${alias} USING INDEX task_events_task_idx`))).toBe(true)
}
// Filtering these through task_events_task_idx would read every payload row.
expect(plan.some(detail => detail.includes('SEARCH remote USING INDEX task_events_remote_task_idx'))).toBe(true)
expect(plan.some(detail => detail.includes('SEARCH e USING INDEX task_events_lifecycle_idx'))).toBe(true)
// Malformed bodies make accidental JSON extraction fail deterministically.
raw.prepare("UPDATE task_events SET payload_json = '{unparsed' WHERE task_id = ? AND kind IN ('text', 'tool')").run(id)
expect(database.getExecutionStats({ conversationId })).toMatchObject({ durationMs: 5000, requestCount: 1, incompleteRequestCount: 1 })