-
Notifications
You must be signed in to change notification settings - Fork 79
Add Session Marker System for Activity Tracking #255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Session Marker System for Activity Tracking #255
Conversation
- Add marker package for persistent session:window marking - Implement mark/unmark CLI commands with aliases - Prioritize marked sessions in listing with 📌 icon - Add --marked flag to filter only marked sessions - Integrate marker state in SeshSession model - Sort marked sessions by timestamp (newest first)
- Implement 10-second inactivity timer with 3 alert levels - Add background highlighting (gray/red) for alert urgency - Track window activity timestamps and alert start times - Add GetAlertLevel() and UpdateActivity() methods to marker interface - Sort marked sessions by alert level priority - Support direct window connection via session:window(number) format - Add individual window entries for granular monitoring - Add tmux GetWindowName() method for window name extraction Features working: - Mark/unmark specific session:window combinations - Alert level progression: 0-1min (gray), 1-5min (red), 5+min (urgent red) - Direct window targeting and connection - Proper ANSI color stripping and session name parsing - Individual window visibility (e.g. 'sesh config:ping(3)') Known issue: - fzf preview command causes interface instability with complex session names
- Use tmux's actual window activity timestamps instead of manual tracking - Add ResetAlertForWindow functionality to reset alerts when navigating to marked windows - Integrate marker into connector to automatically reset alerts on connection - Fix alert timing logic to provide proper grace period after navigation - Prevent false alerts on continuously active processes like ping
- Fix marked sessions filtering to respect source filters (config vs tmux)
- Enhance preview to show specific window content for marked sessions
- Add comprehensive fzf script with all official bindings:
* Ctrl+A: all sessions
* Ctrl+T: tmux sessions only
* Ctrl+G: config sessions only
* Ctrl+X: zoxide directories
* Ctrl+D: kill sessions (with proper {2..} syntax)
* Ctrl+F: find directories with fd
* Ctrl+R: marked sessions (custom enhancement)
- Resolve Ctrl+M/Enter conflict by using Ctrl+R for marked sessions
- Create working fzf-tmux integration scripts in scripts/ directory
Allow users to customize marker alert timing through sesh.toml configuration. Added MarkerConfig struct with inactivity_threshold, alert_level_1_time, alert_level_2_time, and alert_level_3_time fields. Provides sensible defaults (10s, 60s, 300s, 600s) while enabling full user customization.
Remove experimental fzf scripts that are no longer needed. Keep only the working scripts that are actively used by tmux configuration. Update path references to use standard sesh command.
- Convert spaces to underscores in session names (namer/convert.go) - Add comprehensive tests for whitespace handling - Improve display layer cleaning for better readability - Ensure tmux commands work with sessions containing spaces Fixes issue where sessions with whitespace in names couldn't be switched to.
- Improve cleanDisplayName function to handle ANSI color codes and icons properly - Preserve space between icon and session name in display - Convert spaces to underscores only in session names, not icon separators - Add fallback connection logic in fzf script for underscore display names - Fix marker display to properly handle marked sessions with icons - Enable seamless switching to sessions with spaces in names This resolves the issue where sessions with whitespace couldn't be properly selected and connected to from the fzf interface.
- Handle display format conversion (spaces to underscores) when checking marked status - Silence sesh mark/unmark command output to avoid duplicate messages - Only show clean tmux display messages in status bar
|
Thank you so much for putting time and effort into the PR - I really appreciate the work you've done here. While I can see the value in some of the concepts you've implemented, I don't think this approach is quite the right fit for this particular project. The scope feels out of place for what I'm trying to achieve with sesh, and I think this kind of workflow would actually work really well as its own dedicated tmux plugin where it could be fully developed and shine on its own. Thanks again for your contribution and for thinking creatively about this space! |
Overview
Adds a new marker system allowing users to mark specific tmux session:window combinations for monitoring. Marked sessions show visual indicators (📌) and background color alerts based on inactivity duration.
Also fixes #247 by implementing comprehensive whitespace handling for session names while preserving user experience.
Features
sesh markandsesh unmarksesh list --iconsoutputsesh.toml--markedflag to filter only marked sessionsUse Case
Perfect for monitoring long-running processes (builds, servers, etc.) across multiple tmux sessions. Users can mark important windows and get visual feedback when they've been inactive.
Whitespace Fix Details (Addresses #247)
namer/convert.goconverts spaces to underscores🔵 session_namevs broken🔵_session_name)Configuration
Implementation
Note
Tests fail due to missing mock implementations for new interface methods. Mocks need regeneration for new Marker interface and updated Home/Tmux interfaces. This is expected for new features that extend existing interfaces.