Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

desktop: code blocks hide horizontal scrollbars and cannot wrap long lines

オープン 初心者向け
#60,143 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
70/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
css, typescript

調査の方向性

まず packages/session-ui/src/components/markdown.css を確認します。Issue では、pre ブロックのスクロールバーを非表示にするスタイルが指摘されています。内容がはみ出すコードブロックにどのようなスタイルが適用されているか、また既存のコンポーネントが折り返しオプションに対応しているかを確認してください。デスクトップ UI と Web UI の両方で、長い行を表示された水平スクロールバーで閲覧できるか、折り返して表示できれば完了です。関連するスタイルとテストがあれば確認してください。

索引モデルが issue の本文から書いたものです。

説明

Description

Long single-line code in a fenced block is clipped at the viewport edge. The block scrolls horizontally, but the scrollbar is hidden by CSS:

pre {
  overflow: auto;
  scrollbar-width: none;
  &::-webkit-scrollbar { display: none; }
}

(packages/session-ui/src/components/markdown.css)

On Windows there is no visible affordance. The only ways to reach the rest of the line are Shift+wheel or selecting text and dragging. There is also no wrap option. A code block taller than the viewport loses its copy button while scrolling too (tracked separately in #53519).

This was reported in #49535, but that issue was closed as a v1 issue, not fixed.

Plugins

env-guard.ts, headroom-compress.ts, memory-inject.ts, modelscope-imagegen.ts (none related)

OpenCode version

2.2.1 desktop (bundled CLI 2.2.1), channel latest

Steps to reproduce
  1. Ask the assistant to output a fenced code block with a very long single line (e.g. 2000+ characters).
  2. Look at the right edge of the code block.
  3. No horizontal scrollbar appears; the overflow is only reachable with Shift+wheel or by selecting text and dragging.
Screenshot

No screenshot attached.

Operating System

Windows 11 Pro 10.0.26300 x64

Terminal

Desktop app

Expected Behavior
  • Show a horizontal scrollbar when the block overflows (always, or on hover/focus), and/or
  • Add a "wrap long lines" toggle for code blocks.

The same shared styles affect the web UI, so this is not desktop-only.

主要言語
TypeScript
スター
221k
フォーク
29.6k
平均マージ
5時間 32分
マージ済み PR(30日)
492

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

anomalyco/opencode のほかの issue

anomalyco/opencode の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。