Repository navigation
Commit 29d2af0
authored
fix(app): tighten the search results row (#3855)
## Summary
The row above the search histogram spreads a lot of text over both sides:
`553 Results`, `Group by`, then `Scanned Rows: 2,895 | Elapsed Time: 216ms` next to
the actions. This tightens it.
- **Group by comes first**, since it is the control. The count and query stats follow it as read-only context.
- **Count and stats sit together.** `553 results · 2,895 rows scanned · 216ms` all describe the same query, so they no longer sit on opposite sides.
- **Only actions are on the right:** `Resume live tail` and the generated SQL button.
- **Shorter, sentence-case copy.** `Scanned Rows: …` / `Elapsed Time: …` become `… rows scanned · …ms`. `Results`, `Resume Live Tail`, `Show Generated SQL` and `Generated SQL (Timeline)` are now sentence case.
- `SearchNumRows` now renders only the stats. The SQL button and modal moved to a new `GeneratedSqlButton` so they can sit on the other side.
- The pattern view gets the same layout.
### Screenshots or video
I couldn't capture these (no browser available in the session that opened this PR). Left for the author to fill in.
#### Before
<img width="1240" height="43" alt="Screenshot 2026-11-28 at 12 15 00" src="https://github.com/user-attachments/assets/0578c997-0e80-47de-b92d-8b2580ba1f22" />
#### After
<img width="1240" height="43" alt="Screenshot 2026-11-28 at 12 08 06" src="https://github.com/user-attachments/assets/15b9d3fb-5d38-4a24-bfe0-42f21e2e0673" />
### How to reproduce
**Starting point:** `yarn app:dev:local` connected to the demo server (onboarding → "Connect to Demo Server"), or the Vercel preview.
**On `main`:**
1. Open **Search** and pick a log source.
2. Look at the row above the histogram: `553 Results`, `Group by`, then `Scanned Rows: … | Elapsed Time: …` on the right.
**On this branch:**
1. Open **Search** and pick a log source.
2. The row reads `Group by` · `N results · N rows scanned · Nms` on the left, with `Resume live tail` (when scrolled back from live) and the `</>` button on the right.
3. Switch to the **Event patterns** tab. The same layout applies.
### How to test on Vercel preview
**Preview routes:** /search
**Steps:**
1. Open /search and select a log source.
2. Verify the first item in the row above the histogram is the `Group by` button.
3. Verify the text after it reads like `N results · N rows scanned · Nms`.
4. Click the `</>` icon on the right and verify the `Generated SQL` modal opens.
### References
- Linear Issue:
- Related PRs:
---
> [!NOTE]
> **Low Risk**
> UI layout and copy changes on the search page only; behavior (explain query, SQL preview, live-tail flicker guards) is preserved and covered by updated tests.
>
> **Overview**
> Reorganizes the search page stats bar above the histogram so **Group by** leads on the left, then **result count** and a single dimmed stats line (`N results` stays separate; `N rows scanned · Nms` from `SearchNumRows`), with **Resume live tail** and the SQL icon grouped on the right. The same layout applies to **Results** and **Event patterns**.
>
> **`SearchNumRows`** now only renders scan/elapsed stats (middot-separated, shorter loading copy). The generated-SQL modal and icon move to a new **`GeneratedSqlButton`**, placed with the other right-side actions. **`SearchResultsCountGroup`** takes explicit `groupBy` and `stats` slots instead of wrapping children.
>
> User-facing copy shifts to **sentence case** (`results`, `Resume live tail`, `Show generated SQL`, `Generated SQL (timeline)`). Unit and e2e tests follow the new strings and component split.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f861156. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>1 parent 3bdf617 commit 29d2af0
6 files changed
Lines changed: 174 additions & 154 deletions
File tree
- .changeset
- packages/app
- src
- __tests__
- components
- tests/e2e
- features/search
- page-objects
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
| 371 | + | |
| 372 | + | |
372 | 373 | | |
373 | 374 | | |
374 | 375 | | |
375 | 376 | | |
376 | 377 | | |
377 | | - | |
| 378 | + | |
| 379 | + | |
378 | 380 | | |
379 | 381 | | |
380 | 382 | | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
392 | 393 | | |
393 | 394 | | |
394 | 395 | | |
395 | 396 | | |
| 397 | + | |
396 | 398 | | |
397 | 399 | | |
398 | | - | |
399 | 400 | | |
400 | 401 | | |
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
404 | 405 | | |
405 | | - | |
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
412 | | - | |
413 | 411 | | |
414 | 412 | | |
415 | 413 | | |
416 | | - | |
| 414 | + | |
417 | 415 | | |
418 | 416 | | |
419 | 417 | | |
| |||
422 | 420 | | |
423 | 421 | | |
424 | 422 | | |
425 | | - | |
426 | | - | |
427 | | - | |
| 423 | + | |
428 | 424 | | |
429 | 425 | | |
430 | | - | |
| 426 | + | |
431 | 427 | | |
432 | 428 | | |
433 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
434 | 475 | | |
435 | 476 | | |
436 | 477 | | |
437 | | - | |
438 | | - | |
439 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
440 | 481 | | |
441 | 482 | | |
442 | 483 | | |
443 | 484 | | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
482 | 496 | | |
483 | 497 | | |
484 | 498 | | |
| |||
926 | 940 | | |
927 | 941 | | |
928 | 942 | | |
929 | | - | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
930 | 946 | | |
931 | 947 | | |
932 | 948 | | |
| |||
2615 | 2631 | | |
2616 | 2632 | | |
2617 | 2633 | | |
2618 | | - | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
2619 | 2638 | | |
2620 | 2639 | | |
2621 | 2640 | | |
2622 | 2641 | | |
2623 | | - | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
2624 | 2646 | | |
2625 | 2647 | | |
2626 | 2648 | | |
| |||
2947 | 2969 | | |
2948 | 2970 | | |
2949 | 2971 | | |
2950 | | - | |
2951 | | - | |
2952 | | - | |
2953 | | - | |
| 2972 | + | |
| 2973 | + | |
| 2974 | + | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
2954 | 2987 | | |
2955 | 2988 | | |
2956 | 2989 | | |
2957 | 2990 | | |
2958 | 2991 | | |
2959 | 2992 | | |
2960 | | - | |
2961 | | - | |
2962 | | - | |
2963 | 2993 | | |
2964 | 2994 | | |
2965 | 2995 | | |
| |||
3055 | 3085 | | |
3056 | 3086 | | |
3057 | 3087 | | |
3058 | | - | |
3059 | | - | |
3060 | | - | |
3061 | | - | |
3062 | | - | |
3063 | | - | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
| 3094 | + | |
| 3095 | + | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
| 3106 | + | |
3064 | 3107 | | |
3065 | 3108 | | |
3066 | 3109 | | |
| |||
3088 | 3131 | | |
3089 | 3132 | | |
3090 | 3133 | | |
3091 | | - | |
| 3134 | + | |
3092 | 3135 | | |
3093 | 3136 | | |
3094 | 3137 | | |
| |||
3097 | 3140 | | |
3098 | 3141 | | |
3099 | 3142 | | |
3100 | | - | |
3101 | | - | |
3102 | | - | |
3103 | 3143 | | |
3104 | 3144 | | |
3105 | 3145 | | |
| |||
0 commit comments