Skip to content

feat(tui): add session.sidebar_id to show the session id in the sidebar - #54964

Closed
Nowaker wants to merge 1 commit into
anomalyco:devfrom
Nowaker:v2-sidebar-id
Closed

Nowaker wants to merge 1 commit into
anomalyco:devfrom
Nowaker:v2-sidebar-id

Conversation

@Nowaker

@Nowaker Nowaker commented Oct 12, 2026 •

Copy link
Copy Markdown

Issue for this PR

Related: #53662

Type of change

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

What does this PR do?

The current session's ID is what the CLI, the API and bug reports ask for, but finding it means opening a dialog or the session list.

This adds session.sidebar_id (off by default, also in the settings dialog). When on, the sidebar shows the ID under the session title in the muted color, where it can be selected and copied.

How did you verify your code works?

bun run typecheck and bun test test/config-v2.test.tsx in packages/tui. I also ran it in a real terminal: a TUI from this branch (serve --stdio plus --server) on a throwaway tmux server, scratch data dir, and a fake OpenAI-compatible provider on loopback. With session.sidebar_id: true, the sidebar shows ses_... under the title. The same check fails on dev.

Screenshots / recordings

Text captures are in the description above.

Checklist

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

This PR is AI generated, but under direct supervision and on request of @Nowaker.


Added by the opencode bot (AI-generated).

Related: #47746, #53662

Public API: adds the optional session.sidebar_id boolean config key (default off; backwards compatible)

Finding the current session's ID means opening a dialog or the session
list, yet it is what the CLI, the API and a bug report ask for.
session.sidebar_id shows it below the title in the sidebar, in the muted
color, where it can be selected and copied. Off by default, and listed in
the settings dialog.
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as described, and I found no issues that should block it. I ran the TUI from source with the simulated model and session.sidebar_id: true (screenshots below). With this PR, the session ID appears in muted text under the title and fits inside the sidebar. With the same config on the base, no ID is shown. bun test test/config-v2.test.tsx and bun run typecheck in packages/tui both pass.

Public API: this adds one optional config key, session.sidebar_id (boolean, off by default), also exposed in the settings dialog and documented in the CLI config docs. It's backwards compatible because existing configs are unaffected.

Related: #47746, #53662

Before

After

@Nowaker

Nowaker commented Nov 10, 2026

Copy link
Copy Markdown
Author

Closing this for now: I'm limiting myself to at most 3 open PRs on this repo to keep the review load reasonable. I may reopen it later. Thanks for your time!

@Nowaker Nowaker closed this Nov 10, 2026
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.

1 participant