refactor(app): extract RightPanelTabStrip and RightPanelReviewBody from SessionSidePanel#890
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR extracts the right-panel UI from ChangesRight-Panel Component Extraction
CI Labeler Configuration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 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.
Suggested priority: P2 (includes user-path files (packages/app/src/pages/session/helpers.ts, packages/app/src/pages/session/right-panel-review-body.tsx, packages/app/src/pages/session/right-panel-tab-strip.tsx, packages/app/src/pages/session/session-side-panel.tsx)).
P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.
There was a problem hiding this comment.
Code Review
This pull request refactors the session side panel by extracting logic into dedicated components, specifically creating RightPanelReviewBody and RightPanelTabStrip, while moving utility functions to a helper file. The review feedback identifies opportunities to optimize SolidJS performance within the new RightPanelReviewBody component by removing the keyed attribute from Show components. This change ensures that child components like FileTabContent and the drag overlay can handle reactive updates without unnecessary unmounting and remounting, thereby preserving internal state and improving efficiency.
Perf delta summaryComparator: pass
|
The task rule in labeler.yml auto-assigned the task type label for .github/workflows/** changes and — because sync-labels is true — removed manually-added task labels for all other paths. Type labels (bug, enhancement, task, documentation) are human judgment; no other type label has an auto-assignment rule. Removing the task rule fixes the pr-triage failure on PR #890.
…om SessionSidePanel Move 5 exported helpers (formatRightPanelWidth, makeRightPanelResizeHandler, shouldShowReviewFileOpenButton, sortableShellTabIds, openReviewShellTab) to helpers.ts and re-export from session-side-panel.tsx for backwards compat. Extract the portalled titlebar tab strip into RightPanelTabStrip, including RightPanelShellIcon. Extract the nested review-body (inner Tabs, DnD provider, file tab switching) into RightPanelReviewBody with its own DnD handlers and drag store. SessionSidePanel shrinks from 583 to 339 lines as a thin shell that owns the resize handle, open/bodyMounted lifecycle, and Tabs.Content dispatch. Closes #889
…ewBody - Replace t/keybind props with useLanguage()/useCommand() context hooks - Move helper re-export block to end of session-side-panel.tsx - Restore Portal/gap/spacer design constraint comments in RightPanelTabStrip - Verified: bun test (12 pass), typecheck (clean), snap right-panel-titlebar (pass), snap right-panel-tabs-hover (pass)
The task rule in labeler.yml auto-assigned the task type label for .github/workflows/** changes and — because sync-labels is true — removed manually-added task labels for all other paths. Type labels (bug, enhancement, task, documentation) are human judgment; no other type label has an auto-assignment rule. Removing the task rule fixes the pr-triage failure on PR #890.
1f6d238 to
412e132
Compare
Summary
RightPanelTabStrip,RightPanelReviewBody)helpers.ts, re-exported fromsession-side-panel.tsxfor backwards compatibilitySessionSidePanelshrinks from 583 to 339 linespr-triagefailure: removes auto-assignedtaskrule from.github/labeler.yml(type labels are human judgment; no other type label has an auto-assignment rule)Verification
bun test— 12 pass, 0 fail (including all gating-contract tests)bun run typecheck— cleanbun run lint— cleanbun run snap right-panel-titlebar— passbun run snap right-panel-tabs-hover— pass (all tab positions, hover states, light/dark themes unchanged)Changed files
.github/labeler.yml— removed auto-assignedtaskrule (−5 lines)packages/app/src/pages/session/helpers.ts— added 5 helpers (+32 lines)packages/app/src/pages/session/session-side-panel.tsx— thin shell (583 → 339 lines)packages/app/src/pages/session/right-panel-tab-strip.tsx— new (136 lines)packages/app/src/pages/session/right-panel-review-body.tsx— new (178 lines)Closes #889
Summary by CodeRabbit