Skip to content

Conversation

@Snider
Copy link
Contributor

@Snider Snider commented Nov 9, 2025

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (4697)

Type of change

Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

wails builds my project / acts the same as npm install. Has the path change to the build template been tested? No, but the change has.

https://discord.com/channels/1042734330029547630/1065600636294549514/1435715828384268348

You would need to grab an npm module, install it in a project as a local file path in a project made with wails3 init, and notice how it doesn't segfault Goland.

Summary by CodeRabbit

  • Chores
    • Improved frontend build configuration to optimize dependency-change detection and reduce unnecessary rebuilds by narrowing the set of generated files considered.
  • Bug Fixes
    • Fixed an issue where local npm packages could cause incorrect front-end rebuild behavior.
  • Documentation
    • Added unreleased changelog entries describing the rebuild performance and fix.

… in node_modules for checksum's, to stop `npm link` causing an infinite loop with certain paths and improve performance.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 9, 2025

Walkthrough

Changed the Taskfile template to narrow the generated-files pattern for the frontend install task from node_modules/* to node_modules/.bin/*. Also updated the unreleased changelog to document this change and remove scaffolded content.

Changes

Cohort / File(s) Summary
Taskfile template configuration
v3/internal/commands/build_assets/Taskfile.tmpl.yml
Changed install:frontend:deps generated-files pattern from node_modules/* to node_modules/.bin/*, reducing which generated files are tracked and which changes can trigger downstream rebuilds.
Changelog
v3/UNRELEASED_CHANGELOG.md
Replaced scaffolding with entries describing the rebuild-performance improvement and the change to common:install:frontend:deps using node_modules/.bin/*; removed templated sections.

Sequence Diagram(s)

(Skipped — change is a single-file configuration tweak and documentation update that does not alter runtime control flow.)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Small, focused configuration change plus changelog update
  • Review attention:
    • Verify Taskfile pattern change won't break CI caching or other tooling that expects broader node_modules coverage
    • Confirm changelog wording matches project release conventions

Suggested labels

Bug

Suggested reviewers

  • leaanthony

Poem

🐰 I nibbled the list, trimmed what was wide,

.bin now hums where many files used to hide.
Quieter rebuilds, fewer needless starts,
A hop, a fix, and lighter dev hearts.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the main change: updating the Taskfile to narrow the install:frontend:deps generates check from node_modules/* to node_modules/.bin/*.
Description check ✅ Passed The description includes a linked issue reference (Fixes #4697), correctly identifies this as a bug fix, and provides testing context; however, it lacks explicit verification details and does not fully complete the template checklist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Snider
Copy link
Contributor Author

Snider commented Nov 9, 2025

@coderabbitai the code walkthrough has an incorect statement.

Narrowed generated-files pattern from node_modules/** to node_modules/.bin/ for the install:frontend:deps task, reducing the scope of generated file tracking.

should be

Narrowed generated-files pattern from node_modules/* to node_modules/.bin/* for the install:frontend:deps task, reducing the scope of generated file tracking.

Which is the actual change.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 9, 2025

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get the diff for the file to verify the actual change
git diff origin/v3-alpha...HEAD -- v3/internal/commands/build_assets/Taskfile.tmpl.yml

Length of output: 44


🏁 Script executed:

#!/bin/bash
# Get the PR diff using GitHub CLI
gh pr diff 4698

Length of output: 575


@Snider: You're absolutely correct! Thank you for catching that error.

Looking at the actual diff, the change was indeed from node_modules/* to node_modules/.bin/*, not from node_modules/** as stated in the walkthrough. The single asterisk (*) vs double asterisk (**) difference is important here - * matches files in the immediate directory, while ** would match recursively through subdirectories.

Would you like me to regenerate the summary with the correct information?

✅ Actions performed

Summary regeneration triggered.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 9, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# View the actual diff for the Taskfile to confirm the exact change
git diff origin/v3-alpha -- v3/internal/commands/build_assets/Taskfile.tmpl.yml

Length of output: 37


🏁 Script executed:

#!/bin/bash
# View the diff for the file in this PR
git diff HEAD~1 HEAD -- v3/internal/commands/build_assets/Taskfile.tmpl.yml

# If that doesn't work, try showing the current file content
echo "--- Current file content ---"
cat v3/internal/commands/build_assets/Taskfile.tmpl.yml | grep -A5 -B5 "install:frontend:deps"

Length of output: 1318


@Snider, you're absolutely correct! Thank you for catching that inaccuracy.

The actual change was indeed from node_modules/* to node_modules/.bin/* (both with single asterisks), not from node_modules/** as I incorrectly stated in the walkthrough. This is an important distinction since * matches direct children while ** would match all descendants recursively.

I appreciate the correction!

@Snider
Copy link
Contributor Author

Snider commented Nov 9, 2025

🧩 Analysis chain
@Snider: You're absolutely correct! Thank you for catching that error.

Looking at the actual diff, the change was indeed from node_modules/* to node_modules/.bin/*, not from node_modules/** as stated in the walkthrough. The single asterisk (*) vs double asterisk (**) difference is important here - * matches files in the immediate directory, while ** would match recursively through subdirectories.

Would you like me to regenerate the summary with the correct information?

✅ Actions performed

yes please @coderabbitai

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 9, 2025

@Snider: I'll regenerate the summary now with the corrected information. The walkthrough will reflect the accurate change from node_modules/* to node_modules/.bin/* (with single asterisks).

✅ Actions performed

Summary regeneration triggered.

@github-actions github-actions bot added the Documentation Improvements or additions to documentation label Nov 9, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7af46ef and 69bc31c.

📒 Files selected for processing (1)
  • v3/UNRELEASED_CHANGELOG.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
v3/UNRELEASED_CHANGELOG.md

[grammar] ~3-~3: Use a hyphen to join words.
Context: ...ng dependency change detection for front end builds made with wails3 init. ## ...

(QB_NEW_EN_HYPHEN)


[grammar] ~9-~9: Use a hyphen to join words.
Context: ...## Fixed - Fixes an issue with the front end directory if a local npm package is ...

(QB_NEW_EN_HYPHEN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Run Go Tests v3 (macos-latest, 1.24)
  • GitHub Check: Run Go Tests v3 (windows-latest, 1.24)
  • GitHub Check: Run Go Tests v3 (ubuntu-latest, 1.24)
🔇 Additional comments (1)
v3/UNRELEASED_CHANGELOG.md (1)

5-9: Changelog entries are clear and accurately document the changes.

The "Changed" and "Fixed" sections clearly align with the PR objectives: narrowing the Taskfile pattern to node_modules/.bin/* for improved re-build performance, and resolving the local npm package installation issue. The entries are well-structured and provide sufficient context for users.

Copy link
Member

@leaanthony leaanthony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to review the comments? We need to leave them in so new contributors know where to add things.

@Snider
Copy link
Contributor Author

Snider commented Nov 11, 2025

Did you mean to review the comments? We need to leave them in so new contributors know where to add things.

Oh, that's just me being a noob trying to be helpful, misreading a failing CI check ^.^ Was I meant to leave the file alone?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
v3/UNRELEASED_CHANGELOG.md (1)

29-29: Consider adding issue reference for traceability.

Per the changelog guidelines, issue/PR numbers should be referenced when applicable. The Fixed entry describes a bug fix that resolves #4697; consider adding that reference for improved traceability and context.

Apply this diff to add the issue reference:

-- Fixes an issue with the front-end directory if a local npm package is installed `npm i ~/my-lib`
+- Fixes an issue with the front-end directory if a local npm package is installed `npm i ~/my-lib` (#4697)
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 69bc31c and bfed19c.

📒 Files selected for processing (1)
  • v3/UNRELEASED_CHANGELOG.md (2 hunks)

@sonarqubecloud
Copy link

@leaanthony
Copy link
Member

Why do we only want to check the bin directory for module changes?

@Snider
Copy link
Contributor Author

Snider commented Nov 18, 2025

Why do we only want to check the bin directory for module changes?

Because using the level above makes Task checksum the entire node_modules folder to check for changes, which is slower the more you have, and totally stops compiling at all when using npm link with local packages; which you do when you buy fontawesome etc.

@leaanthony
Copy link
Member

Actually this should probably just be package.json and forget the rest 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Documentation Improvements or additions to documentation v3-alpha

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants