Repository navigation
Agentic Review [1]: Standalone review core quality fixes - #35218
ghengeveld merged 1 commit into
Conversation
|
|
||
| /** Drop the review (reviewing) status type, which never contributes to sidebar/group rollups. */ | ||
| export const statusesExcludingReview = <T extends { typeId: string }>(statuses: T[]): T[] => | ||
| // Drop the review (reviewing) status type. Unlike the test rollup, the single group rollup |
There was a problem hiding this comment.
🤖 AI note (Claude Code), not written by Yann: This review-only exclusion is deliberately not unified with
NON_ROLLUP_STATUS_TYPE_IDS.getGroupStatusproduces the single catch-all rollup that feedsStatusContextand the search-result fallback status; if it also excluded change-detection, a component whose only signal is "modified" would show no rollup indicator at all. The test-slot rollups (which exclude both) are the ones unified. This is the documented B3-residual asymmetry — flagging it so a reviewer doesn't "fix" it into a behavior change.
|
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 (9)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (6)
📝 WalkthroughWalkthroughThe PR introduces ChangesStatus Aggregation and Change-Detection Icon Refactoring
Custom Query Params Centralization
Card Theme Color Helper Refactor
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes ✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
code/core/src/manager-api/tests/url.test.js (1)
123-138: ⚡ Quick winBroaden this regression test to cover the full layout-key boundary.
This case validates only
full/nav, butgetCustomQueryParamsexcludes seven layout keys. Includingpanel,shortcuts,addonPanel,tabs, andpathhere will catch partial regressions in the canonical filter.Suggested test hardening
- new URLSearchParams({ full: '1', nav: '0', collection: '2', tags: 'a11y' }).toString(), + new URLSearchParams({ + full: '1', + panel: 'bottom', + nav: '0', + shortcuts: '1', + addonPanel: 'controls', + tabs: '1', + path: '/story/button--primary', + collection: '2', + tags: 'a11y', + }).toString(),🤖 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 `@code/core/src/manager-api/tests/url.test.js` around lines 123 - 138, The test case for the initURL function currently only validates that the layout keys full and nav are filtered out from customQueryParams, but the actual getCustomQueryParams implementation excludes seven layout keys total. Expand the URLSearchParams object in the location.search to include the additional layout keys panel, shortcuts, addonPanel, tabs, and path alongside the existing full and nav parameters. The customQueryParams expectation should remain unchanged, verifying that only the genuinely custom params (collection and tags) are retained while all seven layout keys are properly consumed by the manager and excluded from the preview iframe params.
🤖 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.
Nitpick comments:
In `@code/core/src/manager-api/tests/url.test.js`:
- Around line 123-138: The test case for the initURL function currently only
validates that the layout keys full and nav are filtered out from
customQueryParams, but the actual getCustomQueryParams implementation excludes
seven layout keys total. Expand the URLSearchParams object in the
location.search to include the additional layout keys panel, shortcuts,
addonPanel, tabs, and path alongside the existing full and nav parameters. The
customQueryParams expectation should remain unchanged, verifying that only the
genuinely custom params (collection and tags) are retained while all seven
layout keys are properly consumed by the manager and excluded from the preview
iframe params.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5e47ed98-8d77-47fd-b9b1-486f8525297b
📒 Files selected for processing (9)
code/core/src/components/components/Card/Card.tsxcode/core/src/manager-api/modules/url.tscode/core/src/manager-api/root.tsxcode/core/src/manager-api/tests/url.test.jscode/core/src/manager/components/sidebar/Tree.tsxcode/core/src/manager/globals/exports.tscode/core/src/manager/utils/status.tsxcode/core/src/shared/status-store/index.tscode/core/src/types/modules/status.ts
ghengeveld
left a comment
There was a problem hiding this comment.
The term "rollup" is confusing and does not intuitively convey its meaning to us. Use another term.
b9ebd60 to
396b6cf
Compare
…us logic Standalone core quality fixes, net-positive regardless of the review integration: - M5: derive customQueryParams from one canonical helper (getCustomQueryParams in manager-api/modules/url.ts). root.tsx's getDerivedStateFromProps stopped stripping only `path`, which leaked layout params (full/panel/nav/...) into the params forwarded to the preview iframe and blanked the canvas when leaving a review. - M7: extract a shared shouldShowChangeStatus predicate so the sidebar Tree and getSidebarVisibleStatus no longer duplicate the change/test icon decision. - M10: unify the test-status rollup exclusion behind one NON_ROLLUP_STATUS_TYPE_IDS set (change-detection + review excluded by the same mechanism); the single group rollup intentionally keeps change-detection and is documented as such. - M11: replace Card's cast-heavy, silent-undefined color helpers with a single typed resolveThemeColor accessor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
396b6cf to
73dd7c5
Compare
d429d6e
into
yann/agentic-review-mcp-integration
What I did
Standalone core quality fixes for the manager — net-positive regardless of the review integration, no breaking changes. This is PR1 of a 5-PR stack integrating the review feature into core; it telescopes off
yann/agentic-review-mcp-integration(#34837) and resolves review findings M5, M7, M10/B3-residual, M11.customQueryParams(the bug fix). A new canonical helpergetCustomQueryParamsinmanager-api/modules/url.tsstrips the layout params (full, panel, nav, shortcuts, addonPanel, tabs, path) in exactly one place. Previouslyroot.tsx'sgetDerivedStateFromPropsre-derivedcustomQueryParamsstripping onlypath, so layout params leaked into the params forwarded to the preview iframe — blanking the canvas when navigating out of a review. Both init and navigation now use the same helper, so they can't diverge.shouldShowChangeStatus(changeStatus, isModifiedFilterActive)predicate soTree.tsxandgetSidebarVisibleStatusno longer each re-implement the change-vs-test icon decision.NON_ROLLUP_STATUS_TYPE_IDSset (in the canonicalshared/status-store) so change-detection and review are excluded from the test-status rollup by the same mechanism. The single group rollup (getGroupStatus) intentionally still keeps change-detection — documented inline.Cardcolor resolution. Replaced the threein-probe helpers (cast-heavy, silentundefined) with a single typedresolveThemeColoraccessor — zero casts, explicit fallbacks.Stack position
Base:
yann/agentic-review-mcp-integration(#34837). This is the bottom of the stack; PR2–PR5 telescope on top. Review bottom-up.Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
Steps for a maintainer to verify the M5 fix (canvas no longer blanks):
yarn task sandbox --template react-vite/default-ts --start-from auto(orcd code && yarn storybook:ui).display-reviewMCP tool /scripts/display-review.ts), enter review mode, and open one of the curated stories.?full=1/?nav=0— fullscreen/nav still toggle, and those params are not echoed into preview-forwarded query params.Cardstories render identically in light/dark (including theagenticcolor).Documentation
No docs/MIGRATION changes — internal manager refactors with a single user-visible bug fix.
Checklist for Maintainers
ci:normal,ci:mergedorci:dailyGH label to itqa:needed/qa:skip)bug)🤖 Generated with Claude Code
Summary by CodeRabbit
customQueryParams.