UI for advanced search operators: multi columns with AND/OR logic, regex#843
Open
sbamin wants to merge 45 commits into
Open
UI for advanced search operators: multi columns with AND/OR logic, regex#843sbamin wants to merge 45 commits into
sbamin wants to merge 45 commits into
Conversation
Advanced Search panel** (`Advanced` toggle button next to the existing filter bar): - **Multiple conditions** — add unlimited filter rows with `+ Add Condition` - **Per-row AND/OR connectors** — each row after the first has AND/OR toggle pills, enabling mixed logic like `(A AND B) OR (C AND D)` - **18 filter operators** grouped by category: - Comparison: `=`, `<>`, `<`, `>`, `<=`, `>=` - List: `IN`, `NOT IN` (comma-separated values) - Null: `IS NULL`, `IS NOT NULL` - Range: `BETWEEN`, `NOT BETWEEN` (From / To inputs) - Pattern: Contains, Not contains, Has prefix, Has suffix — plus case-insensitive (ILIKE) variants for all four - **Show Query** — previews the full `SELECT * FROM ... WHERE ...;` SQL inline, with a Copy button - **"Advanced Filter Active"** badge in the pagination row when a multi-condition filter is applied - **Right-click → Filter Rows By Value** adds a pre-filled condition row when the panel is open - Filter state resets automatically on table switch or clicking the basic `×` reset button - No backend changes — uses the existing `where` parameter on `GET /api/tables/:table/rows` **Files changed:** `static/index.html`, `static/js/app.js`, `static/css/app.css
sync from main to local
Bug fix (v5): LIST, RANGE, NULL operators not working
- **Root cause 1**: `.adv-val-range` shown via `.toggle(true)` renders as `display:block`, breaking the flex From/To layout — fixed by using `.css("display","flex")` in new `updateAdvRowInputs()` helper
- **Root cause 2**: `buildAdvancedWhereClause()` read from `.adv-val-list` / `.adv-val-from/to` but if user typed in the always-visible `.adv-val` fallback was missing — added fallback: LIST reads `.adv-val` if `.adv-val-list` is empty; RANGE parses `"val1, val2"` or `"val1 and val2"` from `.adv-val` if From/To are empty
- Extracted `updateAdvRowInputs(row, op)` from inline `change` handler for reuse
Add three new UI elements to support the aggregate panel: 1. Aggregate toggle button next to Advanced search toggle 2. Aggregate panel div with GROUP BY, AGGREGATES, and HAVING sections 3. Aggregate active badge in the current-page display Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…owns, HAVING handlers
…Clause, buildAggregateQuery
…e-switch, reset-filters
… adjustOutputTop to resetAggregate
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Wrap buildTable() in try/finally in runQuery, runExplain, runAnalyze so hideQueryProgressMessage() always runs even if buildTable throws, preventing Run Query button from staying permanently disabled - Guard content modal window-click handler to only fire when modal is visible, and restore editor focus afterward so keyboard input works immediately after dismissing a cell value modal Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PostgreSQL does not allow referencing SELECT aliases in HAVING.
HAVING now emits COUNT(*), SUM("col"), etc. instead of the alias name,
while the dropdown still displays the human-readable alias to the user.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Warns users to review the generated SQL via Show Query before relying on output from Advanced and Aggregate filters in the Rows tab. Uses flexbox on the nav ul so the note fills remaining space and truncates with ellipsis rather than overflowing the menu bar. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
**Symptom:** After using the Rows tab (Advanced/Aggregate filters), switching to the Query tab leaves Run Query and Explain Query buttons unclickable. Cursor stays as arrow, clicks don't register. Refresh restores them.
**Root cause:** `adjustOutputTop()` sets `#output` top CSS to the pagination panel height when on the Rows tab. `showQueryPanel()` never resets it, so `#output` (position:absolute) sits over the `.actions` buttons inside `#input`, invisibly intercepting all mouse events.
**Fix:** Added to `showQueryPanel()` in `static/js/app.js`:
```javascript
$("#output").css("top", $("#input").height() + "px");
```
**How to apply:** When debugging click/cursor failures on the Query tab after Rows tab use — check `#output` top CSS value first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A few more fixes and tested OK on our end.
Context: #842 (comment)