fix: resolve Svelte(Kit) favicons#4448
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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 |
ApprovabilityVerdict: Approved Adds 6 new SvelteKit favicon path candidates to an existing array, with corresponding parameterized tests. Purely additive change with no impact on existing behavior. You can customize Macroscope's approvability policy. Learn more. |
What Changed
Favicons in default Svelte/SvelteKit directories get resolved to be displayed in the sidebar.
Why
The SvelteKit Tutorial and demo template places favicons in
static/, and the minimal template usessrc/lib/assets/. Neither of those two paths were previously resolved, showing as blank folders in the sidebar.#1613 was closed due to inactivity and conflicts. This PR is a tighter-focused re-implementation - it adds PNG, SVG and ICO favicons in those two directories to the list in
ProjectFaviconResolver.ts, tests for the newly added favicon directories, and makes path assertions in the tests be Windows-safe, in line with many other tests.UI Changes
Before/After
Checklist
Note
Add Svelte and SvelteKit favicon paths to
FAVICON_CANDIDATESExtends the well-known favicon candidate list in
ProjectFaviconResolver.tsto includestatic/favicon.(svg|ico|png)(afterpublic/) andsrc/lib/assets/favicon.(svg|ico|png)(aftersrc/favicon.*), covering standard Svelte and SvelteKit project layouts. Tests are updated to assert strict path equality usingpath.join(cwd, relativePath).Macroscope summarized 42a6f71.