Skip to content

feat(tui): add header visibility toggle#7798

Closed
hiromesh wants to merge 5 commits intoanomalyco:devfrom
hiromesh:hide-session-header
Closed

feat(tui): add header visibility toggle#7798
hiromesh wants to merge 5 commits intoanomalyco:devfrom
hiromesh:hide-session-header

Conversation

@hiromesh
Copy link

@hiromesh hiromesh commented Jan 11, 2026

Add option to toggle session header visibility in TUI. Fixes #7536

The header shows session title, token usage, and cost at the top of the session view. Users can now hide it via command panel (ctrl+p).

Changes:

  • Added header_visible config stored in KV
  • Added "Hide header/Show header" command in Session category

How to test:

  1. Run opencode and start a session
  2. Press ctrl+p to open command palette
  3. Search "header" or browse to Session category
  4. Select "Hide header" to toggle visibility

@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

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

No duplicate PRs found

@jasonish
Copy link

@hiromesh If you rebase, I'll test.

@hiromesh hiromesh force-pushed the hide-session-header branch from 6fa92d0 to b07e7f2 Compare January 30, 2026 06:21
@hiromesh
Copy link
Author

@hiromesh If you rebase, I'll test.

done

@opencode-agent opencode-agent bot force-pushed the dev branch 2 times, most recently from 00637c0 to 71e0ba2 Compare January 30, 2026 14:32
@thdxr thdxr force-pushed the dev branch 3 times, most recently from f1ae801 to 08fa7f7 Compare January 30, 2026 14:37
@jasonish
Copy link

jasonish commented Jan 31, 2026

Not sure if this is just an artifact of my local build, but I'm seeing:
image

But it does toggle it on and off.

@hiromesh
Copy link
Author

hiromesh commented Feb 2, 2026

Not sure if this is just an artifact of my local build, but I'm seeing: image

But it does toggle it on and off.

Thanks for catching that! Indeed session.toggle.header was defined twice (lines 554-562 and 563-571),
which could cause the command palette to display incorrectly. Removed the duplicate definition.

@jasonish
Copy link

jasonish commented Feb 2, 2026

Yes, better now.

I do prefer having the menu option vs my config setting. Makes working on a shorter terminal much much better.

@hiromesh
Copy link
Author

hiromesh commented Feb 3, 2026

Yes, better now.

I do prefer having the menu option vs my config setting. Makes working on a shorter terminal much much better.

Thanks for the review! glad you find it useful.

@MSmaili
Copy link

MSmaili commented Feb 3, 2026

I would love it if this PR were merged.

I’d like the header to be hidden most of the time, especially on small screens where it takes up a lot of space. In practice, you usually only need to check the context usage and occasionally the money spent.

One idea for the context usage, which I liked from other ai-tool (is done by kiro-cli)

image

They show on the side how much context has been used. Useful and takes up less space. IMO, space is important; fewer things lead to better/cleaner UI.

@hiromesh
Copy link
Author

hiromesh commented Feb 7, 2026

Yes, better now.

I do prefer having the menu option vs my config setting. Makes working on a shorter terminal much much better.

Hi @jasonish , any update on this pr? Let me know if you need anything else from me

@jasonish
Copy link

jasonish commented Feb 9, 2026

Yes, better now.
I do prefer having the menu option vs my config setting. Makes working on a shorter terminal much much better.

Hi @jasonish , any update on this pr? Let me know if you need anything else from me

It's up to the OpenCode team now. Not having this actually keeps me from using OpenCode as much as I might.

@jasonish
Copy link

jasonish commented Feb 9, 2026

Apparently, a more minimal cli/tui is in the works? https://x.com/thdxr/status/2020715330289778956. Which might mean this isn't really needed. But still a nice to have.

@hiromesh hiromesh force-pushed the hide-session-header branch from 2661d70 to 908e554 Compare February 9, 2026 06:36
@hiromesh
Copy link
Author

hiromesh commented Feb 9, 2026

Apparently, a more minimal cli/tui is in the works? https://x.com/thdxr/status/2020715330289778956. Which might mean this isn't really needed. But still a nice to have.

That minimal TUI looks exciting! While that's in the works, this toggle still feels like a solid 'nice to have' for users who want to clear some vertical space right now.

Also, just an update: based on Ariane Emory's feedback on Discord, I’ve moved the toggle to the 'System' section in the command palette to keep it consistent with the other persistent menu items. Thanks again for the review!

@jasonish
Copy link

jasonish commented Feb 9, 2026

Also, just an update: based on Ariane Emory's feedback on Discord, I’ve moved the toggle to the 'System' section in the command palette to keep it consistent with the other persistent menu items. Thanks again for the review!

Sounds good. I was happy with just having to manually edit the config as its a set once and forget setting for me. Will try to test your change in the next day or so.

@hiromesh
Copy link
Author

hiromesh commented Feb 9, 2026

Sounds good. I was happy with just having to manually edit the config as its a set once and forget setting for me. Will try to test your change in the next day or so.

Thanks for testing, appreciate it!

@jasonish
Copy link

jasonish commented Feb 12, 2026

Fixed by #13244. It's too bad prior work was referenced.

@hiromesh hiromesh closed this Feb 12, 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.

[FEATURE]: Add configuration option to always hide the header

3 participants