FE-1558: Fuzzy-search prototypes for the ad-hoc scenario form - #9453
FE-1558: Fuzzy-search prototypes for the ad-hoc scenario form#9453kube wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
| const current = haystack[index]!; | ||
| if (/[\s_\-›./]/.test(previous)) { | ||
| return true; | ||
| } | ||
| return /[a-z]/.test(previous) && /[A-Z]/.test(current); |
There was a problem hiding this comment.
Semgrep identified an issue in your code:
Ensure that the regex used to compare with user supplied input is safe from regular expression denial of service.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by regex_dos.
You can view more details about this finding in the Semgrep AppSec Platform.
| const previous = haystack[index - 1]!; | ||
| const current = haystack[index]!; | ||
| if (/[\s_\-›./]/.test(previous)) { | ||
| return true; | ||
| } | ||
| return /[a-z]/.test(previous) && /[A-Z]/.test(current); |
There was a problem hiding this comment.
Semgrep identified an issue in your code:
Ensure that the regex used to compare with user supplied input is safe from regular expression denial of service.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by regex_dos.
You can view more details about this finding in the Semgrep AppSec Platform.
| const previous = haystack[index - 1]!; | ||
| const current = haystack[index]!; | ||
| if (/[\s_\-›./]/.test(previous)) { | ||
| return true; | ||
| } | ||
| return /[a-z]/.test(previous) && /[A-Z]/.test(current); |
| const current = haystack[index]!; | ||
| if (/[\s_\-›./]/.test(previous)) { | ||
| return true; | ||
| } | ||
| return /[a-z]/.test(previous) && /[A-Z]/.test(current); |
00a163a to
bbe9d11
Compare
4e368fc to
cabed47
Compare
bbe9d11 to
becfe81
Compare
cabed47 to
b520b68
Compare
b520b68 to
f4b5096
Compare
becfe81 to
1196847
Compare
🌟 What is the purpose of this PR?
Stacked on #9371. Four playable Storybook prototypes for fuzzy-finding parameters, Variables, and places in the ad-hoc scenario form, layered over the real form with a large generated fixture, so the interaction patterns can be compared and one picked.
🔗 Related links
🔍 What does this change?
Everything lives under
src/ui/dev/form-search-prototypes/(Storybook-only, nothing ships; see its README). Open Dev / Form Search Prototypes:/opens a browser-find bar; Enter/Shift+Enter cycle the focus flash through matches while the bar keeps the keyboard; Escape hands focus to the current match.adHocTargetLabelaria-labels, so jumps resolve against the actual triggers.AdHocScenarioForm(live LSP + Monaco) with a generated bottling-plant fixture: 18 parameters, 12 Variables, 12 places, per-place variables.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
Files sit inside
@hashintel/petrinautbut are Storybook-only (no shipped entry point imports them).📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🐾 Next steps
🛡 What tests cover this?
fuzzy.test.ts(11 tests): subsequence matching, word-start preference and its feasibility guard, positions for highlighting, ranking, and the index's aria-label conventions against the big fixture.❓ How to test this?
yarn exec turbo run dev --filter @hashintel/petrinautand open Storybook (port 6006)./, type, Enter repeatedly. D: filter and click in the rail.📹 Demo
Screenshots pending — placeholder for drag-drop.