Skip to content

1Password: Enable cross-field search#26952

Merged
raycastbot merged 5 commits intoraycast:mainfrom
st0mich:1password-cross-field-search
Apr 16, 2026
Merged

1Password: Enable cross-field search#26952
raycastbot merged 5 commits intoraycast:mainfrom
st0mich:1password-cross-field-search

Conversation

@st0mich
Copy link
Copy Markdown
Contributor

@st0mich st0mich commented Apr 5, 2026

Summary

  • Search queries now match across all item fields (title, username/email, URL hostnames, vault name) instead of only matching against title or username individually.
  • Each space-separated token is matched independently, so queries combining parts of different fields now return the expected results.
  • Applied to both v7 and v8 item lists.

Motivation

Previously, searching for a combination of email and service name returned no results because Raycast's built-in filtering only matched tokens within single fields. This made it hard to find specific logins when you remembered parts of both your email and the service name.

Implementation

  • Replaced Raycast's built-in List filtering with custom matchesSearch() that splits the query into tokens and checks each token against all searchable fields.
  • Set filtering={false} and onSearchTextChange on List to handle filtering manually.
  • Extracted URL hostnames from item.urls to make domains searchable.

Test plan

  • Search by title only → works as before
  • Search by email only → works as before
  • Search by combination of email + service name → now returns matching items
  • Search by URL hostname → now returns matching items
  • Category filter still works alongside search
  • Empty search shows all items

…ault name

Search queries are now split by spaces and each token is matched independently
against all item fields (title, username/email, URL hostnames, vault name).
This allows queries like "m@ goo" to find a Google login with email m@example.com.
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: 1password Issues related to the 1password extension platform: macOS labels Apr 5, 2026
@raycastbot
Copy link
Copy Markdown
Collaborator

raycastbot commented Apr 5, 2026

Thank you for your contribution! 🎉

🔔 @khasbilegt @thomaspaulmann @dteare @pernielsentikaer @cb372 @henrik-dmg @superwhys @Luk4h @LitoMore @vimtor @Pavelas @iml885203 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 commands
BRANCH="1password-cross-field-search"
FORK_URL="https://github.com/st0mich/extensions.git"
EXTENSION_NAME="1password"
REPO_NAME="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 dev

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

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 5, 2026

Greptile Summary

This PR replaces Raycast's built-in List filtering with a custom matchesSearch() function that tokenizes the query and checks each token against all searchable fields (title, username/email, URL hostnames, vault name), applied consistently to both the v7 and v8 item lists. The keywords prop is removed from List.Item since filtering is now handled manually.

  • The CHANGELOG entry uses a hardcoded date (2026-04-05) instead of the required {PR_MERGE_DATE} placeholder.

Confidence Score: 4/5

Safe to merge after fixing the CHANGELOG date placeholder

One P1 finding: the CHANGELOG entry uses a hardcoded date instead of the {PR_MERGE_DATE} placeholder required by repo convention. The search logic itself is correct and the implementation is consistent across v7 and v8.

CHANGELOG.md needs the date placeholder corrected before merging.

Important Files Changed

Filename Overview
extensions/1password/CHANGELOG.md Adds new enhancement entry but uses hardcoded date instead of required {PR_MERGE_DATE} placeholder
extensions/1password/src/v7/components/Items.tsx Adds matchesSearch() for cross-field tokenized search, replaces built-in filtering with manual useMemo-based filter, removes keywords prop; missing trailing newline
extensions/1password/src/v8/components/Items.tsx Mirrors v7 changes with additional URL hostname extraction via new URL(); extends existing useMemo dep array with searchText; missing trailing newline

Comments Outside Diff (1)

  1. extensions/1password/src/v7/components/Items.tsx, line 105 (link)

    P2 Missing trailing newline

    Both v7/components/Items.tsx and v8/components/Items.tsx are missing a newline at the end of the file (\ No newline at end of file in the diff). The Prettier config for this repo expects files to end with a newline.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: extensions/1password/src/v7/components/Items.tsx
    Line: 105
    
    Comment:
    **Missing trailing newline**
    
    Both `v7/components/Items.tsx` and `v8/components/Items.tsx` are missing a newline at the end of the file (`\ No newline at end of file` in the diff). The Prettier config for this repo expects files to end with a newline.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/1password/CHANGELOG.md
Line: 3

Comment:
**Hardcoded date instead of `{PR_MERGE_DATE}` placeholder**

Changelog entry titles must use `{PR_MERGE_DATE}` so the merge date is populated automatically during release. Using a hardcoded date means the changelog will be incorrect if the PR merges on a different day.

```suggestion
## [Enhancements] - {PR_MERGE_DATE}
```

**Rule Used:** What: Changelog entries must use `{PR_MERGE_DATE}`... ([source](https://app.greptile.com/review/custom-context?memory=c2214c11-df56-490a-b1c0-09a385df481a))

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

---

This is a comment left during a code review.
Path: extensions/1password/src/v7/components/Items.tsx
Line: 105

Comment:
**Missing trailing newline**

Both `v7/components/Items.tsx` and `v8/components/Items.tsx` are missing a newline at the end of the file (`\ No newline at end of file` in the diff). The Prettier config for this repo expects files to end with a newline.

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

Reviews (1): Last reviewed commit: "1Password: Enable cross-field search acr..." | Re-trigger Greptile

Comment thread extensions/1password/CHANGELOG.md Outdated
@@ -1,5 +1,9 @@
# 1Password Changelog

## [Enhancements] - 2026-04-05
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.

P1 Hardcoded date instead of {PR_MERGE_DATE} placeholder

Changelog entry titles must use {PR_MERGE_DATE} so the merge date is populated automatically during release. Using a hardcoded date means the changelog will be incorrect if the PR merges on a different day.

Suggested change
## [Enhancements] - 2026-04-05
## [Enhancements] - {PR_MERGE_DATE}

Rule Used: What: Changelog entries must use {PR_MERGE_DATE}... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/1password/CHANGELOG.md
Line: 3

Comment:
**Hardcoded date instead of `{PR_MERGE_DATE}` placeholder**

Changelog entry titles must use `{PR_MERGE_DATE}` so the merge date is populated automatically during release. Using a hardcoded date means the changelog will be incorrect if the PR merges on a different day.

```suggestion
## [Enhancements] - {PR_MERGE_DATE}
```

**Rule Used:** What: Changelog entries must use `{PR_MERGE_DATE}`... ([source](https://app.greptile.com/review/custom-context?memory=c2214c11-df56-490a-b1c0-09a385df481a))

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

@raycastbot raycastbot added platform: Windows OP is contributor The OP of the PR is a contributor of the extension labels Apr 15, 2026
@pernielsentikaer pernielsentikaer self-assigned this Apr 16, 2026
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 56ff164 into raycast:main Apr 16, 2026
2 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

Published to the Raycast Store:
https://raycast.com/khasbilegt/1password

@raycastbot
Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@st0mich).

Please link your GitHub account to your Raycast account to receive your credits and 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: 1password Issues related to the 1password extension OP is contributor The OP of the PR is a contributor of the extension platform: macOS platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants