Skip to content

fix(tui): use the footer's own words in the settings preview - #6993

Open
Lstarsky0 wants to merge 1 commit into
codewhale-hq:mainfrom
Lstarsky0:ux/settings-preview-real-chips
Open

Lstarsky0 wants to merge 1 commit into
codewhale-hq:mainfrom
Lstarsky0:ux/settings-preview-real-chips

Conversation

@Lstarsky0

Copy link
Copy Markdown
Contributor

What and why

The footer preview at the bottom of /settings draws with the real footer renderer, but it passed the raw setting values in as chip text, so it didn't match the footer it previews. At 80×24, before:

  ❯Startup mode                       Work                       ‹ ›  SAVED
  …
  Preview:  ● ask   agent

The footer under the composer says ● ask work for the same mode. With Startup mode set to Plan the preview said ● ask plan; the footer says ● read only plan.

After:

  ❯Startup mode                       Work                       ‹ ›  SAVED
  …
  Preview:  ● ask   work

  ❯Startup mode                       Plan (read only)           ‹ ›  SAVED
  …
  Preview:  ● read only   plan

The preview now parses the two rows into AppMode and ApprovalMode and takes the words and inks from the helpers the footer itself uses (mode_label, permission_label_for, header_mode_ink, header_permission_ink), so it also follows the UI language. In zh-Hans with Plan it reads ● 只读 plan, the same words the footer uses.

Issue

Refs #6466

How I tested it

  • I ran a debug build in a fixed-size pseudo-terminal with an empty HOME, read the screen back as text, and did the same steps with a build without this change. In /settings I filtered to "startup", picked Work, Plan and Operate in turn, and compared each preview with the footer under the composer in that mode (Tab cycles it). The preview also renders at 60×16; at 40×12 the settings view leaves it out.
  • cargo fmt --all -- --check, cargo clippy -p codewhale-tui --all-targets --all-features with CI's flags, and cargo check -p codewhale-tui --all-targets: clean. Clippy also on 1.99, plus cargo +1.89.0 check -p codewhale-tui.
  • cargo nextest run -p codewhale-tui --lib: 15326 passed, none failed.

No new tests. The 80×24 and 120×32 Settings goldens (config_panel_golden_at_eighty_and_one_twenty) pinned ● ask agent on the preview line; that line now reads ● ask work, nothing else in them changes.

Checklist

  • One focused change, rebased on current main
  • cargo fmt --all passes, and tests cover new or changed behavior
  • If this adds or changes a user-facing feature, I updated its docs and its row in docs/features.toml (cargo test -p codewhale-tui --test feature_registry checks it) — n/a

The footer preview at the bottom of /settings draws with the real
footer renderer, but it passed the raw setting values in as chip text.
With Startup mode set to Work the preview read "● ask   agent" while
the footer under the composer reads "● ask   work", and with Plan it
read "● ask   plan" where the footer reads "● read only   plan".

Parse the two rows into AppMode and ApprovalMode and take the words and
inks from the helpers the footer itself uses (mode_label,
permission_label_for, header_mode_ink, header_permission_ink). The
preview now also follows the UI language like the footer does.

The 80x24 and 120x32 Settings goldens pinned "● ask   agent" on the
preview line; they now read "● ask   work".

Signed-off-by: Lstarsky0 <59827030+Lstarsky0@users.noreply.github.com>

@claude claude 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.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@Lstarsky0
Lstarsky0 requested a review from Hmbown as a code owner October 16, 2026 04:44
@github-actions github-actions Bot added the contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm label Oct 16, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T04:47:22.360458Z 543f79f PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant