Skip to content

[mason] Chat app: Capabilities refresh no longer wipes the conversation - #524

Open
akansal2 wants to merge 1 commit into
mainfrom
fix/mason-chat-capabilities-refresh
Open

[mason] Chat app: Capabilities refresh no longer wipes the conversation#524
akansal2 wants to merge 1 commit into
mainfrom
fix/mason-chat-capabilities-refresh

Conversation

@akansal2

@akansal2 akansal2 commented Sep 3, 2026

Copy link
Copy Markdown

What

In the Mason chat-app templates, the runtime Capabilities refresh button (#refresh-configloadConfig) also re-hydrated the chat log from the persisted transcript. Re-hydration rebuilds the log from the checkpoint / Session-Store transcript, which omits browser-only messages (errors) and empty-content assistant tool-call ("Tool request") bubbles — so clicking the Capabilities ↻ made messages disappear from the conversation.

Fix

Give loadConfig a hydrateChat flag:

  • The Capabilities refresh now calls loadConfig({ hydrateChat: false }) — refreshes the capability indicators only, leaves the conversation intact.
  • Initial page load still hydrates (loadConfig() defaults to true), so a reload still restores the conversation from the transcript.

Applied to both chat-app templates: agent-langgraph and agent-openai.

Testing

Scaffolded a langgraph chat app and ran it locally with mason dev: reproduced the bug (Capabilities ↻ dropped the tool-call and answer bubbles), applied the fix, hard-refreshed, and confirmed the Capabilities ↻ now leaves the conversation intact while a full page reload still restores it.

The runtime "Capabilities" refresh button (#refresh-config → loadConfig) also
re-hydrated the chat log from the persisted transcript. Re-hydration rebuilds the
log from the checkpoint/session-store transcript, dropping browser-only messages
(errors) and empty-content assistant tool-call ("Tool request") bubbles — so
clicking refresh made messages disappear.

Give loadConfig a `hydrateChat` flag: the Capabilities refresh now passes
hydrateChat=false (refresh the capability indicators only, leave the conversation
alone), while initial page load still hydrates so a reload restores the
conversation. Applied to both the langgraph and openai chat-app templates.

Co-authored-by: Isaac <no-reply@databricks.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