Conversation
|
Warning Review limit reached
Next review available in: 53 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdded a private helper ChangesHidden Sheet Feature
Estimated code review effort: 1 (Trivial) | ~5 minutes Sequence Diagram(s)sequenceDiagram
participant Test as test_write_excel_hidden_sheet
participant Writer as write_output_file
participant Worksheet as create_worksheet
Test->>Writer: write_output_file(scan_item)
Writer->>Worksheet: create_worksheet(sheet_name)
Worksheet->>Worksheet: _should_hide_sheet(sheet_name)
alt name starts with "."
Worksheet->>Worksheet: worksheet.hide()
end
Test->>Test: reload workbook and assert sheet_state
Related PRs: None identified Suggested labels: enhancement, tests Suggested reviewers: None identified 🐰 A dot before a name, so clever and slight, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/fosslight_util/write_excel.py (1)
232-245: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winHide check runs after sheet-name truncation, so long dot-prefixed names silently stay visible.
_should_hide_sheet(sheet_name)at Line 244 is evaluated againstsheet_nameafter it may have been replaced bycurrent_time(Lines 237-239) when the original name exceeds 31 characters. In that case the original dot-prefix intent is lost entirely and the sheet is created visible, silently defeating the new feature for this class of input.🔧 Suggested fix: evaluate hide intent before truncation
def create_worksheet(workbook, sheet_name, header_row): + should_hide = _should_hide_sheet(sheet_name) if len(sheet_name) > 31: current_time = str(time.time()) sheet_name = current_time worksheet = workbook.add_worksheet(sheet_name) if header_row: for col_num, value in enumerate(header_row): worksheet.write(0, col_num, value) - if _should_hide_sheet(sheet_name): + if should_hide: worksheet.hide() return worksheet🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/fosslight_util/write_excel.py` around lines 232 - 245, Hide-sheet intent is being lost in create_worksheet because _should_hide_sheet() is checked after sheet_name may be replaced when it exceeds the workbook limit. Update create_worksheet so the original sheet_name is inspected for the dot-prefix before any renaming/truncation, preserve that hide flag separately, and then apply worksheet.hide() based on the preserved value even if the final worksheet name changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/fosslight_util/write_excel.py`:
- Around line 232-245: Hide-sheet intent is being lost in create_worksheet
because _should_hide_sheet() is checked after sheet_name may be replaced when it
exceeds the workbook limit. Update create_worksheet so the original sheet_name
is inspected for the dot-prefix before any renaming/truncation, preserve that
hide flag separately, and then apply worksheet.hide() based on the preserved
value even if the final worksheet name changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7f35e6a0-789b-40b6-b98a-c8c7f1eb6b5d
📒 Files selected for processing (2)
src/fosslight_util/write_excel.pytests/test_write_excel_hidden_sheet.py
Summary by CodeRabbit
Bug Fixes
Tests
.xlsxfiles for both hidden and visible sheet names.