feat: 자동 생성 세션 필터와 워크트리 부모 묶기 - #43
Conversation
|
Warning Review limit reached
Next review available in: 55 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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 Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthrough세션 스캐너가 Changes에이전트 세션 표시
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant SettingsDialog
participant Preferences
participant App
participant Sidebar
participant buildGroups
SettingsDialog->>Preferences: showAgentSessions 저장
Preferences-->>App: 설정 로드
App->>buildGroups: 프로젝트와 표시 설정 전달
buildGroups-->>Sidebar: 표시 세션 그룹 반환
Sidebar-->>Sidebar: 필터링된 세션과 agent 배지 렌더링
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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.
Actionable comments posted: 2
🤖 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.
Inline comments:
In `@src/main/lib/scanner.test.ts`:
- Around line 39-41: Update the afterEach cleanup in the scanner tests to
recursively remove the temporary directory created by mkdtempSync, using the
existing root symbol, while preserving the CHV_DATA_DIR environment cleanup.
In `@src/main/lib/worktree.ts`:
- Line 10: Update DIR_MARKER and the fallback logic used when realPath is null
so encoded worktree paths with hyphenated tool names, such as
.my-tool/worktrees/..., match the marker boundary and extract the worktree name
correctly. Preserve existing behavior for non-hyphenated names, and add a
regression test covering .my-tool with realPath === null to ensure the session
is identified as a worktree and grouped under its parent repository.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 56cf4f7b-df65-4b2c-8ac3-df401022c3d1
📒 Files selected for processing (16)
src/main/lib/scanner.test.tssrc/main/lib/scanner.tssrc/main/lib/sessionOrigin.test.tssrc/main/lib/sessionOrigin.tssrc/main/lib/settings.tssrc/main/lib/worktree.test.tssrc/main/lib/worktree.tssrc/renderer/src/App.tsxsrc/renderer/src/components/SettingsDialog.tsxsrc/renderer/src/components/Sidebar.tsxsrc/renderer/src/i18n.tssrc/renderer/src/lib/groups.test.tssrc/renderer/src/lib/groups.tssrc/renderer/src/prefs.tssrc/renderer/src/styles/app.csssrc/shared/types.ts
세션 목록에 섞여 들어오던 두 가지 잡음을 걷어낸다.
1. 자동 생성 세션 필터
도구가 백그라운드로 돌린 헤드리스 세션(브랜치명 자동 생성, 자동 리뷰 등)이 사람이 연 대화와 구분 없이 목록에 쌓였다. 실측 표본에서 전체 세션의 약 3분의 1을 차지했다.
세션 엔트리의
entrypoint값으로 가른다.sdk-로 시작하면 도구가 띄운 것,cli면 사람이 연 것이다. 표본 전량에서 이 한 필드로 정확히 갈렸고, 프롬프트 문구를 추측하는 방식은 쓰지 않았다.자동배지가 붙는다entrypoint가 없는 예전 세션은 사람이 연 것으로 본다 — 자동 세션을 잘못 노출하는 편이 사람의 대화를 숨기는 것보다 낫다판정은 메인에서 하고 숨길지 여부는 렌더러가 정한다. 메인에서 걸러 보내면 토글을 만질 때마다 전체 재스캔이 필요한데, 체크박스 하나에 치를 대가가 아니다.
entrypoint는 기존 파일 스캔이 이미 읽는 구간에 있어 I/O 가 늘지 않는다.함께 고친 것
세션이 0개인 프로젝트를 상태에서 지워버리고 있었다. 이대로면 토글을 다시 켜도 그 프로젝트가 돌아오지 않는다. 상태에서 지우는 대신 렌더 시점에 거르도록 옮겼다.
2. 워크트리를 부모 저장소로 묶기
워크트리 세션을 부모 저장소 아래로 접어 넣는 로직이 특정 도구의 경로 규칙에만 걸려 있었다. 다른 도구가 만든 워크트리는 전부 별도 최상위 항목으로 흩어졌고, 실측 표본에서는 그쪽이 오히려 더 많았다.
도구명을 하드코딩하는 대신
/.<도구>/worktrees/패턴으로 감지한다. 새 도구가 생겨도 코드를 고칠 필요가 없다.cwd기록이 있으면 경로를 그대로 가르므로 하이픈이 든 저장소명도 정확하다판정을
scanner.ts에서worktree.ts로 떼어냈다. 스캔·메타 읽기·워크트리 판정이 한 파일에 얽혀 있어 테스트가 어려웠다.결과
실측 표본 기준으로 워크트리 인식률이 3배 가까이 오르고, 최상위 항목이 절반 수준으로 줄었다. 한 저장소의 워크트리들이 도구와 무관하게 한자리에 모인다.
검증
typecheck·lint통과🤖 Generated with Claude Code
Summary by CodeRabbit