pub enum AppEvent {
Show 13 variants
ReposDiscovered {
repos: Vec<Repo>,
session_activity: HashMap<String, u64>,
},
ReposFound {
repo: Repo,
},
ScanComplete {
search_dirs: Vec<(PathBuf, u16)>,
},
WorktreeCreated {
path: PathBuf,
session_name: String,
},
WorktreeRemoved {
branch_name: String,
worktree_path: PathBuf,
},
WorktreeRemoveFailed {
branch_name: String,
worktree_path: PathBuf,
error: String,
},
BranchesLoaded {
branches: Vec<BranchEntry>,
worktrees: Vec<Worktree>,
local_names: Vec<String>,
session_activity: HashMap<String, u64>,
},
RemoteBranchesLoaded {
branches: Vec<BranchEntry>,
},
GitFetchCompleted {
branches: Vec<BranchEntry>,
repo_path: PathBuf,
is_final: bool,
},
RepoEnriched {
repo_path: PathBuf,
worktrees: Vec<Worktree>,
},
SessionActivityLoaded {
session_activity: HashMap<String, u64>,
},
AgentStatesUpdated {
states: Vec<(String, Option<AgentStatus>)>,
},
GitError(String),
}Expand description
Events that arrive asynchronously from background tasks. These get merged into the main event loop alongside keyboard input.
Variants§
ReposDiscovered
Repository discovery completed (full batch — replaces repo list)
ReposFound
Single repo discovered during streaming scan (appended to existing list)
ScanComplete
All scan threads finished — triggers collision resolution and final sort.
Carries search_dirs so collision resolution can use the correct search dir names.
WorktreeCreated
A background git operation completed successfully
WorktreeRemoved
A worktree was successfully removed
WorktreeRemoveFailed
A worktree removal failed
BranchesLoaded
Local branches loaded
Fields
branches: Vec<BranchEntry>RemoteBranchesLoaded
Remote branches loaded (appended after local)
Fields
branches: Vec<BranchEntry>GitFetchCompleted
Background git fetch completed for one remote (or all remotes if is_final).
Fields
branches: Vec<BranchEntry>RepoEnriched
Single repo enriched with worktree data (streamed from phase 2)
SessionActivityLoaded
Session activity data loaded (from tmux, sent once)
AgentStatesUpdated
Agent states updated from background detection (full snapshot —
None means no agent detected, allowing stale statuses to be cleared)
Fields
states: Vec<(String, Option<AgentStatus>)>GitError(String)
A background git operation failed