Fix resolve() with BUILD_BASE_PATH and hash routes#1014
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (27)
✅ Files skipped from review due to trivial changes (5)
🚧 Files skipped from review as they are similar to previous changes (21)
📝 WalkthroughWalkthroughA new ChangesCustom resolve wrapper and site-wide migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
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 unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/lib/components/BookSelector.svelteOops! Something went wrong! :( ESLint: 9.39.4 The requested operation requires ESLint to serialize configuration data, Please double-check your configuration for errors. If you still have problems, please stop by https://eslint.org/chat/help to chat src/lib/components/BottomNavigationBar.svelteOops! Something went wrong! :( ESLint: 9.39.4 The requested operation requires ESLint to serialize configuration data, Please double-check your configuration for errors. If you still have problems, please stop by https://eslint.org/chat/help to chat src/lib/components/HistoryCard.svelteOops! Something went wrong! :( ESLint: 9.39.4 The requested operation requires ESLint to serialize configuration data, Please double-check your configuration for errors. If you still have problems, please stop by https://eslint.org/chat/help to chat
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 `@src/lib/utils/paths.ts`:
- Line 21: The hash normalization in the return statement of the
svelteKitResolve function call uses an unconditional replace pattern that
transforms already-normalized paths like `/#/text` into `//#/text`. Modify the
regex pattern in the replace method to only add the `/` prefix when `#` appears
at the start of the string or is not already preceded by `/`. This can be
achieved using a negative lookbehind assertion or by matching the context before
the `#` character.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 74568f18-3775-425a-9724-088de2889531
📒 Files selected for processing (26)
src/lib/components/BottomNavigationBar.sveltesrc/lib/components/HistoryCard.sveltesrc/lib/components/IconCard.sveltesrc/lib/components/Navbar.sveltesrc/lib/components/NoteDialog.sveltesrc/lib/components/PlanStopDialog.sveltesrc/lib/components/ScriptureViewSofria.sveltesrc/lib/components/Sidebar.sveltesrc/lib/components/TextSelectionToolbar.sveltesrc/lib/components/VerseOnImage.sveltesrc/lib/navigate/index.tssrc/lib/utils/paths.tssrc/routes/+page.sveltesrc/routes/bookmarks/+page.sveltesrc/routes/contents/[id]/+page.sveltesrc/routes/dev/icons/+page.sveltesrc/routes/highlights/+page.sveltesrc/routes/image/upload/+page.sveltesrc/routes/lexicon/+layout.sveltesrc/routes/lexicon/+page.sveltesrc/routes/notes/+page.sveltesrc/routes/plans/+page.sveltesrc/routes/plans/[id]/+page.sveltesrc/routes/plans/[id]/settings/+page.sveltesrc/routes/search/[collection]/[[savedResults]]/+page.sveltesrc/routes/text/+page.svelte
- projectService is already configured for Svelte files. This is needed for checking goto(resolve()) rule in index.ts file.
|
@coderabbitai review |
✅ Action performedReview finished.
|
FyreByrd
left a comment
There was a problem hiding this comment.
You missed one in BookSelector.svelte.
We also use asset from $app/paths, but I think this is not subject to the same problem, so should be fine.
- added comment to eslint config - replace missed usage of $app/paths
This was causing creating notes to fail since a full refresh was caused and loss of state.
Summary by CodeRabbit