Skip to content

fix: use character-level word breaking in Lucene search input#2181

Merged
kodiakhq[bot] merged 4 commits intomainfrom
cursor/fix-lucene-query-truncation-5f60
May 2, 2026
Merged

fix: use character-level word breaking in Lucene search input#2181
kodiakhq[bot] merged 4 commits intomainfrom
cursor/fix-lucene-query-truncation-5f60

Conversation

@MikeShi42
Copy link
Copy Markdown
Contributor

@MikeShi42 MikeShi42 commented May 1, 2026

Summary

Long Lucene filter queries with long attribute values (e.g. key:[really_long_attribute_name]) were wrapping at word boundaries, causing the key to appear on a separate line from its value. With word-break: break-all, text now breaks at character boundaries, keeping the key and value together on the same line.

This ensures text is packed as tightly as possible on each line, making long queries more readable regardless of whether they contain spaces.

Screenshots or video

Before After
Before: key wraps to separate line from value After: key stays on same line, breaks mid-character

Before: service.name: wraps to its own line, then the long attribute starts on the next line — wastes space and separates the key from its value.

After: Text breaks at character boundaries, keeping service.name:[really_long_long... packed on the first line and continuing mid-character on the next line.

How to test locally or on Vercel

  1. Navigate to the Search page
  2. Ensure the input is in Lucene mode (toggle on the left)
  3. Type a query with a long attribute value: service.name:[really_long_long_long_long_attribute_that_wraps_and_causes_issues]
  4. Focus the input — verify text breaks mid-character rather than wrapping the entire key:value to the next line
  5. Also test with a query containing spaces (e.g. multiple OR clauses) to verify it still looks correct

References

  • Linear Issue: HDX-4134
  • Related PRs: HDX-1655 (SQL overflow fix), HDX-3281 (SELECT input wrapping)

To show artifacts inline, enable in settings.

Linear Issue: HDX-4134

Open in Web Open in Cursor 

Long Lucene filter queries were truncated in the default (unfocused) view with
no way to expand or see the full expression. This change makes the Lucene input
behave consistently with the SQL WHERE input:

- Unfocused: single-line display with fade gradient indicating overflow
- Focused: expands to show full query with text wrapping (up to 150px, then
  scrollable)

Changes:
- Remove maxRows cap when focused (was 4, now unlimited via CSS max-height)
- Add max-height: 150px and overflow-y: auto on focused textarea
- Keep single-line collapsed state with overflow: hidden when unfocused

Fixes HDX-4134

Co-authored-by: Mike Shi <mike@hyperdx.io>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperdx-oss Ready Ready Preview, Comment May 2, 2026 0:45am

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 1, 2026

⚠️ No Changeset found

Latest commit: a54e787

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

E2E Test Results

All tests passed • 158 passed • 3 skipped • 1186s

Status Count
✅ Passed 158
❌ Failed 0
⚠️ Flaky 5
⏭️ Skipped 3

Tests ran across 4 shards in parallel.

View full report →

cursoragent and others added 2 commits May 1, 2026 02:27
Long Lucene filter queries with long attribute values (e.g.
key:[really_long_attribute_name]) were wrapping at word boundaries, causing
the key to appear on a separate line from its value:

  key:
  [really_long_attribute]

With word-break: break-all, text now breaks at character boundaries, keeping
the key and value together on the same line:

  key: [really_long_at
  tribute]

This ensures text is packed as tightly as possible on each line, making long
queries more readable regardless of whether they contain spaces.

Fixes HDX-4134

Co-authored-by: Mike Shi <mike@hyperdx.io>
@cursor cursor Bot changed the title fix: expand Lucene search input on focus to show full query fix: use character-level word breaking in Lucene search input May 1, 2026
@MikeShi42 MikeShi42 marked this pull request as ready for review May 1, 2026 02:46
@github-actions github-actions Bot added the review/tier-2 Low risk — AI review + quick human skim label May 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

🔵 Tier 2 — Low Risk

Small, isolated change with no API route or data model modifications.

Why this tier:

  • Standard feature/fix — introduces new logic or modifies core functionality

Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns.
SLA: Resolve within 4 business hours.

Stats
  • Production files changed: 1
  • Production lines changed: 1
  • Branch: cursor/fix-lucene-query-truncation-5f60
  • Author: MikeShi42

To override this classification, remove the review/tier-2 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

PR Review

✅ No critical issues found.

Single-line CSS change (word-break: break-all on a textarea) with a clear, well-documented purpose. The choice of break-all over overflow-wrap: break-word is intentional — it keeps key:[value] pairs from splitting at the colon/bracket word boundaries, which is the right behavior for a code/query input field.

@kodiakhq kodiakhq Bot merged commit 8ac54e3 into main May 2, 2026
18 checks passed
@kodiakhq kodiakhq Bot deleted the cursor/fix-lucene-query-truncation-5f60 branch May 2, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge review/tier-2 Low risk — AI review + quick human skim

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants