Repository navigation
CPLAT-12501: open on the outputs digest, and fix the 722ms startup stall - #173
Merged
Merged
Conversation
…he loop Two reports, both of them startup defaults. Scratchpad was only visible on date rows. Not a collection bug — an asymmetry in which pane each row shows. A date row ignores the preview mode and always renders Produced; project and session rows follow sessPreviewMode, whose zero value is the conversation preview. So scratchpad (and PRs, Jira, plans) sat one p->o away on those rows while appearing immediately on a date row. browserPreviewMode now defaults to the outputs digest, which is what the daily view already did. The first question about a row is what it produced, not the wall of conversation text that answers how; Tab still gets you the conversation. While doing that: sessPreviewMode was only initialised from dailyPreviewMode when starting in the daily view, and otherwise fell through to the zero value rather than the starting view's own default. Both branches go through one path now. Navigation was also sluggish right after launch. Handling the initial sessionsScannedMsg blocked the loop for 722ms, and the breakdown on a 233-session directory puts almost all of it in one call: autoSelectSession -> tmux.CurrentWindowClaudes 223ms newSessionList 7.5ms applyStartupFilter 1.6ms carryOverRefState, injectRemoteSessions <0.2ms CurrentWindowClaudes walks every tmux pane on the first call and is memoized after (2µs). autoSelectSession runs the moment the scan lands, purely to place the cursor, so the whole walk hit the loop exactly as the list first appeared. Init's scan command warms the memo on its own goroutine now, next to the MarkLiveSessions call already there. 722ms -> 8.4ms. Four tests, each verified by reverting the relevant change and watching it fail. The startup guard asserts the memo is already warm rather than a wall-clock number so it cannot go flaky under load, and TestExplicitPreviewFlagStillWins pins that -preview conv still beats the new default.
|
| Commit | Scanned at | New | Resolved | Net |
|---|---|---|---|---|
e83dd1a < |
2026-10-01 04:34 UTC | 0 | 0 | 0 |
Last scanned: e83dd1a · 2026-10-01 04:34 UTC
|
| Commit | Scanned at | New | Resolved | Net |
|---|---|---|---|---|
e83dd1a < |
2026-10-01 04:34 UTC | 0 | 0 | 0 |
Last scanned: e83dd1a · 2026-10-01 04:34 UTC
Kairo-Kim
approved these changes
Oct 1, 2026
8 tasks done
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-12501
Two reports, both of them startup defaults.
1. Scratchpad only showed on date rows
Not a collection bug — an asymmetry in which pane each row shows.
A date row ignores the preview mode and always renders Produced. Project and session rows follow
sessPreviewMode, whose zero value is the conversation preview. So scratchpad — and PRs, Jira, plans — sat onep→oaway on those rows while appearing immediately on a date row.browserPreviewModenow defaults to the outputs digest, which is what the daily view already did. The first question about a row is what it produced, not the wall of conversation text that answers how;Tabstill gets you the conversation.Found while doing it:
sessPreviewModewas only initialised fromdailyPreviewModewhen starting in the daily view, and otherwise fell through to the zero value rather than the starting view's own default. Both branches go through one path now.2. Navigation sluggish right after launch
Handling the initial
sessionsScannedMsgblocked the UI loop for 722ms. The breakdown on a 233-session directory puts almost all of it in one call:autoSelectSession→CurrentWindowClaudes(first call)newSessionListapplyStartupFiltercarryOverRefState,injectRemoteSessionsCurrentWindowClaudeswalks every pane on the first call and is memoized after (2µs).autoSelectSessionruns the moment the scan lands — purely to place the cursor — so the whole walk hit the loop exactly as the list first appeared.Init's scan command warms the memo on its own goroutine now, next to the
MarkLiveSessionscall already there.722ms → 8.4ms.
Test plan
go build ./... && go vet ./... && go test ./...greenTestScannedMsgDoesNotWalkTmuxOnTheUILoop— asserts the memo is already warm after the startup command, not a wall-clock number, so it cannot go flaky under loadTestBrowserOpensOnTheOutputsDigest— all three preview-mode fieldsTestExplicitPreviewFlagStillWins—-preview convmust still beat the new defaultMy first version of the startup guard only ran
Init()'s outer command and passed while the bug was present — the batch's inner commands were never called. It now expands the batch the way the runtime does.Note on the behaviour change
Opening on the outputs digest instead of the conversation is a visible default change for anyone used to the current startup pane.
Taband the page menu reach the conversation as before, and-preview conv(or the persisted preference) still pins it.Security checklist
0.0.0.0/0inbound