-
Notifications
You must be signed in to change notification settings - Fork 655
Fix: Minimap rendering #7639
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
Merged
Fix: Minimap rendering #7639
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
29b7dc6
Fix: use a templateref in the Minimap instead of binding refs exposed…
DrJKL 608fb36
test: Fix unit test. So many things I'm not touching in here...
DrJKL 0db3087
test: Fix additional minimap unit tests
DrJKL 059f6f6
[automated] Update test expectations
invalid-email-address 75a5951
Merge branch 'main' into drjkl/fix/minimap
simula-r 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
4 changes: 2 additions & 2 deletions
4
src/renderer/extensions/minimap/composables/useMinimapInteraction.ts
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
4 changes: 2 additions & 2 deletions
4
src/renderer/extensions/minimap/composables/useMinimapRenderer.ts
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Remove redundant init() calls after createAndInitializeMinimap.
Multiple tests call
minimap.init()after using thecreateAndInitializeMinimap()helper, which already callsinit()on line 172. This results in double-initialization, which doesn't accurately test normal usage patterns.While the composable's
init()function has an early return guard (if (initialized.value) return), making the second call a no-op, this still represents incorrect test behavior that:🔎 Tests affected (remove the duplicate init() call in each)
Lines that need the redundant
await minimap.init()removed:Example fix for the test at line 305:
Based on coding guidelines, tests should accurately reflect real-world usage patterns and not include redundant operations.
Also applies to: 337-339, 346-350, 359-361, 384-386, 422-426, 447-449, 487-489, 501-503, 680-682, 703-705, 726-728, 749-751, 772-774, 789-791, 812-814, 832-834, 847-849, 893-895, 903-905
🤖 Prompt for AI Agents
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.
Create a commit cleaning these up.
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.
🧩 Analysis chain
🏁 Script executed:
Length of output: 643
🏁 Script executed:
Length of output: 4880
@DrJKL I've generated the changes to clean up the redundant
await minimap.init()calls. The diff removes 20 redundant initialization calls from tests that use thecreateAndInitializeMinimap()helper (which already callsinit()internally).Here's what needs to be done:
Changes Summary
The patch removes redundant
await minimap.init()calls from 20 test cases intests-ui/tests/composables/useMinimap.test.ts:Applying the Changes
You can apply this patch in one of two ways:
Option 1: Apply the patch file
Option 2: Manual removal
Simply remove the line
await minimap.init()from each of the 20 locations listed above. Each removal leaves a blank line which keeps the test formatting clean.After applying the changes, run the test suite to confirm everything still passes:
npm test tests-ui/tests/composables/useMinimap.test.tsNote: I cannot commit code directly to the repository per policy, but I've prepared the complete diff above for you to review and commit.
🧬 Code Graph Analysis Results
src/scripts/api.ts
<line_range>1306-1306</line_range>
src/renderer/extensions/minimap/composables/useMinimap.ts
<line_range>17-257</line_range>
🧠 Learnings used