Skip to content

Add ip-in-menu-bar extension#27283

Draft
greiner-petter wants to merge 7 commits into
raycast:mainfrom
greiner-petter:ext/ip-in-menu-bar
Draft

Add ip-in-menu-bar extension#27283
greiner-petter wants to merge 7 commits into
raycast:mainfrom
greiner-petter:ext/ip-in-menu-bar

Conversation

@greiner-petter
Copy link
Copy Markdown

@greiner-petter greiner-petter commented Apr 19, 2026

Description

This PR introduces the IP in Menu Bar Raycast extension.

The extension displays your public or local IP address directly in the macOS menu bar, always visible at a glance without opening any window.

Key Features:

Shows public (IPv4/IPv6) or local IP in the menu bar — user's choice.
Smart caching: public IP is refreshed every 15 minutes or when the network changes
Click any address to copy it to the clipboard instantly.
Supports multiple local network adapters with a built-in picker.
Detects network changes via adapter fingerprinting to keep addresses in sync.

Screencast

ip-in-menu-bar-1
ip-in-menu-bar-2
ip-in-menu-bar-3

Checklist

- fix prettier style
- Initial commit
@raycastbot raycastbot added the new extension Label for PRs with new extensions label Apr 19, 2026
@raycastbot
Copy link
Copy Markdown
Collaborator

Congratulations on your new Raycast extension! 🚀

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days.

Once the PR is approved and merged, the extension will be available on our Store.

- Initial commit
- remove images from readme
- fix prettier style
- Initial commit
@greiner-petter greiner-petter marked this pull request as ready for review April 19, 2026 18:48
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 19, 2026

Greptile Summary

This PR adds a new ip-in-menu-bar extension that displays the user's public or local IP address directly in the macOS menu bar, with smart 15-minute caching, network-change detection via adapter fingerprinting, and click-to-copy for all addresses.

  • The core component uses useCachedState + usePromise from @raycast/utils to cache public IPs and avoid unnecessary refetches; local IPs are resolved synchronously via Node's os.networkInterfaces().
  • Adapter selection, address display, and the "Show in menu bar" picker are all persisted through useCachedState so preferences survive restarts.
  • Configuration files (.prettierrc, eslint.config.js, package.json) all follow Raycast extension conventions correctly.

Confidence Score: 5/5

Safe to merge; the extension is well-structured and the caching/network-detection logic is sound

All changed files are new (no regressions possible), dependencies match imports, and the one flagged issue is a cosmetic edge case where the menu bar title briefly shows "Loading…" for a local IP option that has no address — it self-corrects and affects only users who select a local IP family their adapter doesn't support

No files require special attention

Important Files Changed

Filename Overview
extensions/ip-in-menu-bar/src/ip-in-menu-bar.tsx Main menu bar component; caching, adapter detection, and rendering logic are sound, with a minor issue where isLoading (public-IP fetch) can incorrectly show "Loading…" when a local IP option is active but unavailable
extensions/ip-in-menu-bar/package.json Well-formed package.json with $schema, correct platforms, single "System" category, and both dependencies actually imported in source
extensions/ip-in-menu-bar/.prettierrc Correct Raycast standard: printWidth: 120, singleQuote: false
extensions/ip-in-menu-bar/eslint.config.js Correctly uses defineConfig from "eslint/config" with the @raycast/eslint-config preset
extensions/ip-in-menu-bar/CHANGELOG.md Initial entry correctly uses {PR_MERGE_DATE} placeholder per Raycast convention
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
extensions/ip-in-menu-bar/src/ip-in-menu-bar.tsx:126
**`isLoading` leaks into local-IP title display**

`isLoading` tracks the public IP fetch, but it is also applied when the active menu bar option is `"Local IPv4"` or `"Local IPv6"`. If the active adapter has no IP for the selected family (e.g., an IPv6-only adapter with `"Local IPv4"` chosen), the menu bar momentarily shows `"Loading…"` while the unrelated public-IP request is in flight, then snaps to `"—"`. Consider guarding `isLoading` to only apply for public-IP options: `const menuTitle = activeMenubarOption.ip ?? (isLoading && activeMenubarOption.name.startsWith("Public") ? "Loading…" : "—")`.

Reviews (3): Last reviewed commit: "fix: only update cache if ips are presen..." | Re-trigger Greptile

Comment thread extensions/ip-in-menu-bar/package.json Outdated
greiner-petter and others added 2 commits April 19, 2026 20:58
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@raycastbot
Copy link
Copy Markdown
Collaborator

This pull request has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊

@raycastbot raycastbot added the status: stalled Stalled due inactivity label May 10, 2026
- Merge branch \'contributions/merge-1778427435797\'
- Pull contributions
- update changelog
- update categories list
@raycastbot raycastbot removed the status: stalled Stalled due inactivity label May 10, 2026
Comment thread extensions/ip-in-menu-bar/src/ip-in-menu-bar.tsx
Copy link
Copy Markdown
Contributor

@0xdhrv 0xdhrv left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution 🔥

We already have an extension in the Store that deals with this. Could we consider enhancing the existing extension below instead of creating another one?

The current menu bar command can be added to the existing extension.

If there are unique features or workflows you’re aiming to add, we’d love to hear them and see if they can be integrated into this to avoid duplication and improve discoverability.

This would help avoid duplication and keep related functionality consolidated in one place.
As mentioned in our extension guidelines here ↗

@0xdhrv 0xdhrv self-assigned this May 16, 2026
@0xdhrv 0xdhrv marked this pull request as draft May 16, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new extension Label for PRs with new extensions platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants