Repository navigation
Conversation
|
|
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)
📝 WalkthroughWalkthroughPathless layout routes (path segments starting with ChangesPathless Layout Route Support
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
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: 1
🤖 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 `@code/frameworks/tanstack-react/src/export-mocks/react-router.test.ts`:
- Around line 4-11: The vi.mock() calls for 'storybook/test' and
'storybook/internal/preview-api' are missing the { spy: true } option and have
mock behaviors defined inline. Add { spy: true } as the third argument to both
vi.mock() calls, then move the mock behavior implementations out of the
vi.mock() calls and into a beforeEach block. In the beforeEach block, use
vi.mocked() to get type-safe references to the mocked modules and set up the
return values for the fn function and useEffect function respectively, following
the spy-mocking standards.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: aee17ef9-7439-4977-a988-364771d7eee7
📒 Files selected for processing (5)
code/frameworks/tanstack-react/src/export-mocks/react-router.test.tscode/frameworks/tanstack-react/src/export-mocks/react-router.tscode/frameworks/tanstack-react/src/routing/duplicate-tree.test.tscode/frameworks/tanstack-react/src/routing/duplicate-tree.tscode/frameworks/tanstack-react/template/stories/PathlessLayoutRoutes.stories.tsx
|
@Sidnioulz is it possible to get a review of this? |
Closes #
What I did
Fixes TanStack React stories that use file-route style pathless layout routes, so pure underscore layout routes stay id-only and duplicated story route trees preserve those id-only layout routes. Adds focused unit coverage and a framework template story that reproduces a pathless authenticated layout with nested dynamic routes.
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
Caution
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
yarn task sandbox --template tanstack-react-router/default-ts --start-from autocd ../storybook-sandboxes/tanstack-react-router-default-ts && yarn storybookPathlessLayoutRoutes / Preserves pathless layout route statestory.pathless route context, and route params textdragonborn:dragonborn.Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsDeclare whether manual QA will be needed for this PR during the next release, through
qa:neededorqa:skipMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>Summary by CodeRabbit