Skip to content

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

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

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

Conversation

@Nowaker

@Nowaker Nowaker commented Oct 7, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #53662

Type of change

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

What does this PR do?

Adds sidebar.session_id to tui.json, so release builds can show the session ID below the session title in the sidebar, the way development builds already do.

  • unset (default): unchanged, shown in development builds, hidden in release builds.
  • true / false: show or hide it in every build.

It reuses the existing line in the sidebar title block (muted text color, plain selectable text) and only replaces its InstallationChannel !== "latest" condition. The /session-id command (session.sidebar.session_id, keybind sidebar_session_id, unbound by default) toggles it and stores the choice in the TUI kv store, which takes precedence over tui.json, like the other session toggles. Documented in tui.mdx and keybinds.mdx.

How did you verify your code works?

  • test/config.test.tsx covers decoding; bun test and bun typecheck pass in packages/tui.
  • Release-channel builds (OPENCODE_VERSION=1.18.34) in isolated XDG_* dirs on a throwaway tmux socket, one turn each; sidebar top as captured:
# dev, or sidebar.session_id unset
QA reply.

Context

# "sidebar": { "session_id": true }
QA reply.
ses_eebde4476ffeSSqpORTGXc7i0U

Context

The ID line renders in the same muted color as the Context values (#808080 in the default theme). /session-id hid it (kv sidebar_session_id: false) and showed it again.

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.

The sidebar shows the session ID below the title only in development
builds; release builds never show it, so copying the ID of the session
on screen means leaving the TUI for a session list.

sidebar.session_id in tui.json shows or hides that line in every
build. It stays in the sidebar title block, in the muted text color,
and is ordinary selectable text. Unset keeps the current behavior:
shown in development builds, hidden in release builds. The
/session-id command (session.sidebar.session_id, keybind
sidebar_session_id, unbound by default) toggles it and remembers the
choice in the TUI kv store, which takes precedence over tui.json like
the other session toggles.
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

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

@Nowaker
Nowaker force-pushed the sidebar-session-id branch from 18d6718 to 78529ac Compare October 7, 2026 11:13

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]: show the session id in the sidebar in release builds

1 participant