Skip to content

CPLAT-11460: x-actions on output rows + fix the p preview-page combo - #156

Merged
gavin-jeong merged 1 commit into
masterfrom
CPLAT-11459-outputs-actions
Aug 13, 2026
Merged

gavin-jeong merged 1 commit into
masterfrom
CPLAT-11459-outputs-actions

Conversation

@gavin-jeong

Copy link
Copy Markdown
Collaborator

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

Follow-up to #155. Two interaction gaps that surfaced as soon as the daily view was in real use.

1. Output rows had no defined action set

The outputs digest bound three hardcoded keys — enter, o, y — and nothing told you what any given row could actually do. A "Files Changed" or "Scratchpad" row is a local file, but there was no way to open it in $EDITOR at all. A PR row and a plan-file row offered the same keys despite supporting completely different destinations.

x now opens the same actions menu the session browser uses, listing only what applies to the row under the cursor:

key action shown when
o open in browser the row has a URL
enter jump to the first mention it has a message uuid (else: open the session, when an anchor session is known)
e open in $EDITOR it is a local file
y copy URL when there is one, else the path

An entry that cannot apply is not rendered — that dishonesty is the thing being fixed. The hint box also names the row you are acting on.

$EDITOR reuses the existing openInEditor(), which wraps tea.ExecProcess; a hand-rolled exec from inside Bubble Tea corrupts the terminal. Both the per-session digest and the day pane share one applicability table — the row types stay distinct, only the table is shared.

The direct enter/o/y keys still work. x is an additional discoverable surface, not a replacement.

Not included: reveal-in-file-manager. internal/opener exposes only Open(cfg, url) and has no directory helper, so this was skipped rather than adding a new external dependency.

2. The p preview-page combo barely worked

The menu already existed (pv:conv s:stats m:mem x:scratch t:tasks a:agents w:workflows c:contexts r:refs o:outputs l:live), but its binding sat inside if sp.Focus && sp.Show { — so it fired in exactly one state. Measured by driving real tea.KeyMsg through Update:

state before
preview open + preview focused ✅ works
preview open + list focused ❌ nothing
preview closed ❌ nothing, pane does not even open

The second row is the normal position (you are browsing the list and want to change what the right pane shows). The third matters because ccx can start with the split hidden, and the adjacent tab binding does open the pane in that situation.

Both gates are gone. Picking a mode from a closed preview now opens the pane. On day rows p stays suppressed and says why — consistent with rowSupportsPreviewModes(), which already suppresses the number keys there; opening a menu of eleven no-op modes would be the same lie the x work is fixing.

Consumer audit before moving the binding: the filter/search input is intercepted at app.go:1519 and every overlay menu at 1968-1996, both well before this handler, so typing p into a search still types p. km.Session.Pick is capital P — no collision.

Also fixed

  • Resize clobbered the day-project pane. The guard in renderSessionSplit checked selectedDay() — date rows only. A day-scoped project row owns the same pane but is a projectItem, so a window resize fell through to the per-session path and overwrote its "Produced" list with an arbitrary child session's digest.
  • sessPageMenu was missing from isInOverlay(), so a digit pressed while the menu was open also fired a top-level preview shortcut behind it.
  • x on an empty digest was swallowed silently; it now says why.

Testing

gofmt and go vet clean; full suite green with an isolated HOME, both before and after rebasing onto the merged #155.

Every fix was verified by reverting it individually and confirming the corresponding test fails. Notably, reverting the honesty filter prints the dishonest box in the failure output — a "Files Changed" row advertising o:open in browser, a PR advertising e:open in $EDITOR — and reverting the p gates reproduces p from the list did not open the preview-page menu and expected p to open the page menu with the preview closed.

Output rows had three hardcoded keys (enter/o/y) and no way to discover what
any given row could actually do — a "Files Changed" row is a local file with
no way to open it in $EDITOR, and nothing said so. `x` now opens the same
actions menu the session browser uses, listing ONLY what applies to the row
under the cursor:

  o      open in browser        when the row has a URL
  enter  jump to first mention  when it has a message uuid (else: open the
                                session, when an anchor session is known)
  e      open in $EDITOR        when it is a local file
  y      copy                   URL when there is one, else the path

An entry that cannot apply is not shown — that dishonesty is the thing being
fixed. $EDITOR goes through the existing openInEditor(), which wraps
tea.ExecProcess; a hand-rolled exec here corrupts the terminal. Both the
per-session digest and the day pane share one applicability table.

The `p` preview-page combo existed but sat behind `sp.Focus && sp.Show`, so
it did nothing in the two states you actually press it from: browsing the
list, and with the preview closed. Both gates are gone — and picking a mode
from a closed preview now opens the pane, matching what tab already does. On
day rows it stays suppressed, consistent with the number keys: those rows
always render what they produced, so a menu of eleven no-op modes would be
the same lie.

Also fixed:
- resize on a day-scoped project row clobbered its "Produced" list with an
  arbitrary child session's digest (the guard checked selectedDay(), which is
  date rows only, not selectedOwnsDayPane())
- sessPageMenu was missing from isInOverlay(), so a digit pressed while the
  menu was open ALSO fired a top-level preview shortcut behind it
- x on an empty digest was swallowed silently; it now says why

JIRA: https://sendbird.atlassian.net/browse/CPLAT-11460
@Kairo-Kim Kairo-Kim added the auto-review/approved Auto-approved by the Slack auto-reviewer bot label Aug 13, 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!

@upwind-code-us

upwind-code-us Bot commented Aug 13, 2026

Copy link
Copy Markdown

Upwind Upwind Code Scan - ✅ Proceed with Deployment

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

🔶 1 High | 🟢 1 Low

View full analysis in Upwind Console

Scan completed in 25m 18s

Scan history (1 scan)
Commit Scanned at New Resolved Net
c202534 < 2026-08-13 16:40 UTC 0 0 0

Last scanned: c202534 · 2026-08-13 16:40 UTC

@upwind-code-us

upwind-code-us Bot commented Aug 13, 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 33m 9s

Scan history (1 scan)
Commit Scanned at New Resolved Net
c202534 < 2026-08-13 16:40 UTC 0 0 0

Last scanned: c202534 · 2026-08-13 16:40 UTC

@gavin-jeong
gavin-jeong merged commit 686e94e into master Aug 13, 2026
3 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.

3 participants