Skip to content

Update owl extension#27277

Merged
raycastbot merged 5 commits intoraycast:mainfrom
gohadar:ext/owl
Apr 23, 2026
Merged

Update owl extension#27277
raycastbot merged 5 commits intoraycast:mainfrom
gohadar:ext/owl

Conversation

@gohadar
Copy link
Copy Markdown
Contributor

@gohadar gohadar commented Apr 19, 2026

Description

Screencast

Checklist

- Merge branch \'contributions/merge-1776604820589\'
- Pull contributions
- Added filter for only language keyboards
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: owl Issues related to the owl extension platform: macOS OP is author The OP of the PR is the author of the extension labels Apr 19, 2026
@raycastbot
Copy link
Copy Markdown
Collaborator

Thank you for the update! 🎉

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

@gohadar gohadar marked this pull request as ready for review April 23, 2026 07:39
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 23, 2026

Greptile Summary

This PR adds language-based keyboard filtering in the AddOWL form, a first-run initialization hook (useInitializeOWLs) that loads default OWL mappings, and three new bulk-action components (ClearAllOWLsAction, DeleteAllOWLsAction, ResetToDefaultOWLAction). Previously flagged issues — the stale-closure initialization bug and the in-place mutation in DeleteAllOWLsAction — are both resolved in this revision.

Confidence Score: 5/5

PR is safe to merge; the only remaining finding is a P2 style suggestion in loadDefaultOWLs.

Both previously flagged P1 bugs are fixed. The single remaining comment is a P2 style/efficiency suggestion on the nested flatMap, not a correctness issue.

extensions/owl/src/utils/loadDefaultOWLs.ts — nested flatMap style issue only.

Important Files Changed

Filename Overview
extensions/owl/src/hooks/useInitializeOWLs.ts New hook that guards initialization behind non-empty keyboards/languages arrays — fixes the previously flagged stale-closure issue. Minor: setOWLs and showAlert missing from the effect dependency array (both are stable in practice).
extensions/owl/src/utils/loadDefaultOWLs.ts New utility for loading default OWL mappings. The nested flatMap on lines 21–31 is unnecessarily complex and could produce duplicates; a simpler filter achieves the same result.
extensions/owl/src/components/DeleteAllOWLsAction.tsx Previously flagged mutation bug is fixed — now uses destructuring rest to return a new object instead of mutating previousState in-place.
extensions/owl/src/components/ClearAllOWLsAction.tsx New action to clear all OWLs with a confirmation dialog; straightforward and correct.
extensions/owl/src/components/ResetToDefaultOWLAction.tsx New action to reset OWLs to defaults; correctly awaits the confirmation-gated loadDefaultOWLs call. No issues found.
extensions/owl/src/components/AddOWL.tsx Adds language-based filtering for keyboard dropdowns with a toggle (both via Action shortcut and Form.Checkbox). Logic is correct; dependency array correctly includes new state variables.
extensions/owl/src/configure-owls.tsx Integrates the new initialization hook and bulk-delete actions; no issues found.
extensions/owl/src/owl.tsx Calls useInitializeOWLs() for first-run defaults; side-effect-only usage is intentional and correct.
extensions/owl/src/types/storage.ts Adds INIT storage key for tracking first-run state; minimal and correct.
extensions/owl/CHANGELOG.md New changelog entry for this release; still contains the {PR_MERGE_DATE} placeholder (previously flagged, appears to be handled by CI/CD on merge).
Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/owl/src/utils/loadDefaultOWLs.ts
Line: 21-31

Comment:
**Unnecessary nested flatMap — simpler equivalent available**

The nested `flatMap` over `languages` with an inner `keyboards.filter(keyboard === destinationLanguage)` is equivalent to a single filter: `keyboards.filter(k => languages.includes(k) && k !== language)`. The current form iterates `O(languages² × keyboards)` and could also silently produce duplicate OWL entries if any keyboard name appears more than once in `languages`.

```suggestion
        keyboards
          .filter((keyboard) => languages.includes(keyboard) && keyboard !== language)
          .map(
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (2): Last reviewed commit: "Update owl extension" | Re-trigger Greptile

Comment thread extensions/owl/src/hooks/useInitializeOWLs.ts Outdated
Comment thread extensions/owl/src/components/DeleteAllOWLsAction.tsx
Comment thread extensions/owl/CHANGELOG.md Outdated
@@ -1,5 +1,11 @@
# OWL Changelog

## [Filter Keyboards] - {PR_MERGE_DATE}
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.

P2 Unfilled template placeholder

{PR_MERGE_DATE} is a template token that should be replaced with the actual merge date before the PR is merged.

Suggested change
## [Filter Keyboards] - {PR_MERGE_DATE}
## [Filter Keyboards] - 2026-04-23
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/owl/CHANGELOG.md
Line: 3

Comment:
**Unfilled template placeholder**

`{PR_MERGE_DATE}` is a template token that should be replaced with the actual merge date before the PR is merged.

```suggestion
## [Filter Keyboards] - 2026-04-23
```

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@pernielsentikaer, should I update this manually or is this part of the CI/CD? I remember it updating automatically when the merge is done but I'm not quite sure.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@greptileai that's NOT correct, why do you say that? You should know that {PR_MERGE_DATE} is the right thing here

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.

Acknowledged — {PR_MERGE_DATE} is the standard Raycast convention and gets automatically populated at merge time. My original comment was incorrect; no changes needed here.

Tip: You can give me more context with .greptile/rules so I get this right next time.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@greptileai, so you already know this from your knowledge base, right?

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.

Yes — rule 799af734 in my knowledge base explicitly states that {PR_MERGE_DATE} should be left as-is, as it's the standard Raycast convention populated automatically at merge time. My original comment was wrong despite having that context.

Comment thread extensions/owl/src/hooks/useInitializeOWLs.ts Outdated
Copy link
Copy Markdown
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 @gohadar 👋

Can you look into feedback from Greptile here


I converted this PR into a draft until it's ready for the review, please press the button Ready for review when it's ready and we'll have a look 😊

@pernielsentikaer pernielsentikaer marked this pull request as draft April 23, 2026 07:47
@pernielsentikaer pernielsentikaer self-assigned this Apr 23, 2026
- Avoid using delete to mutate input parameter
- Fixed useInitializeOWLs may be called without keyboards or languages
@gohadar gohadar marked this pull request as ready for review April 23, 2026 08:02
Copy link
Copy Markdown
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.

Looks good to me, approved 🔥

@raycastbot raycastbot merged commit 00f42d4 into raycast:main Apr 23, 2026
2 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

Published to the Raycast Store:
https://raycast.com/gohadar/owl

@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.

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: owl Issues related to the owl extension OP is author The OP of the PR is the author of the extension platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants