You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🤖 Review panel read state tracking and visual improvements (#323)
## Overview
Implements comprehensive read state tracking for code review hunks with
visual improvements and workflow optimizations.
## Read State Tracking
- Content-based hunk IDs (hash of file path + line range + diff content)
ensure stable tracking across refreshes
- LRU eviction with 1024-entry limit prevents unbounded localStorage
growth
- Persisted per-workspace with localStorage
- Keyboard shortcut (m) to toggle read state
- Auto-collapse read hunks, auto-expand unread
## Visual Improvements
**Color System**
- Centralized review accent color (muted yellow/orange at 75% opacity)
- Blue color for read state indicators (strikethrough, borders)
- Removed hover border clash on active hunks
- Added anti-pattern comment for inline alpha usage
**FileTree**
- Strikethrough with blue color for fully-read files
- Dimmed text for unknown state (when file not loaded)
- Distinguished three states: unread (normal), fully read (dimmed +
strikethrough), unknown (dimmed only)
**Hunk Display**
- Active hunk gets yellow border for selection feedback
- Clicking line to comment activates parent hunk
- Read hunks show checkmark and blue border
- Collapsed state shows line count and read status
## Workflow Improvements
**Auto-navigation**
- Marking hunk as read (m) auto-advances to next unread hunk when "Show
read" is off
- Smart selection: next → previous → none
- Scroll selected hunk into view on j/k navigation
- Manual expand/collapse state respected independent of read state
**Review Notes**
- Keybind hints in placeholder: "j, k to iterate through hunks, m to
toggle as read"
- Shift-click to select line ranges
- Cmd+Enter to submit, Esc to cancel
## Testing
- Unit tests for LRU eviction logic
- Refactored to export `evictOldestReviews` from source (no duplication
in tests)
_Generated with `cmux`_
0 commit comments