fix: address PR #1641 review comments (round 2)

- Remove duplicate TranscriptWatcher/config imports in worker-service.ts
- Use normalizePlatformSource in handleSessionInitByClaudeId for consistency
- Don't skip DB completion when session not in memory (completeByClaudeId)
- Add try-catch around fetch in useContextPreview refresh callback
- Deduplicate store.getAllProjects() call in DataRoutes
- Fix malformed comment separators in migration runner
- Fix missing closing brace and JSDoc opener (merge artifact) in migration runner

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2026-04-07 13:22:58 -07:00
parent c21e49d9fa
commit 25bb93a995
8 changed files with 218 additions and 213 deletions
+7 -2
View File
@@ -657,7 +657,8 @@ export class MigrationRunner {
this.db.run('BEGIN TRANSACTION');
try {
// =================================== // 1. Recreate observations table
// ===================================
// 1. Recreate observations table
// ===================================
// Drop FTS triggers first (they reference the observations table)
this.db.run('DROP TRIGGER IF EXISTS observations_ai');
@@ -731,7 +732,8 @@ export class MigrationRunner {
`);
}
// =================================== // 2. Recreate session_summaries table
// ===================================
// 2. Recreate session_summaries table
// ===================================
// Clean up leftover temp table from a previously-crashed run
this.db.run('DROP TABLE IF EXISTS session_summaries_new');
@@ -889,6 +891,9 @@ export class MigrationRunner {
this.db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at) VALUES (?, ?)').run(24, new Date().toISOString());
logger.debug('DB', 'Created observation_feedback table for usage tracking');
}
/**
* Add platform_source column to sdk_sessions for Claude/Codex isolation (migration 24)
*/
private addSessionPlatformSourceColumn(): void {