Conversation
…rs/rows - Fix table re-sorting when selecting a process with space bar by updating only the selection cell instead of rebuilding the entire table - Preserve cursor position when table is rebuilt (e.g., on refresh) by restoring cursor to the same PID after rebuild - Add click handler for table rows to toggle selection on click - Add click handler for column headers to sort by that column (PID, Name, RAM, CPU, CWD) - Refactor update_table to extract _filter_by_view and _restore_cursor helpers
Use truecolor console when generating CLI docs to prevent hex colors like #98f641 from being downgraded to basic ANSI colors like #00ff00 when running in non-TTY environments (pre-commit hooks).
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdded a "killable" TUI view with per-row click and header-click handlers, cursor restoration, view-based filtering, and Coordinate-based single-cell updates; switched CLI help rendering to use a dedicated truecolor Rich Console and HTML export; reflowed CLI docs; updated keybindings and project metadata. Changes
Sequence DiagramsequenceDiagram
actor User
participant DataTable as "DataTable"
participant App as "ProcessCleanerApp"
participant Store as "ProcessStore"
User->>DataTable: Click row
DataTable->>App: RowSelected event
App->>Store: toggle selection for PID
App->>DataTable: Update single cell using Coordinate (rgba(0, 128, 0, 0.5))
DataTable->>User: Refresh selection indicator
User->>DataTable: Click header (sort)
DataTable->>App: HeaderSelected event
App->>App: set sort key / view
App->>Store: _filter_by_view() -> list
App->>App: sort processes
App->>App: _restore_cursor(table, pid)
App->>DataTable: Repopulate rows
DataTable->>User: Display sorted/filtered table
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels: 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Add width=80 to Console for consistent CLI docs text wrapping - Save/restore parser.formatter_class in try/finally block - Use is_orphan_candidate instead of is_orphan in TUI orphans view - Make on_row_clicked use update_cell_at for consistency with action_toggle_select
1f1d898 to
865f39b
Compare
The orphan view was incorrectly changed to use is_orphan_candidate, which excludes tmux orphans. This created inconsistent behavior where processes would show [orphan] marker in All view but not appear in Orphans view. Changes: - Orphan view now correctly uses is_orphan (all orphans) - Added new Killable view using is_orphan_candidate (safe-to-kill orphans) - Added O keybinding for killable view - Updated AGENTS.md with new keybinding This maintains CLI/TUI consistency: -o shows orphans, -k shows killable.
📦 Test this PR (archived)
This PR has been merged. You can still test the final state: uvx --from git+https://github.com/kjanat/procclean@da9c6ac807a32c067259ffa415876107af942013 procclean📋 PR Details
Merge commit: Available commands: # Launch TUI (default)
uvx --from git+https://github.com/kjanat/procclean@da9c6ac807a32c067259ffa415876107af942013 procclean
# List processes
uvx --from git+https://github.com/kjanat/procclean@da9c6ac807a32c067259ffa415876107af942013 procclean list
# Show memory summary
uvx --from git+https://github.com/kjanat/procclean@da9c6ac807a32c067259ffa415876107af942013 procclean mem
# Show help
uvx --from git+https://github.com/kjanat/procclean@da9c6ac807a32c067259ffa415876107af942013 procclean --help🤖 Archived on merge |
columns is a dict[ColumnKey, Column], not indexable by int. ordered_columns is the list property that preserves column order.
get_row_at returns a list of cell values, not a row key. Also fix comment that incorrectly said 'tuple'.
Signed-off-by: Kaj Kowalski <info@kajkowalski.nl>
- Add try/except for ValueError/IndexError in cursor restore - Simplify groups view filter with list comprehension - Document sortable vs non-sortable columns in header click handler
- Add RowDoesNotExist exception handling in on_row_clicked to prevent crashes when auto-refresh removes rows mid-event - Populate labeling_instructions with all labels from .github/labels.yml - Fix column index comment (Status is at index 8, not 6)
Replace hardcoded column index iteration with get_row_index() using the PID-based row key. Falls back to row 0 when PID no longer exists.
Summary
Test plan
uv run proccleanrto refresh - verify cursor stays on the same processuv run pytest- all 233 tests passdocs/cli.mdcontains#98f641(not#00ff00)Summary by CodeRabbit
New Features
Improvements
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.