Skip to content

feat(cli): filter session lists by title - #59784

Open
lancy69 wants to merge 1 commit into
anomalyco:devfrom
lancy69:session-list-search
Open

lancy69 wants to merge 1 commit into
anomalyco:devfrom
lancy69:session-list-search

Conversation

@lancy69

@lancy69 lancy69 commented Oct 28, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #56843

Design approval requested on the issue; still pending. Implementation prepared with OpenAI Codex assistance.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Expose the existing server title filter as session list --search <text>. Preserve project scope, top-level selection, ordering, and limits.

How did you verify your code works?

Bun 1.4.4: bun typecheck in packages/cli and root bun run lint passed (existing unrelated lint warnings remain).

Actual CLI against an isolated authenticated server verified case-insensitive title filtering, newest-first order, limits after filtering, no-match table/JSON output, child exclusion, isolation across two Git projects, unchanged unfiltered output, and --search help. Reproduce with opencode session list --search <title> --format json and --max-count 1 in a project containing matching and nonmatching sessions.

Upstream full CI currently requires maintainer approval before jobs can run; the existing green checks cover PR metadata only.

Screenshots / recordings

CLI flag only; verified through help and command output.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #54453, #48718, #59004

Public API: adds the --search flag to opencode session list (backwards compatible)

@lancy69
lancy69 marked this pull request as ready for review October 30, 2026 07:03
@lancy69

lancy69 commented Oct 30, 2026

Copy link
Copy Markdown
Author

Ready for review after local verification: CLI typecheck, repository lint, and an isolated CLI/server smoke passed for filtering, limits, child exclusion, and project isolation. The new CI workflows report action_required before any jobs start. Could a maintainer approve the workflow runs? Design approval requested in #56843 is still pending.

@opencodejr opencodejr Bot 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.

Looks good. I checked it against a local server with simulated settings: on the base session list --search is rejected; with this PR it filters top-level sessions by title, ignoring case, keeps newest-first order, applies --max-count after filtering, excludes child sessions, and prints [] / nothing when there is no match. Output without the flag is unchanged. tsc -b in packages/cli passes.

Public API: adds the optional --search <string> flag to opencode session list, which passes through to the existing search parameter of session.list. This is backwards compatible, and the server, SDK and client are unchanged.

No blocking concerns. For now, % and _ in the search text act as SQL wildcards; the server-side fix for that is tracked separately (#54453 / #54461).

Related: #54453, #48718, #59004

@opencodejr opencodejr Bot mentioned this pull request Oct 31, 2026
3 tasks done

This branch has not been deployed

No deployments
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.

[FEATURE]: Add --search to opencode session list

1 participant