Skip to content

Fix stale active workspace/tab state by syncing stopped sessions#172

Merged
andyrewlee merged 3 commits intomainfrom
active-fix
Feb 19, 2026
Merged

Fix stale active workspace/tab state by syncing stopped sessions#172
andyrewlee merged 3 commits intomainfrom
active-fix

Conversation

@andyrewlee
Copy link
Copy Markdown
Owner

@andyrewlee andyrewlee commented Feb 18, 2026

Summary

Describe the change and intended behavior.

Quality Checklist

  • Ran make devcheck locally.
  • Ran make lint-strict-new locally for changed code.
  • If UI/rendering changed, ran make harness-presets.
  • If tmux/e2e changed, ran go test ./internal/tmux ./internal/e2e.

Open with Devin

Copy link
Copy Markdown
Owner Author

@andyrewlee andyrewlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

andyrewlee and others added 2 commits February 18, 2026 15:48
…tate queries

Make syncActivitySessionStates a package-level function instead of an App
method since the receiver was unused — all data comes via parameters. This
makes it explicit the function doesn't touch App state, which matters since
it runs inside goroutines.

Also add AllSessionStates() to fetch all session states in a single tmux
call instead of per-session queries, reducing subprocess overhead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove redundant inner length check on stoppedTabCmds
- Replace inline running-like status checks with activity.IsRunningSession
- Document syncActivitySessionStates mutation contract at definition and call sites
- Add table-driven tests for IsRunningSession (types_test.go)
- Add unit tests for syncActivitySessionStates with stubTmuxOps
- Add integration tests for AllSessionStates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@andyrewlee andyrewlee merged commit f10b852 into main Feb 19, 2026
4 checks passed
@andyrewlee andyrewlee deleted the active-fix branch February 19, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant