Skip to content

Persist MCP App success views across host remounts - #2971

Open
cipheraxat wants to merge 1 commit into
github:mainfrom
cipheraxat:fix/2965-mcp-app-view-state-persistence
Open

Persist MCP App success views across host remounts#2971
cipheraxat wants to merge 1 commit into
github:mainfrom
cipheraxat:fix/2965-mcp-app-view-state-persistence

Conversation

@cipheraxat

Copy link
Copy Markdown

Summary

  • Fixes Github MCP app forgets state across session open #2965: when you submit a PR/issue form and then switch chat sessions, the host remounts the iframe with the original deferral result and the SuccessView was lost.
  • Deferral results from NewToolResultAwaitingFormSubmission now carry _meta.viewUUID. The write/edit apps save completed state under a namespaced localStorage key and restore it synchronously on remount so the success screen shows on the first paint (no form flash).
  • Entries expire after 7 days so storage doesn't grow forever.

Test plan

  • go test ./pkg/utils/ ./pkg/github/ -count=1 (or at least the pullrequests + utils packages)
  • From ui/: npm ci && npm run typecheck && npm test && npm run build
  • Manual: open create PR / edit PR / create issue UI, submit successfully, switch away from the chat session and back — SuccessView should still be shown
  • Manual: start a new create-PR invocation — form should still appear (different viewUUID)

Deferral results now include _meta.viewUUID so pr-write, pr-edit, and
issue-write can restore SuccessView from localStorage after the host
tears down the iframe (e.g. switching chat sessions). Fixes github#2965.
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.

Github MCP app forgets state across session open

1 participant