Skip to content

feat: session picker MVP - fuzzy search, derived titles, relative time - #1271

Merged
steipete merged 11 commits into
openclaw:mainfrom
Whoaa512:feat/session-picker-mvp
Jan 20, 2026
Merged

steipete merged 11 commits into
openclaw:mainfrom
Whoaa512:feat/session-picker-mvp

Conversation

@Whoaa512

Copy link
Copy Markdown
Contributor

Summary

Closes #1161

  • Session picker now shows derived titles (from displayName, subject, or first user message) instead of raw session IDs
  • Fuzzy search filter lets you quickly find sessions by typing
  • Relative time display ("5m ago", "Yesterday") for last update
  • Last message preview shows context for each session

Changes

User-facing

  • /sessions picker is now searchable with fuzzy matching
  • Sessions display human-readable titles derived from conversation content
  • Time shown as relative ("2h ago") instead of absolute timestamps
  • Vim keybindings (j/k) work in session picker

Technical

  • New fuzzy-filter.ts shared module for list component filtering
  • sessions.list RPC now supports search, includeDerivedTitles, includeLastMessage params
  • formatRelativeTime utility extracted for reuse
  • FilterableSelectList optimized with pre-lowercased search text
  • 49 new tests for session utils and derived title logic

Test plan

  • pnpm build passes
  • pnpm test src/gateway/session-utils passes (49 tests)
  • pnpm lint passes
  • Manual: Open TUI, run /sessions, verify fuzzy filter works
  • Manual: Verify derived titles show instead of UUIDs

@steipete

Copy link
Copy Markdown
Contributor
  • High: src/tui/components/searchable-select-list.ts:238-249 and src/ tui/components/filterable-select-list.ts:81-89 — j/k consumed for navigation before the input, so users can’t type those letters in search/filter.
  • Medium: src/gateway/session-utils.fs.ts:90-96 — extractTextFromContent only accepts type === "text", so output_text/input_text transcripts (OpenAI Responses) won’t yield derived titles or last‑message previews.
  • Low: src/tui/tui-command-handlers.ts:152-154 — description becomes " · preview" when updatedAt is missing; separator should be conditional.
  • Low: src/gateway/session-utils.ts:86-88 — derived title uses raw first user message; newline/whitespace can break list layout.

Whoaa512 and others added 11 commits January 20, 2026 16:36
Enable meaningful session titles via priority-based derivation:
1. displayName (user-set)
2. subject (group name)
3. First user message (truncated to 60 chars)
4. sessionId prefix + date fallback

Opt-in via includeDerivedTitles param to avoid perf impact on
regular listing. Reads only first 10 lines of transcript files.

Closes openclaw#1161
Users can now type to filter sessions in real-time:
- FilterableSelectList component wraps pi-tui's fuzzyFilter
- Matches against displayName, label, subject, sessionId
- j/k navigation, Enter selects, Escape clears filter then cancels
- Uses derivedTitle from previous commit for better display

Refs openclaw#1161
- Remove dead input handlers (onSubmit/onEscape never triggered)
- Store maxVisible as instance property instead of bracket access
- Remove unused filterInput theme property
Server-side filtering backup for client-side session picker search.
Case-insensitive substring match on displayName, label, subject,
sessionId, and key.

Closes openclaw#1161
Show "just now", "5m ago", "Yesterday" etc. instead of absolute timestamps
for better readability in the session picker list.
Replace hardcoded escape sequence checks with the pi-tui keybindings API to ensure consistent cancel handling across different terminal configurations.
Read the final user/assistant message from session transcripts and display
it in the picker alongside the session update time. Allows quick previews
of what's in each session without opening it.
- Extract formatRelativeTime to shared utility for reuse across components
- Optimize FilterableSelectList with pre-lowercased searchTextLower field (avoids toLowerCase on every keystroke)
- Implement custom fuzzy matching with space-separated token support and word boundary scoring
- Use matchesKey utility for consistent keybinding handling (arrows, vim j/k, ctrl+p/n)
- Fix searchable-select-list to support vim keybindings consistently
- Fix system-prompt runtimeInfo null check with nullish coalescing operator
Also add CHANGELOG entry and perf docs for session list flags.
@steipete
steipete force-pushed the feat/session-picker-mvp branch from f170b4b to faa5838 Compare January 20, 2026 16:46
@steipete
steipete merged commit 40e928a into openclaw:main Jan 20, 2026
@steipete

Copy link
Copy Markdown
Contributor

Landed via temp rebase onto main.\n\n- Gate: pnpm lint && pnpm build && pnpm test\n- Land commit: faa5838\n- Merge commit: 40e928a\n\nThanks @Whoaa512!

@Whoaa512
Whoaa512 deleted the feat/session-picker-mvp branch January 20, 2026 19:52
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
feat: session picker MVP - fuzzy search, derived titles, relative time
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
feat: session picker MVP - fuzzy search, derived titles, relative time
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
feat: session picker MVP - fuzzy search, derived titles, relative time
zeekay pushed a commit to Dream-AI-4444/bot that referenced this pull request Sep 11, 2026
zeekay pushed a commit to Dream-AI-4444/clawdbot that referenced this pull request Sep 11, 2026
feat: session picker MVP - fuzzy search, derived titles, relative time
lhfer pushed a commit to lhfer/openclaw that referenced this pull request Oct 11, 2026
lhfer pushed a commit to lhfer/openclaw that referenced this pull request Oct 11, 2026
feat: session picker MVP - fuzzy search, derived titles, relative time
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Nov 4, 2026
A continue_work wake runs now or is refused at reply admission, never queued
as a follow-up (🌊's gate ruling, openclaw#1271).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Nov 4, 2026
fence-status / interrupt-fenced and the build capability marker, for the
downgrade-across-the-fence rule (🌊, openclaw#1271).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Nov 10, 2026
…ed test lines [UNAPPROVED]

UNAPPROVED PREP CHECKPOINT. Successor to the immutable reviewed C7
a847f88 (upstream parent 401a1de unchanged; no re-pin).
Not a cut, not Mode-B accepted, no presentation motion. Gate 3 is not claimed.

Input: Frond's exact-C7 static table (openclaw#1271; MinIO
frond/shared-media/prince-handoff/2026-11-10/frond-scribe/1271-static-forkonly/
1271-j14-c7-static-20261110T201419Z.tar.zst, sha256 bdd45ab8...abb0e, verified):
25 fork-only Knip lines (31 symbols) and 44 deadcode:exports entries (41 symbols).

Each symbol is dispositioned from its real consumers at C7 (lane receipt table):
- DEAD, deleted (10): orphaned rollback rebase helpers (persistence wiring went with
  merge bdb5ecb's re-home onto upstream's async write queue), migratedEntry* (upstream
  deleted the feature in openclaw#162100; merge 6c9a459 orphaned the fork copies), an unused
  disarm reader, an unaccepted-delegate remover, the announce runtime's callGateway
  re-export (upstream removed it in openclaw#146369), and two unused test-support helpers.
- IN-FILE ONLY, export dropped (17).
- REDUNDANT RE-EXPORTS removed (5); one test now imports from the owner module.
- TEST SEAMS tagged @internal (8): Knip 6.40.0 ignores @internal only in --production,
  so the full-tree scan still audits each against its test consumers.
- DYNAMICALLY CONSUMED (1): custody-boot calls refuseStaleContinuationWorkAtReplay on a
  namespace bound by Promise.all array destructuring; config/knip-dynamic-consumers.mjs
  now models that consumer from the live source (AST, binding identity), with a test.
No file-level ignoreIssues entry, threshold or baseline is changed.

Test lines: C7 was 401 over. Exact attribution: 19 j13 residual (#1563 +20, #1562 -1),
30 upstream slack shift (U13 31 -> U14 1), 352 agent schema 41/42 coverage in 13 files.
C8 nets -4. Allocations: continuation-j14-baseline-shift.txt 30 and
continuation-j14-coverage.txt 367 (itemized). Ratchet: 6742738 = ceiling, against base
401a and against C7.

Recipient-authority behaviour is unchanged (migrateSessionRecipientAuthority gains a JSDoc
tag only; refuseStaleContinuationWorkAtReplay is unchanged and now modeled).
src/skills/** untouched.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

Session Picker v2: Fuzzy Search + Semantic Titles

2 participants