[BUG]: Share button text overflows in Portuguese (Brazil) locale #8162

Closed
opened 2026-02-16 18:09:18 -05:00 by yindo · 2 comments
Owner

Originally created by @ygorsimoes on GitHub (Jan 31, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Description

The "Share" button in the session header has a fixed width (60px) that works for English ("Share" - 5 chars) but causes text overflow when the interface language is set to Portuguese (Brazil), where the translation is "Compartilhar" (12 chars).

OpenCode version

Latest (dev branch)

Steps to reproduce

  1. Open OpenCode app (Desktop or Web)
  2. Change interface language to Portuguese (Brazil) in settings
  3. Navigate to any session
  4. Look at the "Share" button in the session header (top-right area)
  5. Observe that the text "Compartilhar" overflows outside the button boundaries

Screenshot

Screenshots will be added after issue creation.

Operating System

macOS (affects all platforms)

Expected behavior

The button should automatically resize to fit the translated text without overflow.

Proposed solution

Remove the fixed width constraint (w-[60px]) from the button in session-header.tsx:170 and let it resize based on content while maintaining the fixed height (24px).

Additional context

  • File: packages/app/src/components/session/session-header.tsx
  • Line: 170
  • Current: class: "rounded-sm w-[60px] h-[24px]"
  • Proposed: class: "rounded-sm h-[24px]"
Originally created by @ygorsimoes on GitHub (Jan 31, 2026). Originally assigned to: @adamdotdevin on GitHub. ### Description The "Share" button in the session header has a fixed width (60px) that works for English ("Share" - 5 chars) but causes text overflow when the interface language is set to Portuguese (Brazil), where the translation is "Compartilhar" (12 chars). ### OpenCode version Latest (dev branch) ### Steps to reproduce 1. Open OpenCode app (Desktop or Web) 2. Change interface language to Portuguese (Brazil) in settings 3. Navigate to any session 4. Look at the "Share" button in the session header (top-right area) 5. Observe that the text "Compartilhar" overflows outside the button boundaries ### Screenshot Screenshots will be added after issue creation. ### Operating System macOS (affects all platforms) ### Expected behavior The button should automatically resize to fit the translated text without overflow. ### Proposed solution Remove the fixed width constraint (w-[60px]) from the button in `session-header.tsx:170` and let it resize based on content while maintaining the fixed height (24px). ### Additional context - File: `packages/app/src/components/session/session-header.tsx` - Line: 170 - Current: `class: "rounded-sm w-[60px] h-[24px]"` - Proposed: `class: "rounded-sm h-[24px]"`
yindo added the web label 2026-02-16 18:09:18 -05:00
yindo closed this issue 2026-02-16 18:09:18 -05:00
Author
Owner

@ygorsimoes commented on GitHub (Jan 31, 2026):

This issue has already been fixed in PR #11371 by @alexyaroshuk, which was merged on 2026-01-31. The share button now uses px-3 instead of a fixed width, allowing it to properly display longer translations like "Compartilhar" in Portuguese.

Closing as duplicate of #11371.

@ygorsimoes commented on GitHub (Jan 31, 2026): This issue has already been fixed in PR #11371 by @alexyaroshuk, which was merged on 2026-01-31. The share button now uses `px-3` instead of a fixed width, allowing it to properly display longer translations like "Compartilhar" in Portuguese. Closing as duplicate of #11371.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 31, 2026):

This issue might be a duplicate of or related to existing issues. Please check:

  • #9288: session-header.tsx titlebar overflow - Similar issue with components overflowing in the session header
  • #9710: Desktop app trailing space next to Share button in title bar - Directly related to the Share button in the header
  • #10485: Session turn status button overflows on mobile (web/app) - Similar overflow issue with fixed-width buttons in the session header
  • #10327: Workspace name only shows a single letter before being truncated - Related fixed-width truncation issues

This appears to be a layout constraint issue where fixed-width buttons in the session header don't account for different language translation lengths. Feel free to ignore if your case is different.

@github-actions[bot] commented on GitHub (Jan 31, 2026): This issue might be a duplicate of or related to existing issues. Please check: - #9288: session-header.tsx titlebar overflow - Similar issue with components overflowing in the session header - #9710: Desktop app trailing space next to Share button in title bar - Directly related to the Share button in the header - #10485: Session turn status button overflows on mobile (web/app) - Similar overflow issue with fixed-width buttons in the session header - #10327: Workspace name only shows a single letter before being truncated - Related fixed-width truncation issues This appears to be a layout constraint issue where fixed-width buttons in the session header don't account for different language translation lengths. Feel free to ignore if your case is different.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8162