Skip to content

perf: terminal/IDE badge appears 0.5-1s late — show last-known badge first (SWR) #133

Description

@grimmerk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions