Skip to content

feat(tui): model tags on the right of the footer, YOLO tag on the input line - #360

Merged
agenteinstinct1-max merged 4 commits into
dev-vibecodedfrom
feat/footer-tags
Oct 21, 2026
Merged

agenteinstinct1-max merged 4 commits into
dev-vibecodedfrom
feat/footer-tags

Conversation

@agenteinstinct1-max

@agenteinstinct1-max agenteinstinct1-max commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #359.

  • Model name stays on the left of the footer; the tags (effort, variant, vision) move to the right.
  • The YOLO tag moves to the top right of the input row.
  • When space runs out, the model name and the placeholder are cut with an ellipsis, so nothing touches the tags or the YOLO tag. Below 72 columns the provider label is hidden.

Wide (110 columns):

wide

60 columns:

60

50 columns:

50

@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

const borderHighlight = createMemo(() => tint(theme.border, highlight(), agentMetaAlpha()))

// Cells inside the prompt box: terminal width minus the outer margin, left border and padding.
const innerWidth = createMemo(() => Math.max(10, dimensions().width - 9))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: The width budget is derived from the terminal width, not from the prompt's own width

innerWidth assumes the prompt box spans the whole terminal minus 9 cells. That only holds for the session route with the sidebar hidden; everywhere else the prompt is narrower, so the computed room is far too large:

  • Session route with the sidebar open: the prompt sits in the main column (paddingLeft/Right={2}) next to a 42-column sidebar (packages/tui/src/routes/session/sidebar.tsx:36), so the real content width is terminal - 51, not terminal - 9.
  • Home route: the prompt is capped at promptMaxWidth() (75 by default, packages/tui/src/routes/home.tsx:35-39), so on a 120-column terminal the real content width is 70 while innerWidth() reports 111.

Consequences: the model name is never truncated to the space that actually exists (the left box shrinks and overflow="hidden" hard-clips the name with no ellipsis), and placeholderRoom() allows a placeholder long enough to run underneath the YOLO badge — the exact overlap this PR is meant to prevent. showProvider() has the same problem: its 72-column threshold is a terminal-width threshold, not a prompt-width threshold.

Measure the prompt's own rendered width (e.g. the anchor box's layout width) and derive innerWidth/showProvider from that.

models without thinking variants. Its hue (fast
green, medium orange, thorough red) is drawn
beside the always-visible level name. */}
<text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: The · separator that preceded the effort tag was dropped, breaking two existing tests

The effort label moved into the right-hand group without its leading separator, so the footer row now reads ... model provider medium · high · vision instead of ... model provider · medium · high · vision. Two existing assertions depend on the old separator and will fail:

  • packages/tui/test/prompt/vision-tag.test.tsx:436 — expect(highRow).toContain("· medium")
  • packages/tui/test/cli/tui/dialog-agent-effort.test.tsx:805 — expect(after).toContain("· fast")

Either keep a separator at the start of the new group, or update both tests in this PR.

width="100%"
>
<Show when={store.mode === "normal" && local.permission.mode === "yolo"}>
<box position="absolute" top={1} right={2} paddingLeft={1} paddingRight={1} backgroundColor={theme.warning}>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: The YOLO badge overlays the editable first input row

The badge is absolutely positioned on the textarea's first row (the textarea is width="100%" of the same content box, and top={1} lands on the first content row). Only the placeholder is shortened to make room (placeholderRoom); typed text is not. The last ~6 columns of the first input line therefore sit under the badge, so the tail of what the user typed is hidden. If the textarea paints above the badge instead, the badge is covered by the textarea's own background (focusedBackgroundColor).

Reserve space for the badge inside the input row (e.g. reduce the textarea width or add right padding while the badge is visible) rather than overlaying the editable area.

})
const modelLabel = createMemo(() => Locale.truncate(local.model.parsed().model, modelRoom()))
// The placeholder shares its row with the YOLO tag.
const placeholderRoom = createMemo(() => innerWidth() - (local.permission.mode === "yolo" ? 8 : 0))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

SUGGESTION: Placeholder reserves room for the YOLO badge in shell mode as well

The badge is only rendered when store.mode === "normal" && local.permission.mode === "yolo" (line 1432), but this reservation is applied for any yolo permission mode. In shell mode no badge is drawn, yet the placeholder is still cut 8 columns short. Use the same condition as the badge's Show.

const modelRoom = createMemo(() => {
const agentName = store.mode === "shell" ? "Shell".length : (local.agent.current()?.name.length ?? 0)
const provider = showProvider() ? currentProviderLabel().length + 1 : 0
return Math.max(4, innerWidth() - tagsWidth() - 2 - agentName - 3 - provider)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

SUGGESTION: modelRoom ignores the width of the right-hand slot

props.right (the session_prompt_right / home_prompt_right plugin slot) is rendered in the same right-hand box as the tags and is not accounted for here. When a plugin supplies right content, the left box shrinks and the model name is hard-clipped by overflow="hidden" with no ellipsis, which breaks the invariant this PR introduces. Subtract the right content's width as well.

<box flexDirection="row" gap={1} alignItems="center" flexShrink={0}>
<Show when={store.mode === "normal"}>
<box flexDirection="row" gap={1} flexShrink={0}>
{/* Agent effort is its own dial and shows even for

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

SUGGESTION: Moved block kept the old indentation, and one line exceeds the print width

The children of the new tags box are still indented as if they were in the previous nesting level, and the badge line (1433) is 122 characters — over the repo's prettier printWidth of 120. Running prettier on the file normalizes both.

@kilo-code-bot

kilo-code-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • packages/tui/src/component/prompt/index.tsx
  • packages/tui/test/cli/tui/dialog-agent-effort.test.tsx
  • packages/tui/test/prompt/vision-tag.test.tsx
Previous Review Summary (commit 9c861f6)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 9c861f6)

Status: 6 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 2
WARNING 1
SUGGESTION 3
Issue Details (click to expand)

CRITICAL

File Line Issue
packages/tui/src/component/prompt/index.tsx 1367 Width budget uses the terminal width instead of the prompt's own width. The session route renders the prompt in a column 42 cells narrower when the sidebar is open, and the home route caps the prompt at 75 cells, so innerWidth() over-estimates by up to ~42 cells. The model name is then hard-clipped without an ellipsis and the placeholder can run under the YOLO badge — the overlap this PR intends to prevent. showProvider()'s 72-cell threshold has the same flaw.
packages/tui/src/component/prompt/index.tsx 1547 The · separator preceding the effort tag was dropped when the tag moved to the right-hand group, breaking packages/tui/test/prompt/vision-tag.test.tsx:436 (toContain("· medium")) and packages/tui/test/cli/tui/dialog-agent-effort.test.tsx:805 (toContain("· fast")).

WARNING

File Line Issue
packages/tui/src/component/prompt/index.tsx 1433 The YOLO badge is absolutely positioned over the textarea's first row. Only the placeholder is shortened; typed text is not, so the last ~6 columns of the first input line are hidden under the badge (or the badge is covered by the textarea background). Reserve space in the input row instead of overlaying it.

SUGGESTION

File Line Issue
packages/tui/src/component/prompt/index.tsx 1383 placeholderRoom reserves the 8 cells for the YOLO badge whenever the permission mode is yolo, but the badge only renders in normal mode; in shell mode the placeholder is cut short for a badge that is not drawn.
packages/tui/src/component/prompt/index.tsx 1379 modelRoom does not account for props.right (the session_prompt_right / home_prompt_right plugin slot rendered in the same right-hand box), so with right content the model name is hard-clipped with no ellipsis.
packages/tui/src/component/prompt/index.tsx 1543 The moved block kept the previous nesting indentation, and line 1433 is 122 chars — over the repo's prettier printWidth of 120.
Files Reviewed (1 file)
  • packages/tui/src/component/prompt/index.tsx - 6 issues

Fix these issues in Kilo Cloud


Reviewed by free · Input: 65.6K · Output: 11.8K · Cached: 177.8K

@agenteinstinct1-max
agenteinstinct1-max merged commit 9464c9e into dev-vibecoded Oct 21, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant