Add session continuation detection and web preview security#179
Draft
jamesrochabrun wants to merge 1 commit intomainfrom
Draft
Add session continuation detection and web preview security#179jamesrochabrun wants to merge 1 commit intomainfrom
jamesrochabrun wants to merge 1 commit intomainfrom
Conversation
Session continuation: detect when Claude Code creates a new session (e.g., "clear context and accept plan") and seamlessly transfer monitoring, terminal PTY, and sidebar selection to the new session. Persists session backup to survive app relaunch. Web preview: add WebPreviewNavigationPolicy for loopback/file URL allowlisting and DevServerReadinessProbe for polling dev server readiness before loading the preview.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.jsonlfile via kqueue directory watching, transfers monitoring/terminal PTY/sidebar selection to the new session, and persists session backup to survive app relaunch.WebPreviewNavigationPolicy(loopback + project-root allowlisting for WKWebView) andDevServerReadinessProbe(polls dev server until reachable before loading preview).Test plan
TransferMonitoringTests— 9 tests covering ID re-keying, terminal view, custom names, pending prompts, resolved continuations, state cleanup, no-op guards, backup-based session creationInsertSessionIntoRepositoryTests— insertion, dedup, no-op (3 tests)SyncMonitoredSessionBackupTests— timing guard, orphan cleanup, data freshness (3 tests)ContinuationViaPublisherTests— end-to-end Combine flow (2 tests)WebPreviewNavigationPolicyTests— allow/deny file URLs, loopback, external redirect (4 tests)DevServerReadinessProbeTests— readiness, timeout, stale (3 tests)