Current behavior
On the Sessions tab, the terminal/IDE badge (ITERM2, VSCODE, …) appears 0.5–1s after the rows themselves. Flow: the list paints immediately (SWR), then detectActiveSessions (process scan) runs in the background, then detectTerminalApps (process-tree walk / AppleScript per PID) fills the badges — only active sessions get one, and only after both async steps resolve.
Proposal: show the last-known badge first (SWR, same pattern as active dots)
- Keep the last successful
sessionId → terminalApp map (in-memory across window shows; optionally persisted so the first show after app start also benefits).
- Render the cached badge immediately for sessions that are active per the cached active map; replace/remove it when fresh detection resolves.
- Risk is minor: a stale badge for a session that moved to a different terminal between shows (rare; corrected within ~1s by the fresh pass).
Notes
🤖 On behalf of @grimmerk — generated with Claude Code
Current behavior
On the Sessions tab, the terminal/IDE badge (
ITERM2,VSCODE, …) appears 0.5–1s after the rows themselves. Flow: the list paints immediately (SWR), thendetectActiveSessions(process scan) runs in the background, thendetectTerminalApps(process-tree walk / AppleScript per PID) fills the badges — only active sessions get one, and only after both async steps resolve.Proposal: show the last-known badge first (SWR, same pattern as active dots)
sessionId → terminalAppmap (in-memory across window shows; optionally persisted so the first show after app start also benefits).Notes
docs/session-finding-plan.md.🤖 On behalf of @grimmerk — generated with Claude Code