Update tailscale extension#27545
Conversation
|
Thank you for your first contribution! 🎉 🔔 @samlinville @rosszurowski @itsmingjie @erics118 @brandenwagner @j3lte @itsmatteomanf @MatteoGauthier you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="ext/tailscale"
FORK_URL="https://github.com/McKeev/raycast-extensions.git"
EXTENSION_NAME="tailscale"
REPO_NAME="raycast-extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. |
- Add menu bar indicator command - Add menu bar indicator command
Greptile SummaryThis PR adds a new Confidence Score: 5/5Safe to merge; the single finding is a P2 style suggestion about error handling granularity that does not affect core functionality. All P0/P1 issues from prior review threads (mismatched iconStyle default, manual Preferences interface, phantom refreshInterval field) appear to have been addressed. The only remaining finding is a P2 suggestion to distinguish expected not-connected silences from unexpected errors in the catch block. extensions/tailscale/src/menubar.tsx — catch block granularity Important Files Changed
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
extensions/tailscale/src/menubar.tsx:74-77
**Overly broad catch silently hides unexpected errors**
The empty `catch {}` returns `null` for every exception — including `InvalidPathError` (bad CLI path), `NotRunningError` (Tailscale daemon not running), and any JS runtime error. Only a `NotConnectedError` should produce a silent hide; other states leave the user with no indication of what went wrong. Consider distinguishing the cases:
```suggestion
} catch (err) {
if (err instanceof NotConnectedError) {
return null;
}
// Surface other errors (not running, invalid path, etc.) via an error icon
return <MenuBarExtra icon={{ source: "command-icon.png" }} tooltip={String(err)} />;
}
```
Reviews (2): Last reviewed commit: "Adress Greptile feedback" | Re-trigger Greptile |
Description
Adds a menu bar command that displays a Tailscale connection indicator. When connected, an icon appears in the menu bar. When disconnected, nothing is shown.
Clicking the icon reveals a dropdown with connection details (hostname, IPv4, tailnet name, active exit node) -> each item copies its value to clipboard on click.
The command includes preferences to:
Screenshots
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder