Skip to content

Conversation

@CharlieKolb
Copy link
Contributor

@CharlieKolb CharlieKolb commented Apr 14, 2025

Summary

First step of getting things tidied up here. We improve the filtering of trigger to only do so if trailing another word, and, while we're at it, update it to work for partial completion as well

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/ADO-3395/search-in-node-panel-doesnt-work-for-term-trigger

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@CharlieKolb CharlieKolb changed the title Remove trailing trigger only and more tests fix(editor): Improve handling of trailing 'Trigger' in NodeCreator search Apr 14, 2025

describe('sublimeSearch', () => {
const testCases = [{ filter: 'agent', expectedOrder: ['Magento 2', 'AI Agent'] }];
describe('search finds at least one match', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was gonna introduce another set of exact test matches, but will do so in follow up. This intends (use Whitespace only for review) and drops the weight parameter

filter: string,
data: Readonly<T[]>,
keys: Array<{ key: string; weight: number }>,
keys: Array<{ key: string; weight: number }> = DEFAULT_KEYS,
Copy link
Contributor Author

@CharlieKolb CharlieKolb Apr 14, 2025

Choose a reason for hiding this comment

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

Since we only have one use case this seems preferred over duplicating it in the test. Also happy to instead provide the variable in both call sites

@CharlieKolb CharlieKolb marked this pull request as ready for review April 14, 2025 12:20
@CharlieKolb CharlieKolb requested review from a team and autologie and removed request for a team April 14, 2025 12:20
@codecov
Copy link

codecov bot commented Apr 14, 2025

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...editor-ui/src/components/Node/NodeCreator/utils.ts 93.33% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

mrge found 1 issue across 4 files. View it in mrge.io

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Apr 14, 2025
Copy link
Contributor

@autologie autologie left a comment

Choose a reason for hiding this comment

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

My comments may not apply if the user input is already normalized elsewhere beforehand

@CharlieKolb CharlieKolb requested a review from autologie April 16, 2025 10:44
@github-actions
Copy link
Contributor

✅ All Cypress E2E specs passed

@CharlieKolb CharlieKolb merged commit 8b3b474 into master Apr 16, 2025
33 checks passed
@CharlieKolb CharlieKolb deleted the ADO-3395 branch April 16, 2025 11:43
xbinaryx pushed a commit to xbinaryx/n8n that referenced this pull request Apr 18, 2025
@github-actions github-actions bot mentioned this pull request Apr 21, 2025
@janober
Copy link
Member

janober commented Apr 22, 2025

Got released with n8n@1.90.0

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

Labels

n8n team Authored by the n8n team Released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants