Fix 19 issues found in full codebase review
Backend:
- Stop session auth bypass: require auth for owned sessions, reject anonymous with 401
- upload_file: stream chunks directly to disk instead of buffering in RAM
- MCP config: validate name against path traversal regex
- auth deps: cleanup stale refresh locks periodically
- auth routes: expire mobile auth states after 10 min to prevent unbounded growth
- compressor: meta-summarize existing summaries before compression; preserve assistant content when tool_calls present; rewrite hard_truncate to keep whole turns
- orchestrator: configurable WS replay buffer size; async cleanup/remove_websocket/clear_busy; fix run_recall ContextVar order to avoid deadlock on _build_agent failure; await cleanup in finally
- agent: persist image_msg in session.messages; remove archived messages from session after archive; remove duplicate StreamStopped yield on tool stop
- websocket: try/except around create_task with cleanup on failure; await remove_websocket

Frontend:
- App.vue: hashchange listener lifecycle in onMounted/onUnmounted
- MessageList.vue: passive scroll, flash timeout cleanup, archive scroll snapshot
- InputBar.vue: 300 ms debounce on draft save to localStorage
- SessionList.vue: remove :key from DynamicScroller to avoid remount jitter

Tests: 422 passed, 1 skipped

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 182629b commit 5e88cf96209615c08771fdd72dce495b20530072
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 25 May
Showing 18 changed files
View
navi/api/routes/admin.py
View
navi/api/routes/auth.py
View
navi/api/routes/sessions.py
View
navi/api/websocket.py
View
navi/auth/deps.py
View
navi/core/agent.py
View
navi/core/compressor.py
View
navi/core/orchestrator.py
View
tests/unit/api/test_websocket.py
View
webclient/dist/assets/index-CPDLlpf3.css 0 → 100644
View
webclient/dist/assets/index-CbPtHzZw.js 0 → 100644
Not supported
View
webclient/dist/assets/index-D6rmlsNR.css 100644 → 0
View
webclient/dist/assets/index-JFBpqR6w.js 100644 → 0
Not supported
View
webclient/dist/index.html
View
webclient/src/App.vue
View
webclient/src/components/chat/InputBar.vue
View
webclient/src/components/chat/MessageList.vue
View
webclient/src/components/sidebar/SessionList.vue