Skip to content

CPLAT-11798: give the daily Produced pane its own search - #164

Merged
gavin-jeong merged 1 commit into
masterfrom
CPLAT-11798-daypane-search
Aug 31, 2026
Merged

gavin-jeong merged 1 commit into
masterfrom
CPLAT-11798-daypane-search

Conversation

@gavin-jeong

Copy link
Copy Markdown
Collaborator

JIRA: https://sendbird.atlassian.net/browse/CPLAT-11798

Problem

The two panes of the daily view can't be searched independently. The right pane (Produced) has kind tabs but no text filter, and pressing / there takes focus away to open the session list's filter:

case "/":
    sp.Focus = false
    return a, startListSearch(&a.sessionList), true

A real day produces hundreds of outputs — 682 in the reported case. Tabs narrow by kind, but "where is that CPLAT ticket" or "which argocd PRs" had no answer short of scrolling.

What this adds

The day pane gets its own query, applied in the same filterDayOutputRows step as the kind tab. That placement matters: filtering at render time only would leave Enter/o/y/x acting on a different row than the highlighted one, because dayOutputsCursor indexes the filtered slice.

  • / with the pane focused opens its own input and focus stays put. / on the session list is unchanged.
  • Terms are AND-ed, case-insensitive, matched across title, detail, path, URL, kind, project and short ID — cplat argocd narrows without you knowing which field holds which part.
  • Composes with the kind tab.
  • Heading states the narrowing (Produced (3) of 682 /cplat) so a filtered count isn't read as a quiet day; an empty result under a query says "nothing matching" rather than "nothing produced" — different answers.

Two decisions worth flagging

Esc restores the query as of the input opening, not the current one. Typing applies live, so by the time Esc arrives dayOutputQuery already holds the edited value — restoring that would let an abandoned edit silently become the filter. A test caught this; the first implementation had the bug.

The query resets on a scope change, unlike the sticky kind tab. A kind filter is a lens you carry across dates. A text query is about one day's specific rows, and carrying it would hide the next day's outputs behind a filter you've stopped thinking about.

Testing

  • Full suite green (go test ./...), go vet ./... clean.
  • Covers: filter semantics (case, AND, per-field), tab composition, / not stealing focus, live-apply, Esc-restores-pre-edit, cursor reset, heading text, empty-result phrasing, session list / still filtering sessions, the two queries not leaking into each other, and the scope-change reset.
  • Mutation-tested: restored the focus-stealing / and removed the scope reset — both fail their covering tests.

Note

Verified by tests, not interactively. Worth a make build && ./bin/ccx, D for the daily view, focus the right pane and try / — particularly that the live-apply feels right on a long day and that Esc behaves as you'd expect.

The two panes of the daily view could not be searched independently.
The right pane has kind tabs but no text filter, and "/" there took
focus AWAY to open the session list's filter:

  case "/":
      sp.Focus = false
      return a, startListSearch(&a.sessionList), true

A real day produces hundreds of outputs — 682 in the reported case.
Tabs narrow by kind, but "where is that CPLAT ticket" had no answer
short of scrolling.

Give the pane its own query, applied in the same filterDayOutputRows
step as the kind tab. Filtering at render time only would leave
Enter/o/y/x acting on a different row than the highlighted one, since
dayOutputsCursor indexes the filtered slice.

Terms are AND-ed and matched case-insensitively across title, detail,
path, URL, kind, project and short ID, so "cplat argocd" narrows
without the reader having to know which field holds which part. It
composes with the kind tab, and "/" on the session list is unchanged —
the two panes answer different questions and a day with hundreds of
outputs needs narrowing even when the session list does not.

Two details worth stating:

- Esc restores the query as of the input OPENING, not the current one.
  Typing applies live, so by the time Esc arrives dayOutputQuery already
  holds the edited value; restoring that would let an abandoned edit
  silently become the filter. A test caught this.

- The query resets on a scope change, unlike the sticky kind tab. A kind
  filter is a lens you carry across dates; a text query is about one
  day's specific rows, and carrying it would hide the next day's outputs
  behind a filter the user has stopped thinking about.

The heading states the narrowing ("Produced (3) of 682  /cplat") so a
filtered count is not read as a quiet day, and an empty result under a
query says "nothing matching" rather than "nothing produced" — those are
different answers.
@upwind-code-us

upwind-code-us Bot commented Aug 30, 2026

Copy link
Copy Markdown

Upwind Upwind Code Scan - ✅ Proceed with Deployment

0 newly introduced vulnerabilities · 0 resolved · 1 total in this PR vs master

🔶 1 High

View full analysis in Upwind Console

Scan completed in 15s

Scan history (1 scan)
Commit Scanned at New Resolved Net
ff3614d < 2026-08-30 23:45 UTC 0 0 0

Last scanned: ff3614d · 2026-08-30 23:45 UTC

@upwind-code-us

upwind-code-us Bot commented Aug 30, 2026

Copy link
Copy Markdown

Upwind Upwind IaC Scan - ✅ Proceed with Deployment

0 newly introduced misconfigurations · 0 resolved · 0 total in this PR vs main

View full analysis in Upwind Console →

Scan completed in 5s

Scan history (2 scans)
Commit Scanned at New Resolved Net
ff3614d 2026-08-30 23:45 UTC
ff3614d < 2026-08-30 23:45 UTC 0 0 0

Last scanned: ff3614d · 2026-08-30 23:45 UTC

@Kairo-Kim Kairo-Kim added the auto-review/approved Auto-approved by the Slack auto-reviewer bot label Aug 30, 2026

@jinsekim jinsekim left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

@gavin-jeong
gavin-jeong merged commit 739e534 into master Aug 31, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-review/approved Auto-approved by the Slack auto-reviewer bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants