CPLAT-11489: number keys select the day pane's kind tabs - #158
Merged
Merged
Conversation
On a day row the digits were bound to preview modes the pane cannot show, so handleShortcutKey swallowed them and 1/2/3/4 did nothing at all. They now address the tab bar positionally — 1 is All, and the rest follow the bar as rendered, since dayOutputTabsFor drops kinds the scope produced none of (a fixed digit-to-kind table would point at labels that are not on screen).
Kairo-Kim
approved these changes
Aug 14, 2026
|
| CVE | Package | Version | Fix |
|---|---|---|---|
| CVE-2026-56852 | golang.org/x/text |
v0.3.8 |
0.39.0 |
🟢 Low · 1 finding
| CVE | Package | Version | Fix |
|---|---|---|---|
| CVE-2026-39824 | golang.org/x/sys |
v0.42.0 |
0.44.0 |
View full analysis in Upwind Console
Scan completed in 4m 26s
Scan history (2 scans)
| Commit | Scanned at | New | Resolved | Net |
|---|---|---|---|---|
79c30a3 |
2026-08-14 08:14 UTC | — | — | — |
79c30a3 < |
2026-08-14 08:14 UTC | +2 | 0 | +2 |
Last scanned: 79c30a3 · 2026-08-14 08:14 UTC
|
| Commit | Scanned at | New | Resolved | Net |
|---|---|---|---|---|
79c30a3 < |
2026-08-14 08:14 UTC | 0 | 0 | 0 |
Last scanned: 79c30a3 · 2026-08-14 08:14 UTC
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.
JIRA: https://sendbird.atlassian.net/browse/CPLAT-11489
Follow-up to #157, which made the daily "Produced" pane tabbed by kind. The tabs shipped reachable only by
tab/shift+tab— the number keys did nothing at all, which is the first thing anyone tries on a tab bar with four labels on it.Pressing
1,2,3,4here was a no-op.Why they were dead
The digits are bound to session preview modes (
preview:conv,preview:refs, …). A day row has no preview modes —updateSessionPreview()routes it toupdateDayPreviewwithout ever consultingsessPreviewMode— sohandleShortcutKeydeliberately swallowed them:That swallow was correct when it was written: firing a preview-mode switch on a day row changed hidden state and repainted nothing, so the digits looked broken, and letting them fall through to the list scrolled the cursor instead — a second surprise on top of the first. But once the pane grew a tab bar, the row did have an axis for the digits to address, and the swallow was the only thing standing between them.
The fix
On a day-pane row the digits are re-pointed at that pane's kind tabs, positionally over the bar as rendered:
1isAll, and the rest follow what is on screen.Positional rather than a fixed digit→kind table, because
dayOutputTabsForbuilds the bar per scope — it drops kinds the day produced none of, and keeps the active kind even when the day has none of it (the stickiness that makes date-to-date comparison work). Both of those shift every later tab's slot. A fixed table would point the digits at labels that are not there; in the bar above, a hardcoded4would meanArtifacts, which this day did not produce, while the user is looking atPlansin the 4th slot.The interception lives at the existing swallow in
handleShortcutKey, not as a pre-empt in the key dispatcher, so a digit the user has rebound to something else is still honored. A digit that addresses no tab (0,9, anything past the bar) keeps the original swallow — falling through to the list would bring back exactly the cursor-scroll surprise the swallow exists to prevent.cycleDayOutputTaband the newselectDayOutputTabnow sharesetDayOutputTabKind, which owns the four things a tab switch has to do: reset the cursor (every row action resolves throughdayOutputsCursorinto the filtered slice), clear the preview cache key, repaint the owning scope, and scroll to top. Re-selecting the tab you are already on returns early rather than jumping the cursor to the top of a list that did not change.Hints
The pane footer and the focused-preview hint line now read
1-9/tab:kind. The?overlay's Shortcuts section previously listed the preview modes, then — after the row-aware filter — listed nothing on a day row; it now names the actual tabs (1:all 2:prs 3:jira 4:plans) viadayOutputTabHint(), built from the same bar the digits address.Testing
gofmtandgo vetclean; full suite green.New tests, all driving the real key path (
app.Update) rather than the handler, since the digits are intercepted in the shortcut layer long before any day-pane handler runs:TestDayPreviewDigitsSelectTabsPositionallyAll / PRs / Jira / Plans, no Artifacts), so4must reachPlanseven thoughPlansis 5th indayOutputTabOrderTestDayPreviewDigitsFollowTheStickyBarTestDayPreviewOutOfRangeDigitIsSwallowed0/9must not fall through and move the list cursorTestSessionRowDigitsStillSwitchPreviewMode5→ refs)