Skip to content

fix(vscode): fit settings sidebar to localized section labels - #12032

Merged
marius-kilocode merged 2 commits into
mainfrom
fix-settings-sidebar-width-truncation
Jul 8, 2026
Merged

fix(vscode): fit settings sidebar to localized section labels#12032
marius-kilocode merged 2 commits into
mainfrom
fix-settings-sidebar-width-truncation

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Problem

The settings sidebar clipped localized section labels in non-English languages. German labels like "Automatisch genehmigen" and "Autovervollständigung" (22 chars) were truncated with an ellipsis because the sidebar was only 150px wide.

Before:
file-8f4e2117b5c6687b030424e359d317ab

After:
file-6432bf8b82f21c094ebf73b9835effa6

Root cause

Two competing CSS rules set the settings sidebar width, and the wrong one won on specificity:

  • Upstream packages/ui/src/components/tabs.css[data-orientation="vertical"][data-variant="settings"] sets width: 150px (200px at viewport ≥ 640px). Specificity (0,4,0).
  • Kilo packages/kilo-ui/src/components/tabs.css[data-variant="settings"] (missing the data-orientation qualifier) intended width: 180px but only has specificity (0,3,0), so the upstream 150px always won. The Kilo override was effectively dead code.

A fixed 180px would also still be too narrow for the longest translations across all locales (e.g. Italian "Informazioni su Kilo Code", Spanish "Comportamiento del agente", Polish "Automatyczne zatwierdzanie" — ~25 chars).

Fix

In packages/kilo-ui/src/components/tabs.css:

  1. Added the [data-orientation="vertical"] qualifier so the Kilo rule matches the upstream selector specificity and actually takes effect.
  2. Switched from a fixed width: 180px to content-driven sizing: width: auto; min-width: 180px. The sidebar now grows to fit the longest translated label instead of truncating it, while keeping a sensible minimum for short locales. The content panel already has flex: 1, so it absorbs the remaining space.

This is entirely Kilo-owned CSS (packages/kilo-ui/), so no kilocode_change markers are needed and there is no upstream merge impact.

Verification

Built the extension and verified in an isolated VS Code self-test instance. Queried the live settings webview DOM: all 16 section labels render with clipped: false (trigger scrollWidthclientWidth), and the list width is 180px for English (the min-width floor). Longer locales will expand beyond that as needed.

The settings sidebar used a fixed 150px width that clipped long
localized labels (e.g. German 'Automatisch genehmigen',
'Autovervollständigung'). The Kilo override intended to set 180px
but was dead: it lacked the [data-orientation=vertical] qualifier the
upstream rule has, so the upstream 150px won on specificity.

Match the upstream selector specificity and switch to content-driven
sizing (width: auto, min-width: 180px) so the list grows to fit the
longest translated label instead of truncating it.
@marius-kilocode
marius-kilocode enabled auto-merge (squash) July 8, 2026 08:16
@kilo-code-bot

kilo-code-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The fix correctly equalizes selector specificity with the upstream [data-orientation="vertical"][data-variant="settings"] rule and switches to content-driven sizing (width: auto; min-width: 180px). Change is confined to Kilo-owned CSS (packages/kilo-ui/), includes a proper user-facing changeset, and the author verified the fix against the built webview DOM.

Files Reviewed (2 files)
  • packages/kilo-ui/src/components/tabs.css
  • .changeset/fix-settings-sidebar-i18n-width.md

Reviewed by claude-sonnet-5-20260630 · Input: 24 · Output: 11.5K · Cached: 519.2K

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit e4ae1c7 into main Jul 8, 2026
25 checks passed
@marius-kilocode
marius-kilocode deleted the fix-settings-sidebar-width-truncation branch July 8, 2026 10:21
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…rg#12032)

The settings sidebar used a fixed 150px width that clipped long
localized labels (e.g. German 'Automatisch genehmigen',
'Autovervollständigung'). The Kilo override intended to set 180px
but was dead: it lacked the [data-orientation=vertical] qualifier the
upstream rule has, so the upstream 150px won on specificity.

Match the upstream selector specificity and switch to content-driven
sizing (width: auto, min-width: 180px) so the list grows to fit the
longest translated label instead of truncating it.
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.

2 participants