Agentic Review [4a]: Dead-code cleanup, filters-ref dedup, and review-mode ADR#35222
Agentic Review [4a]: Dead-code cleanup, filters-ref dedup, and review-mode ADR#35222yannbf wants to merge 2 commits into
Conversation
ab9a58e to
bf62f59
Compare
79a3ec6 to
fa5a073
Compare
bf62f59 to
4946ed5
Compare
fa5a073 to
54aace4
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe PR extracts a new ChangesReview mode hook extraction and cleanup
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
Comment |
91e8783 to
037a9fb
Compare
54aace4 to
a38a7d3
Compare
037a9fb to
0ac0627
Compare
a38a7d3 to
231d109
Compare
Package BenchmarksCommit: No significant changes detected, all good. 👏 |
| @@ -0,0 +1,51 @@ | |||
| # 1. Interaction-driven review mode | |||
There was a problem hiding this comment.
PR Looks good, we should remove this though
…-mode ADR Lower-risk, behavior-preserving cleanups split out of the larger PR4 mount-internalization work so they land independently green: - Remove the phantom `collapseNavOnOpen` field (emitted on DISPLAY_REVIEW and asserted in tests, read by nobody). - Delete dead code: the unused `AIBadge` component and the unused `storyPreviewUrl`/`isReviewStoryRoute`/`isReviewModeRoute` exports (the latter two were test-only with no production consumer) plus their tests. - Extract `useReviewFiltersRef`, collapsing the identical sidebar-filters snapshot that was triplicated across the provider, nav interceptor, and shortcuts hook. - Add the `docs/adr/0001-interaction-driven-review-mode.md` ADR that the code already referenced but which did not exist. The mount internalization, internal manager-api state module, server-cache move, and M8 prev/next dedup remain for the follow-up (PR4b). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
231d109 to
659695f
Compare
Remove docs/adr/0001-interaction-driven-review-mode.md and the comment pointer to it; the interaction-driven rationale stays inline on the review-mode session key.
What I did
The original PR4 (mount internalization + internal state module + server-cache move) is large and behavior-bearing. Research showed it's safest to split it. This is PR4a — the low-risk, behavior-preserving cleanups carved out so they land independently green and shrink the surface the heavy follow-up has to move. PR4a of the stack, telescoping on PR3 (#35220).
collapseNavOnOpenremoved. It was emitted on everyDISPLAY_REVIEWpayload and asserted inpreset.test.ts, but no consumer reads it. Removed from the emit and the test assertions.AIBadgecomponent; the unusedstoryPreviewUrlexport; andisReviewStoryRoute/isReviewModeRoute(test-only, no production consumer) plus their tests.useReviewFiltersRefextracted. The identical "snapshot the current sidebar filters into a ref" block was copy-pasted inReviewProvider,useReviewNavigationInterceptor, anduseReviewShortcuts. Now one hook.Deferred to PR4b (the heavy slice)
Mount internalization (render the review layer + toolbar header directly in core's Layout/Preview/Toolbar, delete
persistentRender+TOOLBAR_HEADER, revertrender: FC|null→FC), the internal manager-api review state module (retire the standalone store + module-globalsummaryOverlaySuppressed), the server-cache move into core-server, and the M8 prev/next dedup. Those are cross-package, API-breaking changes that deserve their own review.Stack position
Base:
review-core/03-route-and-rename(PR3, #35220).Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
For a maintainer:
cd code && yarn storybook:ui, push a review, and confirm the full flow is unchanged: summary ↔ story navigation, prev/next, keyboard shortcuts (←/→/↑/↓/esc), the collection picker, dismiss, and the "New" badge.Documentation
Checklist for Maintainers
ci:normalqa:neededmaintenance🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Refactor
Chores