Skip to content

fix(dashboard): align web session memory paths with chat history - #27

Draft
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/critical-bug-management-d115
Draft

fix(dashboard): align web session memory paths with chat history#27
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/critical-bug-management-d115

Conversation

@cursor

@cursor cursor Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes a critical data-path mismatch where Dashboard chat writes conversation memory to data/memory/dashboard/<user>/ while the UI reads history from data/memory/web/<user>/.

Bug and impact

  • Impact: Dashboard users appear to lose chat history on refresh; new turns are persisted under the wrong memory namespace and never show up in /chat/history.
  • Root cause: chat() / chat_stream() passed metadata={"source": "dashboard"}, which overrode the IPC gateway's source=web via setdefault semantics. _daemon_chat_db_path() resolves history from the web: session prefix.
  • Secondary: CLI /session switch to web:<user> left acquire owner as cli:root because _resolve_core_owner did not include web: sessions.

Fix

  • Remove the dashboard metadata source override from chat endpoints.
  • Always use source=web in _with_client() so IPC and session IDs align.
  • Extend _resolve_core_owner to remap web: sessions when callers pass CLI defaults.

Validation

  • tests/test_core_owner_resolve.py (web session owner resolve)
  • tests/test_kernel_runtime.py::test_dashboard_web_session_memory_owner_matches_history_path
Open in Web View Automation 

Dashboard chat passed metadata source=dashboard, routing writes to
data/memory/dashboard/<user> while history reads from web/<user>.
Also extend core owner resolve for web: session IDs switched via CLI.

Co-authored-by: Yuxuan Liu <Osc-7@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant