-
Notifications
You must be signed in to change notification settings - Fork 121
fix: backup automation mock + Claude probes dashboard alias #2293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+35
−4
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Runfusion/Fusion
Length of output: 297
🏁 Script executed:
Repository: Runfusion/Fusion
Length of output: 16186
🏁 Script executed:
Repository: Runfusion/Fusion
Length of output: 14944
🌐 Web query:
Vite resolve.alias array order first match prefix exact string alias subpath documentation💡 Result:
In Vite, the resolve.alias configuration supports either an object or an array of objects [1][2]. When using the array format (Array<{ find: string | RegExp, replacement: string }>), the order of the entries is significant because Vite processes them sequentially and applies the first matching rule it encounters [1][3]. Key points regarding order, prefix matching, and string aliases: 1. Order Matters: Vite evaluates aliases in the order they are defined in the array [1][4]. The first rule that matches the import path will be applied, and subsequent rules for that path will be ignored [3]. 2. Prefix Collisions: If you have aliases that share a common prefix (e.g.,
@appand@app/components), the more specific alias (the longer path) must be defined before the more general alias [3]. If the general alias is listed first, it will intercept and handle the import, preventing the more specific rule from ever being evaluated [3]. 3. Array vs. Object: While the object format (Record<string, string>) is convenient for simple, exact-prefix mapping, it does not guarantee evaluation order in the same explicit way as an array [2][3]. The array format is required when you need to use Regular Expressions for complex patterns or when you must strictly control the precedence of competing aliases [1][3]. To ensure correct resolution, always order your alias array from the most specific paths to the most general ones [3]. Example of correct ordering: resolve: { alias: [ { find: '@app/components', replacement: '/absolute/path/to/components' }, // More specific first { find: '@app', replacement: '/absolute/path/to/app' } // Less specific second ] }Citations:
🌐 Web query:
Vite object alias string prefix matching order specific alias before base object syntax💡 Result:
In Vite, the resolve.alias configuration—whether defined as an object or an array—is processed in the order specified, with the first matching rule taking precedence [1][2][3]. Because Vite evaluates these entries sequentially and stops at the first successful match, the order of your aliases is critical, especially when dealing with overlapping or nested path prefixes [3]. When multiple aliases share a common prefix (e.g.,
@coreand@core/auth), defining the more specific alias before the less specific one ensures that the correct path is resolved [3]. If the less specific alias (e.g.,@core) is defined first, it will intercept imports intended for the more specific one (e.g.,@core/auth) [3]. Key points regarding configuration: - Array Format: The array format (Array<{ find, replacement }>) is recommended for most configurations because it explicitly preserves the order of entries and allows for more complex patterns like Regular Expressions [1][2][3]. - Object Format: While the object format (Record<string, string>) is convenient for simple aliases, it relies on the iteration order of object keys, which is generally reliable in modern JavaScript but can be less transparent than an explicit array [1][2]. - Implementation Details: Internally, Vite processes these aliases in a top-down manner [4]. If you use the array format, your configuration should explicitly list your most specific aliases (e.g., those with longer or more distinct path segments) at the top of the array [3]. If you find that an alias is being incorrectly overridden, reordering your resolve.alias configuration to prioritize the most specific path match will resolve the issue [5][3].Citations:
Place the
/probealias before the base alias.The broader
@fusion-plugin-examples/claude-runtimealias will also match@fusion-plugin-examples/claude-runtime/probe, so that import can resolve toprobes-entry.ts/probeinstead ofsrc/probe.ts.Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents