feat(tui): add /titleon and /titleoff to toggle session title in the footer#2019
Open
go-bananas-wwj wants to merge 3 commits into
Open
feat(tui): add /titleon and /titleoff to toggle session title in the footer#2019go-bananas-wwj wants to merge 3 commits into
go-bananas-wwj wants to merge 3 commits into
Conversation
…footer Add two built-in slash commands that toggle whether the footer status bar shows the current session title after the cwd and git branch badge: - /titleon: show the session title in the footer (session-only) - /titleoff: hide it again (default) The toggle lives in AppState (not persisted to tui.toml): it resets on session switch / new / fork / logout, but survives /reload within the same session. The title is capped at 40 display columns with truncateToWidth so CJK titles cannot crowd the status bar, and renames via /title update the footer live through the existing sessionTitle state. Refs MoonshotAI#2018
🦋 Changeset detectedLatest commit: 9482bd3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df6fed1905
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
Resolve #2018
Problem
See linked issue. In short: sessions forked from the same conversation are hard to tell apart when switching in the terminal, and the current session's title — even after renaming with
/title— is never visible while you work, because the footer only shows the working directory and git branch.What changed
Two new built-in slash commands,
/titleonand/titleoff, toggle whether the TUI footer shows the current session title right after the git branch badge:AppStateflag (showSessionTitleInFooter, default off, not persisted totui.toml). It resets at session boundaries (switch //new/ fork / logout) but survives/reloadwithin the same session.colors.textDim(same as the cwd), and a 40-column width-aware cap viatruncateToWidthso CJK titles cannot crowd the status bar./titleupdate the footer live via the existingsessionTitlestate — no new data flow.tui.tomlif maintainers prefer.Two separate commands rather than
/title on|offbecause/title <text>already sets the title verbatim, so/title onwould be ambiguous (see the issue for the discussion — open to reshaping).Tests: footer rendering cases (on/off, after cwd, after git badge, null title, 40/41-column boundary, CJK width), command handler tests (patch, telemetry, status message, idempotency), and lifecycle tests (reset on switch/new, preserved across
/reload). Docs updated indocs/enanddocs/zh. Changeset included.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.