Skip to content

feat: add updateSession API for runtime session policy updates#2440

Merged
broody merged 3 commits intomainfrom
feat/update-session
Feb 25, 2026
Merged

feat: add updateSession API for runtime session policy updates#2440
broody merged 3 commits intomainfrom
feat/update-session

Conversation

@broody
Copy link
Contributor

@broody broody commented Feb 24, 2026

Adds the ability to update session policies after initial connection without requiring a full reconnect.

Changes

  • Controller SDK: New UpdateSessionOptions type and updateSession() method on ControllerProvider that opens the keychain iframe, delegates to the keychain, and handles the response.
  • Keychain interface: New updateSession method on the Keychain interface accepting either direct policies or a preset name.
  • Keychain connection layer: New update-session.ts with URL construction, param parsing, and the Penpal-exposed factory function that navigates the iframe to /update-session.
  • Keychain UI: New UpdateSessionRoute component that resolves policies (directly or from a preset), auto-creates sessions for verified policies, and shows a consent screen for unverified ones.

@vercel
Copy link

vercel bot commented Feb 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
controller-example-next Ready Ready Preview Feb 25, 2026 1:03am
keychain Ready Ready Preview Feb 25, 2026 1:03am
keychain-storybook Ready Ready Preview Feb 25, 2026 1:03am

Request Review

Add the ability to update session policies after initial connection
without requiring a full reconnect.

- Add UpdateSessionOptions type and updateSession method to controller
- Add updateSession to Keychain interface
- Add keychain connection handler and URL routing utilities
- Add UpdateSessionRoute component with auto-create for verified policies
Ensure popup/iframe flows default to showing a close action instead of back navigation, while still allowing explicit force-back behavior.
@broody broody merged commit 4426cf0 into main Feb 25, 2026
12 checks passed
@broody broody deleted the feat/update-session branch February 25, 2026 01:03
@claude
Copy link
Contributor

claude bot commented Feb 25, 2026

Claude finished @broody's task —— View job


Documentation updated

Tasks

  • Analyze PR changes to determine if docs updates are needed
  • Explore docs repository structure
  • Identify canonical location for session API documentation
  • Review implementation to understand API behavior
  • Update documentation with new updateSession API

Summary

This PR adds a new user-facing API that requires documentation updates.

Change: New updateSession() method on ControllerProvider that allows updating session policies at runtime without requiring a full reconnect.

Documentation updated: Added new "Updating Session Policies" section to docs-repo/src/pages/controller/sessions.md with:

  • Explanation of when to use updateSession()
  • Code examples showing both preset and direct policy usage
  • Note about the approval flow

File modified: docs-repo/src/pages/controller/sessions.md

The documentation has been updated locally and is ready for review and commit by the docs repo maintainers.


tarrencev added a commit to cartridge-gg/docs that referenced this pull request Feb 25, 2026
Updates documentation to reflect changes made in:
    feat: add updateSession API for runtime session policy updates

    Related controller PR: cartridge-gg/controller#2440

Co-authored-by: github-actions[bot] <github-actions[bot]@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