Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

SearchBar: Accept otherwise invalid input as quick search expression#353

Merged
nilmerg merged 4 commits intomainfrom
searchbar-enter-push
Feb 13, 2026
Merged

SearchBar: Accept otherwise invalid input as quick search expression#353
nilmerg merged 4 commits intomainfrom
searchbar-enter-push

Conversation

@nilmerg
Copy link
Member

@nilmerg nilmerg commented Jan 23, 2026

Noticed a few other glitches regarding validation, and needed to enhance it anyway since we have to make sure we don't use a valid expression as quick filter.

resolves #352

This is required for the following to work: (Icinga DB Web's hosts list)
* Paste `state.soft_state=1|host.name=docker-master` into the searchbar
* Change *Host Soft State* to *Host Soft Statee* without pushing enter
* Add another condition, any will do, complete it, wait for the autosubmit
* The changed column should now be reported as invalid

Previously, the steps above resulted in an stacktrace as the invalid
column was passed on to the ORM.
@nilmerg nilmerg added this to the v0.13.0 milestone Jan 23, 2026
@nilmerg nilmerg self-assigned this Jan 23, 2026
@nilmerg nilmerg added the enhancement New feature or request label Jan 23, 2026
@cla-bot cla-bot bot added the cla/signed label Jan 23, 2026
@nilmerg nilmerg marked this pull request as ready for review January 26, 2026 09:28
@nilmerg nilmerg force-pushed the searchbar-enter-push branch from 04cdc84 to 3587d69 Compare January 26, 2026 09:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Enhances SearchBar validation and filter parsing to support treating otherwise-invalid input as a “quick search” expression, reducing user pitfalls when suggestions are slow or absent (issue #352).

Changes:

  • Extended Parser/ParseException handling (incl. explicit EOL reporting) and added multiple parser regression tests.
  • Updated SearchBar to optionally transform certain invalid single-term expressions into a multi-column quick search filter.
  • Improved client-side validation pattern generation for ValidatedTerm and wired search columns from ORM models into SearchBar.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/ParserTest.php Adds coverage for additional parse error scenarios and adjusts expected positions/messages.
src/Filter/Parser.php Refines parse error positioning/EOL behavior and detects invalid operators in column expressions.
src/Control/SearchBar/ValidatedTerm.php Tightens default HTML pattern logic and adds escaping helper for pattern fragments.
src/Control/SearchBar.php Implements quick-search fallback behavior and improves parse-error UX/field feedback.
src/Compat/SearchControls.php Supplies model search columns to SearchBar and improves invalid-column handling for edge relations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nilmerg nilmerg force-pushed the searchbar-enter-push branch from 3587d69 to 91221e2 Compare February 11, 2026 09:58
@nilmerg nilmerg merged commit 01b4082 into main Feb 13, 2026
14 checks passed
@nilmerg nilmerg deleted the searchbar-enter-push branch February 13, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla/signed enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let the SearchBar accept otherwise invalid input as quick search expression

3 participants