-
Notifications
You must be signed in to change notification settings - Fork 230
Help button not opening docs in desktop app #911
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for circuitverse ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughAdded the permission string "core:webview:allow-create-webview-window" to src-tauri/capabilities/default.json. Updated src/components/Panels/Shared/HelpButton.vue to compute the helplink reactively, change helpButtonClick to async, detect the Tauri runtime, and — when running under Tauri — attempt to open the helplink in a new WebviewWindow (with a generated id and specified size), falling back to window.open on failure. Non‑Tauri (web) behavior continues to use window.open. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Failure to add the new IP will result in interrupted reviews. 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 |
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.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
package.json (1)
59-59:⚠️ Potential issue | 🟠 Major
cross-envversion incompatible with Node 18.The
cross-envpackage at version^10.1.0requires Node >= 20, but this repository uses Node 18. This will cause installation or runtime failures in Node 18 environments.Based on learnings: "In Node 18 environments (e.g., this repo cv-frontend-vue), pin cross-env to 7.x (e.g., ^7.0.3) because cross-env 10.x requires Node >= 20."
Proposed fix
- "cross-env": "^10.1.0", + "cross-env": "^7.0.3",
🤖 Fix all issues with AI agents
In `@src/components/Panels/Shared/HelpButton.vue`:
- Line 15: Replace the top-level static import of open from
'@tauri-apps/plugin-shell' with a runtime check using isTauri() and a dynamic
import so bundlers don't try to load Tauri in web builds; locate the HelpButton
component (HelpButton.vue) where open is referenced, remove the top-level
"import { open } ..." and instead, inside the click handler or setup code that
triggers opening, call isTauri() and if true await
import('@tauri-apps/plugin-shell') to get the open function and call it,
otherwise run the web fallback; ensure you handle import errors with try/catch
and keep the same call signature where open(...) is used.
🧹 Nitpick comments (1)
src/components/Panels/Shared/HelpButton.vue (1)
23-31: Consider logging the error for debugging purposes.Silently swallowing the error makes it harder to diagnose issues. Adding a console warning would help developers understand when and why the fallback is triggered.
Proposed improvement
async function helpButtonClick() { if (!helplink) return try { await open(helplink) } catch (error) { // Fallback for web version + console.warn('Tauri shell open failed, using window.open fallback:', error) window.open(helplink, '_blank') } }
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/components/Panels/Shared/HelpButton.vue`:
- Around line 15-31: The component currently snapshots props.obj?.helplink into
the plain constant helplink, so updates to the parent-mutated object are not
reflected; change helplink to a Vue computed that returns props.obj?.helplink
(import computed from 'vue') and update uses in helpButtonClick to read the
computed's value (e.g., helplink.value) and guard against undefined; keep the
existing isTauri/open logic but reference the computed instead of the original
constant.
|
Ready to be reviewed @tachyons @ThatDeparted2061 @Nihal4777 |
|
Currently i have added package-lock.json and cargo.lock as well in it |
47c0808 to
d84f7f2
Compare
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/components/Panels/Shared/HelpButton.vue`:
- Around line 29-35: Wrap the WebviewWindow construction inside a try/catch when
isTauri() returns true to handle failures from missing permissions or invalid
URLs; update the code around the WebviewWindow call (the new WebviewWindow(...)
expression in HelpButton.vue / the isTauri() block) to catch errors, log the
error (e.g., console.error or your app logger) and surface a user-friendly
fallback (toast, alert, or opening the link externally) so the user gets
feedback instead of silent failure.
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.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@src/components/Panels/Shared/HelpButton.vue`:
- Around line 25-52: Remove the duplicate/orphaned helpButtonClick definition
and keep the single complete implementation that uses helplink, isTauri, and
WebviewWindow; specifically, delete the earlier/extra async function
helpButtonClick() block and the stray closing/braced lines so only the intended
async function helpButtonClick() { const link = helplink.value ... try { new
WebviewWindow(...) } catch { window.open(...) } else { window.open(...) } }
remains.
- Around line 15-17: There are two duplicate declarations of the helpButtonClick
function (the incomplete one and the complete implementation) causing malformed
braces; remove the first incomplete helpButtonClick declaration so only the full
implementation remains, and delete any leftover dangling closing braces
associated with the removed fragment to restore correct block structure; search
for helpButtonClick and ensure the remaining async function uses the
WebviewWindow creation + try/catch fallback as intended.
26fc0a2 to
898b11e
Compare
|
Hii @tachyons ready to be reviewed once again although currently ci is stuck on "waiting to run this check" |
|
all checks passed ready for review :)) |

Fixes #910
Describe the changes you have made in this PR -
The help button wasn't working in the desktop app because window.open() is not supported in Tauri. Implemented a solution using Tauri's WebviewWindow to open documentation in a new window within the app, with a fallback to window.open() for the web version.
Screenshots of the UI changes (If any) -
Desktop.2026.02.03.-.01.15.03.02.mp4
Code Understanding and AI Usage
Did you use AI assistance (ChatGPT, Claude, Copilot, etc.) to write any part of this code?
If you used AI assistance:
Explain your implementation approach:
Since window.open() doesn't work in Tauri, I used the WebviewWindow API to open help documentation in a new Tauri window. This avoids security concerns with the shell plugin while maintaining functionality. The solution detects the Tauri environment and opens docs accordingly, with a web fallback for browser use.
Checklist before requesting a review
Note: Please check Allow edits from maintainers if you would like us to assist in the PR.
Summary by CodeRabbit