Skip to content

CPLAT-9497: improve session picker and conversation navigation#22

Open
gavin-jeong wants to merge 33 commits intomasterfrom
CPLAT-9497-entity-tree-cron-support
Open

CPLAT-9497: improve session picker and conversation navigation#22
gavin-jeong wants to merge 33 commits intomasterfrom
CPLAT-9497-entity-tree-cron-support

Conversation

@gavin-jeong
Copy link
Copy Markdown
Collaborator

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

Summary

  • add session picker and extraction helpers for URLs/files/changes across sessions
  • improve TUI navigation with repo/project stats fixes and new conversation help/navigation behaviors
  • pause conversation live tail on manual upward navigation so manual inspection does not jump back to latest events

Test plan

  • go test ./internal/session
  • go test ./internal/tui

Entity Tree View:
- Toggle left pane between flat conversation list and entity tree
  (tab when left-focused, or :tree command)
- Right pane detail level cycles independently (tab when right-focused)
- Tree shows Agents, Background Jobs, and Task Board sections
- Compact labels: Agent: shortID [type], BG: id command, Task: #id subject
- Rich preview: agents show full subagent conversation with tool calls,
  bg jobs show actual command output, tasks show full activity span
- J key jumps from conv sub-item to matching entity in tree
- ConvKeymap with configurable JumpToTree key

Agent Navigation Fixes:
- Parse toolUseResult.agentId from session JSONL (was reading empty
  top-level field)
- Build toolUseToAgent map for direct agent ID lookup instead of
  timestamp heuristics
- Fix bg task navigation: match actual TaskOutput result instead of
  "Command running in background" acknowledgement
- TaskCreate operations now visible as sub-items (task detection
  decoupled from task list existence)

Configurable Refresh:
- All views use keymap.Session.Refresh instead of hardcoded "R"
- Added refresh to Stats and Hooks views (previously had none)
- Help lines use configurable key
URLs ending with `**` (markdown bold markers) were stored as-is,
producing invalid URLs in the picker. Add `*` to the TrimRight
character set alongside existing punctuation.
Add cron-aware session scanning and TUI views so cron jobs can be filtered, inspected, and drilled into alongside tasks, agents, and background jobs.
Stop the sessions view from reapplying a cleared filter during live refresh by clearing the stored startup search query when esc resets the active filter.
Roll up project stats by base repo so worktrees aggregate together, and show each repo's cost ratio in the stats detail view.
Update the top-level stats project summary renderer to display the rolled-up repo path so worktree paths no longer appear in the stats view.
Keep the rolled-up repo stats detail and add a separate project-path breakdown so both repo and project perspectives are available.
Add CLI picker support and TUI navigation updates for session stats, repo aggregation, URL/file actions, and conversation live-tail behavior so browsing active work is easier without losing manual context.
Add a conversation subcommand with multi-line rows, turn-scoped artifact previews, and picker interactions for opening, editing, and jumping to related conversation turns.
Bring master into the feature branch, keep the current session picker, repo stats, live-tail, and conversation picker changes, and resolve the PR merge conflicts.
Multi-line conversation rows could overflow the list height, clipping
the first item. Switch from pre-computed visMax to real-time line
counting so items always render within the available space.
Indent multi-line conversation body rows to the same text column as the
header, rather than the far-left gutter, so wrapped lines align cleanly
under the selected item's header text.
Keep assistant turns with failed tool results visible in conversation views
and show an explicit error summary in previews so verbose mode exposes
Bash/tool_result failures instead of collapsing them into tool-only turns.
Add tab-based mode cycling to ccx conversation and change standard
conversation preview in the main TUI to show text plus artifact summaries
instead of raw tool blocks.
Insert divider lines between merged preview turns so compact and standard
conversation previews are easier to scan when multiple turns are shown
in a single preview entry.
Switch picker truncation and padding from byte-length checks to terminal
display width so CJK and other wide glyphs align correctly in the
conversation picker.
Standard conversation preview renders directly from the raw entry, so it
was bypassing the turn separators added to synthetic preview entries.
Insert separators when multiple embedded turn headers are present so the
preview is easier to scan.
Compact and standard previews were flattening all text blocks together,
which removed the boundaries needed for visible separators. Render text
by block chunks so divider lines actually appear between turns.
When the conversation preview is focused, show a left-side tooltip for the
focused artifact block. Reuse existing diff rendering for change blocks and
show concise details for files, URLs, and images.
Replace aggregate artifact counts in standard conversation preview with
per-artifact preview blocks so the existing block cursor can navigate
and select concrete files, URLs, images, and changes.
Drop the old count-based standard preview renderer so conversation
STANDARD uses only the synthesized artifact-row path and tests reflect
the active behavior.
Render per-turn artifacts in standard conversation preview as a passive
list instead of selectable-looking rows, while keeping the left-side
detail tooltip for focused artifact context.
Make the focused artifact tooltip image-aware using cache-only lookup for
passive preview. Show an image detail card with paste ID and cached path
when available, while keeping explicit open behavior unchanged.
Add a new internal/kitty package for terminal capability detection and
Kitty graphics protocol image drawing. When a focused image artifact has
a cached file and the terminal supports Kitty graphics, draw the image
inline over the tooltip area. Falls back to the existing text card in
unsupported terminals.
Add CCX_KITTY=1 env override and KITTY_WINDOW_ID/KITTY_PID fallback
detection for tmux sessions where TERM_PROGRAM is lost. Wrap Kitty
graphics escape sequences in tmux DCS passthrough so they reach the
outer terminal correctly.
Place inline images at the tooltip's computed position instead of a fixed
corner, and emit a clear command on every non-image frame so stale images
disappear when focus moves away.
Query tmux server environment for TERM_PROGRAM and KITTY_WINDOW_ID so
Kitty graphics support is detected automatically without requiring
CCX_KITTY=1 when running inside tmux on a Kitty-compatible terminal.
Position the inline image inside the tooltip box area using the same
cursor-relative Y calculation as overlayTooltip, accounting for the
text header lines. The clear command on every non-image frame already
handles resize and defocus cleanup.
Emit a Kitty graphics clear command after the TUI exits so inline images
do not persist in the terminal after ccx terminates.
Query tmux pane top/left offset and add it to image placement coordinates
so inline images land inside the correct pane, not at absolute terminal
origin.
The cursor positioning escape and the Kitty image draw must both be
inside the same DCS passthrough sequence so they share the same
coordinate space (terminal-absolute). Previously the cursor move went
through tmux (pane-relative) while the image data went through
passthrough (terminal-absolute), causing misplacement.
Cache the tmux pane offset query and invalidate on resize so image
placement stays correct after window changes. Also extract uncached
images when the user focuses an image block, matching the tooltip
behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants