Skip to content

Update yabai extension#17311

Merged
raycastbot merged 10 commits intoraycast:mainfrom
lhy-a:ext/yabai
Feb 26, 2025
Merged

Update yabai extension#17311
raycastbot merged 10 commits intoraycast:mainfrom
lhy-a:ext/yabai

Conversation

@lhy-a
Copy link
Contributor

@lhy-a lhy-a commented Feb 25, 2025

Description

  • Adds "Focus Next Same App" command
    • Focuses on the next window with the same application name
    • MacOS has same feature, but it is only available in the current space
  • Adds "Search Windows" command
    • Searches for windows managed by Yabai
    • Allows to search by window title or application name , it is really useful when windows have the same app name

Screencast

Checklist

- - Adds "Focus Next Same App" command   - Focuses on the next window with the same application name   - MacOS has same feature, but it is only available in the current space - Adds "Search Windows" command   - Searches for windows managed by Yabai   - Allows to search by window title or application name , it is really useful when windows have the same app name
- Initial commit
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: yabai Issues related to the yabai extension labels Feb 25, 2025
@raycastbot
Copy link
Collaborator

raycastbot commented Feb 25, 2025

Thank you for your contribution! 🎉

🔔 @krzysztoff1 @rubentsirunyan @webdesus @d34dh0r53 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.

Due to our current reduced availability, the initial review may take up to 10-15 business days

@pernielsentikaer
Copy link
Collaborator

Asked a PR review bot to make the review, let's see if it finds anything

@pernielsentikaer pernielsentikaer self-assigned this Feb 25, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

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 two new commands to the Yabai extension: "Focus Next Same App" for cycling through windows of the same application and "Search Windows" for finding windows by title or app name with Pinyin support.

  • Added focus-next-same-app.tsx to cycle through windows of the same application, even across spaces
  • Added search-windows.tsx with Chinese Pinyin search support using the new tiny-pinyin dependency
  • Created window-utils.ts helper with a common BaseWindow interface and sortWindows function for consistent window handling
  • The launchCommand in search-windows.tsx should be wrapped in a try-catch block for better error handling
  • Performance logging in search-windows.tsx provides useful debugging information but could be optimized for production

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

6 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Collaborator

@pernielsentikaer pernielsentikaer left a comment

Choose a reason for hiding this comment

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

Added a few more 🙂

Request a new review when you are ready. Feel free to contact me here or at Slack if you have any questions.

Co-authored-by: Per Nielsen Tikær <per@raycast.com>
Copy link
Contributor

@d34dh0r53 d34dh0r53 left a comment

Choose a reason for hiding this comment

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

This is awesome! Just a nit and a suggestion from me.

@lhy-a lhy-a closed this Feb 26, 2025
@lhy-a lhy-a deleted the ext/yabai branch February 26, 2025 03:57
@lhy-a lhy-a restored the ext/yabai branch February 26, 2025 03:58
@lhy-a lhy-a deleted the ext/yabai branch February 26, 2025 03:58
@lhy-a lhy-a restored the ext/yabai branch February 26, 2025 06:37
@lhy-a lhy-a reopened this Feb 26, 2025
@pernielsentikaer
Copy link
Collaborator

@greptileai could you do another review

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

(updates since last review)

This PR enhances the Yabai extension with two new window management commands that work across spaces, providing functionality beyond macOS's native capabilities.

  • The search-windows.tsx implementation should use showFailureToast from @raycast/utils instead of manual error handling with showToast
  • The List component in search-windows.tsx properly uses isLoading state to prevent empty state flicker
  • The findAppPath function is duplicated in both search-windows.tsx and windows-list-current-space.tsx - consider extracting to a shared utility
  • The performance logging in search-windows.tsx is thorough but could be conditionally enabled for development only
  • The CHANGELOG entry correctly uses the {PR_MERGE_DATE} placeholder that will be automatically replaced

6 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

lhy-a and others added 3 commits February 26, 2025 15:36
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@pernielsentikaer
Copy link
Collaborator

@krzysztoff1 do you want to check this?

Copy link
Collaborator

@pernielsentikaer pernielsentikaer left a comment

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 96b0b92 into raycast:main Feb 26, 2025
9 checks passed
@github-actions
Copy link
Contributor

Published to the Raycast Store:
https://raycast.com/krzysztoff1/yabai

@raycastbot
Copy link
Collaborator

🎉 🎉 🎉

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

@krzysztoff1
Copy link
Contributor

Thanks for your contribution! @lhy-a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: yabai Issues related to the yabai extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants