desktop: code blocks hide horizontal scrollbars and cannot wrap long lines
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 70/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- css, typescript
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Bắt đầu với packages/session-ui/src/components/markdown.css, nơi issue chỉ ra các kiểu ẩn thanh cuộn của khối pre. Kiểm tra cách các khối mã có nội dung tràn được định dạng và liệu component hiện có hỗ trợ tùy chọn xuống dòng hay không. Công việc hoàn tất khi có thể xem các dòng dài bằng thanh cuộn ngang hiển thị hoặc chúng được xuống dòng, trên cả giao diện desktop và web; kiểm tra các kiểu và bài kiểm thử liên quan nếu có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ask the assistant to output a fenced code block with a very long single line (e.g. 2000+ characters).
- Look at the right edge of the code block.
- 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.
- Ngôn ngữ chính
- TypeScript
- Star
- 224k
- Fork
- 30k
- Merge trung bình
- 6 giờ 48 phút
- Pull request đã merge (30 ngày)
- 490
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của anomalyco/opencode
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
anomalyco/opencode#61221 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
anomalyco/opencode#60584 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
core: OpenRouter BYOK sessions record cost = 0 since v2.2.0 (ignores cost_details.upstream_inference_cost)Có thể đã có người làm @tneemo đã nhận 3 ngày trước. Đang mởreproduced
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/opencode#60558 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/opencode#60541 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
anomalyco/opencode#60529 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
JuliusBrussee/caveman#1449 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
linagora/twake-calendar-frontend#1924 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: Class TV ModaĐang mởcheck:passed streams:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
libnativeapi/nativeapi#21 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
GiganticMinecraft/seichi-playguide#183 ·
Maintainer thường phản hồi trong vòng 1 ngày