Skip to content

[hacker-news-top-stories] Add notification support - #18798

Merged
raycastbot merged 3 commits into
raycast:mainfrom
KevinBatdorf:ext/hacker-news-top-stories
Apr 28, 2025
Merged

raycastbot merged 3 commits into
raycast:mainfrom
KevinBatdorf:ext/hacker-news-top-stories

Conversation

@KevinBatdorf

@KevinBatdorf KevinBatdorf commented Apr 26, 2025 •

Copy link
Copy Markdown
Contributor

Description

Adds the option to show a notification when a new story comes in. It's off by default (was unsure about this).

If you want to test this, you can set the points preference to something low like 3 so it updates more often.

Screencast

It will show the generic applescript triggered notification

CleanShot 2025-04-26 at 12 41 27@2x

But if the user has terminal-notifier installed, it will use that instead, which allows for an icon to show and for clicking the notification to open the url

CleanShot 2025-04-26 at 12 13 17@2x

The user can optionally have it show the icon from the story's site

CleanShot 2025-04-26 at 12 29 38@2x

Checklist

- update changelog
- Merge pull request #2 from KevinBatdorf/add-notification-for-new-story
- revert
- remove code commaent
- revert to 10m
- remove swift for apple script
- merge main
- Pull contributions
- Merge branch \'main\' into add-notification-for-new-story
- Add native notification for new stories
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: hacker-news-top-stories Issues related to the hacker-news-top-stories extension labels Apr 26, 2025
@raycastbot

Copy link
Copy Markdown
Collaborator

Thank you for the update! 🎉

You can expect an initial review within five business days.

@raycastbot raycastbot added the OP is author The OP of the PR is the author of the extension label Apr 26, 2025
@KevinBatdorf KevinBatdorf changed the title Update hacker-news-top-stories extension [hacker-news-top-stories] Add notification support Apr 26, 2025
@KevinBatdorf
KevinBatdorf marked this pull request as ready for review April 26, 2025 06:24

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR Summary

This PR adds notification support to the Hacker News Top Stories extension, implementing both terminal-notifier and AppleScript fallback for story notifications with configurable icon options.

  • In show-notification.ts, consider using showFailureToast from @raycast/utils in the catch block for simplified error handling
  • The launchCommand in view-top-stories.tsx should be wrapped in a try-catch block when showing notifications
  • The showNotification function in show-notification.ts could benefit from more specific error handling for different failure scenarios
  • The extractUrlFromImageLike function in show-notification.ts handles complex image types but could use additional validation for malformed URLs
  • The PATH variable in show-notification.ts includes sensitive directories - consider documenting security implications

💡 (4/5) You can add custom instructions or style guidelines for the bot here!

4 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

@LitoMore

Copy link
Copy Markdown
Contributor

Hi @KevinBatdorf, just in case you don't know the Raycast Notification.

The Raycast Notification bundles terminal-notifier inside and exposes an API for triggering it.

Do you want to try it?

@KevinBatdorf

Copy link
Copy Markdown
Contributor Author

Hey, I hadn't heard of it but thanks for sharing that. Looks very useful. I already got this working as it is now, so maybe that's something I can do in a few months after getting some feedback.

@pernielsentikaer pernielsentikaer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi 👋

Looks good to me, approved 🔥

@raycastbot
raycastbot merged commit 30eae60 into raycast:main Apr 28, 2025
@github-actions

Copy link
Copy Markdown
Contributor

@raycastbot

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

@KevinBatdorf
KevinBatdorf deleted the ext/hacker-news-top-stories branch April 28, 2025 05:45
robertoalvarezalonso added a commit to robertoalvarezalonso/raycast-extensions that referenced this pull request Apr 28, 2025
- new version
- [YubiKey Code] - Replace usage of WindowManagement.getActiveWindow with getFrontmostApplication (#18831)
- Update CODEOWNERs
- Add gotify extension (#18679)
- Ext/window sizer fix screenshots and README (#18827)
- Update CODEOWNERs
- Add Verification/Sign-in Link Detection (#18695)
- Dia (The Browser Company) extension (#18667)
- Docs: update for the new API release
- Docs: update for the new API release
- Update CODEOWNERs
- Add cloud-cli-login-statuses extension (#18058)
- [YubiKey Code] - Sort accounts by usage (#18781)
- [hacker-news-top-stories] Add notification support (#18798)
- Update threads extension (#18813)
- Update Ext/window sizer (#18814)
- Update CODEOWNERs
- Revert "Update bmrks extension (#18539)" (#18811)
- update extension raycast-gemini (#18666)
- Update tinyimg extension (#18720)
- Update xcode extension (#18746)
- Update 1bookmark extension (#18664)
- Update CODEOWNERs
- Update aws extension (#18650)
- [Things] Fix menu bar `Complete` action (#18641)
- Update CODEOWNERs
- Add nostr extension (#18637)
- Docs: update for the new API release
- Update CODEOWNERs
- Add window-sizer extension (#18635)
- Update CODEOWNERs
- Add hardcover extension (#18628)
- Update CODEOWNERs
- Update quit-applications extension (#18617)
- Update CODEOWNERs
- Mark all extensions which uses AppleScript as macOS only (#18742)
- Slack: enhance Search Emojis command with AI-powered suggestions (#18625)
- Update CODEOWNERs
- Update zen-browser extension (#18751)
- Made use of Search API optional (#18410)
- Update CODEOWNERs
- Add magic-home extension (#18219)
- Update CODEOWNERs
- Add ton-address extension (#18683)
- Update svelte-docs extension (#18749)
- Update CODEOWNERs
- Update hacker-news-top-stories extension (#18747)
- Update bmrks extension (#18539)
- Update CODEOWNERs
- Add lookaway extension (#18589)
- Update CODEOWNERs
- Updating Raycast handle (#18738)
- Update CODEOWNERs
- Update regex-repl extension (#18724)
- Update notis extension (#18727)
- Update CODEOWNERs
- Add `Canva` extension - View Designs and Open in Browser (#18645)
- [SABnzbd] add README + Modernize to use latest config (#18670)
- Update CODEOWNERs
- Add go-to-rewind-timestamp extension (#18514)
- Update CODEOWNERs
- Update toggl-track extension (#18543)
- Update CODEOWNERs
- Update CODEOWNERs
- Update thesaurus extension (#18569)
- Update warp extension (#18504)
- Handle undefined downloads in subtitle formatting (#18729)
- Update mercado-libre extension (#18725)
- Update tuple extension (#18718)
- Update CODEOWNERs
- Add origami extension (#18314)
- Update README.md (#18719)
- Update quick-event extension (#17943)
- Update anytype extension (#18218)
- Update sportssync extension (#18240)
- Update CODEOWNERs
- add new extension Pumble (#18253)
- Update CODEOWNERs
- Add macOSIcons.com extension (#18386)
- fix(pianoman): Cannot read properties of undefined (#18591)
- Update zeabur extension (#18675)
- Supahabits/stats (#18700)
- Update CODEOWNERs
- Update genius-lyrics extension (#18696)
- chore(mcp): improve instruction and examples given (#18537)
- Update CODEOWNERs
- Add donut extension (#18711)
- [Expo] Add support for Two Factor authentication (#18202)
- Update CODEOWNERs
- Update zen-browser extension (#18068)
- Update CODEOWNERs
- Update raindrop-io extension (#18668)
- Update trovu extension (#18277)
- Added "Create new Incognito Window" action for Chrome extension (#18262)
- Update hacker-news-top-stories extension (#18705)
- Update svelte-docs extension (#18686)
- handle non existing file selection (#18674)
- Ext/surge outbound switcher (#18633)
- Update betterdisplay extension (#17535)
- Update CODEOWNERs
- Add lyric-fever-control extension (#18538)
- 🐛 fix(wakatime): Fix Reported Store Issues & Update Dependencies (#18638)
- Update CODEOWNERs
- Update google-calendar extension (#18636)
- fix details block in information doc (#18627)
- Update CODEOWNERs
- Update (#18632)
- Update CODEOWNERs
- Add playtester extension (#18492)
- Docs: update for the new API release
- Update CODEOWNERs
- Add asciimath-to-latex-converter extension (#18496)
- GitHub: Fix pull request filtering logic (#18624)
- feat(search-chatwork): mod scope to use search contacts commands with OAuth (#18542)
- Update CODEOWNERs
- [Asana] modernize + close after creating task (close Issue) (#18531)
- Update CODEOWNERs
- Update package.json (#18483)
- Update CODEOWNERs
- Add dpm-lol extension (#18476)
- Update CODEOWNERs
- Update nba-game-viewer extension (#18623)
- Add liquipedia-matches extension (#18455)
- Update CODEOWNERs
- Add git-worktrees extension (#18418)
- Update CODEOWNERs
- Update linkding extension (#18395)
- Arc extension: (Re-)Add support to open blank incognito window (#18427)
- Update CODEOWNERs
- Update raycast-svgo extension (#18560)
- Auto language detection and some small fixes (#18221)
- Add steam-player-counts extension (#18435)
- Linear: Update API and fixes (#18601)
- Todoist: Fix AI get-tasks (#18603)
- Update awork extension (#18580)
- Update CODEOWNERs
- Update lucide-icons extension (#18428)
- Update aws extension (#18552)
- Update CODEOWNERs
- Add cerebras extension (#18508)
- Update CODEOWNERs
- Add manage runtimes and delete unsupported runtimes commands to Xcode extension (#18463)
- Update CODEOWNERs
- Update link-cleaner extension (#18422)
- Update airpods-noise-control extension (#18126)
- [Github extension] add support for merge queue and "merge when ready" (#18045)
- Update ihosts to support remote hosts (#18176)
- Update CODEOWNERs
- Update CODEOWNERs
- [ADB] Add Uninstall command (#18091)
- Update paste-as-plain-text extension (#18574)
- Update deepcast extension (#18598)
- Update CODEOWNERs
- Add hacker-news-500 extension (#18431)
- GIF Search: Use `Clipboard` API to copy GIF instead of AppleScript. (#18588)
- Todoist: New API, improvements and bug fixes (#18518)
- Update CODEOWNERs
- Update raycast2github.json (#18575)
- Update dust-tt extension (#18578)
- Update cal-com-share-meeting-links extension (#18577)
- Update ns-nl-search extension (#18576)
- Commands and Navigation Enhancements (#18528)
- Update CODEOWNERs
- Add `Netherlands Railways Find a train` extension (#18420)
- Update CODEOWNERs
- Update `CricketCast` extension - Modernize + Better Score Error Handling (#18555)
- Update Connect to VPN extension  (#18406)
- Update CODEOWNERs
- Update jetbrains extension (#18545)
- Update copymoveto extension (#18535)
- Update CODEOWNERs
- Update github-profile extension (#18551)
- Enable Chat Actions When Viewing Previous Conversations (#18547)
- html-colors: add filtering option to group colors by shade (#18529)
- [Things] Display only incomplete todo in the menu bar (#18515)
- Update WeChat (#18345)
- Update `Spaceship` extension - Modernize + DNS Enhancements (#18571)
- Update CODEOWNERs
- Update CODEOWNERs
- parcel: add "Track on Website" and improve client (#18333)
- Add paystack extension (#18375)
- Update CODEOWNERs
- Update gg-deals extension (#18519)
- Update dub extension (#18517)
- Fix 404 error by replacing the repo where we get the name from (#18525)
- Improved fallback command and flickering during search (#18533)
- feat(bento-me): improve UI. (#18521)
- Update CODEOWNERs
- Update clockify extension (#18401)
- Update CODEOWNERs
- Add "Obsidian Tasks" Extension (#18390)
- Ai extensions/elgato key light (#17822)
- Update utilities.md (#18510)
- Update CODEOWNERs
- Add virustotal extension (#18373)
- Update CODEOWNERs
- things: detect URLs in notes (#18362)
- Update CODEOWNERs
- Update deno-deploy extension (#17840)
- Update dad-jokes extension (#18494)
- Slack (#18156)
- Delivery Tracker: Manually Mark as Delivered and Delete All Delivered Deliveries (#18485)
- fix: gcloud path for non homebrew intel package installations (#18493)
- Update CODEOWNERs
- [Canvascast] Fix bugs with announcements and downloads (#18100)
- Update adhan-time extension (#18204)
- Update CODEOWNERs
- Slack: New Command: Send Message (ISSUE-15424) (#16580)
- Update antd-open-browser extension (#18299)
- Update image-flow extension (#18470)
- feat(himalaya): Update for Himalaya `v1.0.0` (#18388)
- Add Find Features and AI Extension Support (#18195)
- Add movie runtime information to Letterboxd (#18089)
- Update CODEOWNERs
- Update evernote extension (#17889)
- Add g-cloud extension (#18093)
- Update CODEOWNERs
- Add awork extension (#17791)
- Update laravel-herd extension (#18477)
- feat(search-composer-packagist): display abandon package (#18307)
- [Polar] Update Polar SDK Version (#18475)
- Update CODEOWNERs
- Add `Pastery` extension - Search Pastes, Create Paste, Delete Paste (#18404)
- [Polar] Fix non-recoverable state when OAuth access tokens expires (#18471)
- Docs: update for the new API release
- Update CODEOWNERs
- Update `Unsplash` extension - add Pagination, Caching + Modernize (close Issue) (#18384)
- Update CODEOWNERs
- Add jsrepo extension (#18346)
- Update producthunt extension (#18442)
- docs: asset folder clearing hint (#18320)
- Update CODEOWNERs
- Update vercast extension (#18297)
- Update pcloud extension (#18291)
- Update CODEOWNERs
- Add image-to-ascii extension (#18282)
- Update Tailscale extension (#18281)
- [braid] Fetch icons dynamically from github (#18469)
- [Bitwarden] Add authenticator primary action preference (#18464)
- Improve URL retrieval with clipboard fallback (#18461)
- Update dict-cc extension (#18443)
- Update CODEOWNERs
- Add valkey-commands-search extension (#18268)
- Update CODEOWNERs
- Update CODEOWNERs
- Update reflect extension (#18294)
- Add pollenflug extension (#17787)
- Update CODEOWNERs
- Add image-flow extension (#17383)
- Update CODEOWNERs
- Add laravel-herd extension (#18318)
- Update