Repository navigation
Sync externally created Agent sessions into Desktop - #478
Merged
Merged
Conversation
…fresh
Sessions created by other clients (TUI/CLI/channels) reached the desktop
only via polling, and an imported thread stub never refreshed the sidebar
until a user action happened to call refreshStore.
Agent: publish a session_created control-plane event {sessionId,
createdBy, cwd} from AppState::create_session (new_session/fork/clone,
never disk hydration) on the renamed global events broadcaster; fork and
clone propagate the forking client's created_by so desktop-owned forks
announce themselves accurately.
Desktop: a session_events observer subscribes to the global stream and
imports announced external sessions within milliseconds (createdBy
desktop is skipped — the GUI manages its own thread rows); a new
threads-updated Tauri event makes AppShell refreshStore so the sidebar
shows imported threads immediately. import_missing_sessions emits the
same signal; the 1s/60s discovery polls remain as the backstop, and
import_discovered_session now honors deletion tombstones.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
tallcode
enabled auto-merge (squash)
September 3, 2026 06:32
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
session_creatednotifications after create/fork responses, carrying a stablecreatorIdwithout letting broadcast failures affect the lifecycle commandagent_session_idbindings in SQLite, reuse one concurrency-safe get-or-create import path, and replace the 1-second streaming poll with event-driven reconciliation plus a 60-second recovery passValidation
make generate-protocargo fmt --all -- --checkcargo fmt --check --manifest-path desktop/src-tauri/Cargo.tomlcargo clippy -p future-agent --all-targets -- -D warningscargo clippy --all-targets --manifest-path desktop/src-tauri/Cargo.toml -- -D warningsnpm --prefix desktop run lintgit diff --check origin/main...HEADFull test suites were not rerun after merging the latest
main; GitHub Actions owns final test execution.