[PR #1310] [MERGED] fix: header width to display header in one line when sharing disabled #9885

Closed
opened 2026-02-16 18:14:20 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/1310
Author: @yihuikhuu
Created: 7/25/2025
Status: Merged
Merged: 7/25/2025
Merged by: @adamdotdevin

Base: devHead: fix-header-width


📝 Commits (1)

  • b6b21e1 fix: header width to display header in one line when sharing disabled

📊 Changes

1 file changed (+9 additions, -5 deletions)

View changed files

📝 packages/tui/internal/components/chat/messages.go (+9 -5)

📄 Description

This fixes #1309

This was partially reverted in 3fdd23df16 to fix a bug with the width calculation causing #1271. This was due to using len(sessionInfo) as the offset which is incorrect as it also includes other formatting.

This PR updates to measure the offset correctly by measuring the unformatted text.

The below video also demonstrates that the previous bug does not appear with these changes.

https://github.com/user-attachments/assets/9762eef8-819f-41d2-8b2d-88b3a3a8b158


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/1310 **Author:** [@yihuikhuu](https://github.com/yihuikhuu) **Created:** 7/25/2025 **Status:** ✅ Merged **Merged:** 7/25/2025 **Merged by:** [@adamdotdevin](https://github.com/adamdotdevin) **Base:** `dev` ← **Head:** `fix-header-width` --- ### 📝 Commits (1) - [`b6b21e1`](https://github.com/anomalyco/opencode/commit/b6b21e1d23a89c27618aa029b784fde5580b25c4) fix: header width to display header in one line when sharing disabled ### 📊 Changes **1 file changed** (+9 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `packages/tui/internal/components/chat/messages.go` (+9 -5) </details> ### 📄 Description This fixes #1309 This was partially reverted in 3fdd23df16a44150afc3564f16fe486b0785f7aa to fix a bug with the width calculation causing #1271. This was due to using `len(sessionInfo)` as the offset which is incorrect as it also includes other formatting. This PR updates to measure the offset correctly by measuring the unformatted text. The below video also demonstrates that the previous bug does not appear with these changes. https://github.com/user-attachments/assets/9762eef8-819f-41d2-8b2d-88b3a3a8b158 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:20 -05:00
yindo closed this issue 2026-02-16 18:14:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9885