Skip to content

Add session creation and browsing to Mason chat UI - #487

Merged
elainewang-db merged 3 commits into
databricks:mainfrom
shivam5:mason-chat-new-session
Aug 28, 2026
Merged

Add session creation and browsing to Mason chat UI#487
elainewang-db merged 3 commits into
databricks:mainfrom
shivam5:mason-chat-new-session

Conversation

@shivam5

@shivam5 shivam5 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add POST /api/session/new to create a fresh UUID session and rotate the existing routing cookie
  • list recent actor-scoped managed sessions in the LangGraph chat UI, with the current local session as the in-memory fallback
  • allow opening a listed managed session after verifying actor ownership, then reload its transcript, pending HITL state, and recovery state
  • exclude internal durability sessions, checkpoints, heartbeats, and other runtime records from the session list and chat transcript responses
  • keep the desktop chat, session rail, and demo controls independently scrollable while preserving normal page scrolling on smaller screens
  • document the session APIs and add coverage for local and Databricks Apps cookie rotation

Routing behavior

The client still does not send session_id in invocation request bodies. The session id is the routing key:

  • deployed Apps use __Host-databricks-app-router
  • local development uses mason-local-session
  • the existing TODO to move API clients to X-Routing-Key remains

Creating or opening a session replaces the routing cookie, so sticky routing and the LangGraph thread/session id stay identical.

Session Store filtering

The Session Store continues to retain LangGraph checkpoints and durability events. The browser-facing session APIs only return message-shaped items with supported chat roles, and the session picker excludes internal mason-demo-durability execution sessions.

Validation

  • uv run pytest tests/unit_tests -q — 146 passed
  • generated mason init --framework langgraph --enable-chat-app project tests — 27 passed, 1 skipped
  • uv run ruff check src tests templates/agent-langgraph templates/ui/agent-langgraph
  • uv run ruff format --check src tests templates/agent-langgraph templates/ui/agent-langgraph
  • uv run ty check
  • node --check ui/app.js
  • headless Chrome verification at 1440×900 with a 30-message transcript

Account-routed workspace support

  • generated SDK clients forward DATABRICKS_WORKSPACE_ID as X-Databricks-Org-Id for account/vanity-host profiles
  • the generated LangGraph model adapter also forwards that routing header to the underlying sync and async OpenAI clients
  • MCP transports receive the same routing header without changing integrations/openai

Demo app

Additional E2E validation · August 28, 2026

  • clean editable Mason install and fresh mason init --framework langgraph --enable-chat-app scaffold
  • generated project: 30 passed, 1 skipped
  • local Apps proxy: session create/list/open, message-only transcript hydration, sync, streaming, background, memory create/list/search, and HITL resume
  • stop/start recovery retained tool_step_1 and tool_step_2, then resumed only tool_step_3 and tool_step_4 on a new process
  • deployed mason-pr487-185019: deployment SUCCEEDED, app RUNNING, compute ACTIVE

@elainewang-db
elainewang-db merged commit 6751053 into databricks:main Aug 28, 2026
49 of 50 checks passed
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.

2 participants