Skip to content

feat(ai): add session history with visual state restoration#2708

Merged
abose merged 7 commits intomainfrom
zz
Feb 23, 2026
Merged

feat(ai): add session history with visual state restoration#2708
abose merged 7 commits intomainfrom
zz

Conversation

@abose
Copy link
Member

@abose abose commented Feb 23, 2026

Add the ability to browse, resume, and delete past AI chat sessions. Sessions are stored per-project using StateManager metadata and JSON files on disk. The history dropdown shows recent sessions with relative timestamps, and clicking one restores the full visual state (messages, tool indicators, edits, errors, questions). Resumed sessions continue the Claude conversation via the SDK resume option.

Also adds a project-switch warning when AI is streaming, resets the chat UI on project open, and saves partial history when a query is cancelled so it can be resumed later.

Add the ability to browse, resume, and delete past AI chat sessions.
Sessions are stored per-project using StateManager metadata and JSON
files on disk. The history dropdown shows recent sessions with relative
timestamps, and clicking one restores the full visual state (messages,
tool indicators, edits, errors, questions). Resumed sessions continue
the Claude conversation via the SDK resume option.

Also adds a project-switch warning when AI is streaming, resets the
chat UI on project open, and saves partial history when a query is
cancelled so it can be resumed later.
47 tests covering session metadata storage, chat history file
round-trips, deletion, visual state restoration of all message
bubble types (user, assistant, tool, tool_edit, error, question,
edit_summary), and end-to-end save-load-render flows. Test data
is stored as JSON fixtures in ai-history-test-files/.
…in_test_iframe tool

The embedded Phoenix iframe inside SpecRunner was connecting to MCP
independently, causing instance confusion. Now only the SpecRunner
connects to MCP, and a new exec_js_in_test_iframe tool bridges JS
execution to the iframe when needed.
AI entitlement is not yet implemented in the backend. Use
getLiveEditEntitlement as a proxy for Pro plan status and add a
TODO with the full getAIEntitlement flow for when the backend
is ready.
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

@abose abose merged commit cd1d3c8 into main Feb 23, 2026
15 of 21 checks passed
@abose abose deleted the zz branch February 23, 2026 16:12
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