bito-code-review[bot] commented on code in PR #37025:
URL: https://github.com/apache/superset/pull/37025#discussion_r2678023676
##########
superset/extensions/local_extensions_watcher.py:
##########
@@ -46,6 +46,10 @@ def on_any_event(self, event: Any) -> None:
if event.is_directory:
return
+ # Only trigger on changes to files in dist/ directory
+ if "/dist/" not in event.src_path:
+ return
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Cross-platform path check needed</b></div>
<div id="fix">
The check for "/dist/" in event.src_path won't work on Windows, where paths
use backslashes. This prevents the watcher from triggering on dist/ file
changes on Windows systems, breaking local extension reloading there.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
````suggestion
# Only trigger on changes to files in dist/ directory
if "dist" not in Path(event.src_path).parts:
return
````
</div>
</details>
</div>
<small><i>Code Review Run #e371b9</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]