Python CLI exact screen-search fallback treats literal percent and underscore as wildcards
At main 7163538913e15dd86534b41dc695e2a5639c0774, omi --json local search-screen uses SQL LIKE for its exact fallback without escaping % or _. Searching for 50% also returns a synthetic row containing 500; searching for a_b also returns axb. The same mismatch affects --app. I reproduced this through the real CLI and HTTP client with a mocked local-tool response, executing the generated query in an in-memory SQLite database. Eight regression cases fail before the patch; literal apostrophe and escape-character controls pass. A focused patch escapes LIKE metacharacters and adds explicit ESCAPE clauses; all 38 local-command tests pass. No live Desktop instance, real screen history, or external service was used. Repository-wide preflight is not complete: the initial sparse checkout lacks files required by its manifest. This work is AI-assisted on behalf of DiegoSalsa.
Following your contribution guide's invitation to propose bounties, would @josancamon19 consider US$10 via the documented private PayPal claim process for an accepted, merged fix with these tests? Please confirm the intended literal-search behavior and bounty availability before submission. No payment or assignment is assumed. Payment details would remain private.
References:
- https://docs.omi.me/doc/developer/Contribution
- https://www.sqlite.org/lang_expr.html#the_like_glob_regexp_match_and_extract_operators
I have read the issue and understand the root cause: the exact fallback in the screen search uses SQL LIKE without escaping metacharacters, so a query for 50% incorrectly matches 500 and a_b matches axb. I will patch the LIKE clause to escape %, _, and \ before binding user input, and verify all eight failing regression cases pass against the in-memory SQLite fixture. I can have a fix ready within 24 hours and am starting now.