Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Selected text is unreadable (black on black) on light themes

未关闭 适合新手
#58,181 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
65/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
frontend

调研方向

首先追踪选择颜色如何应用于 assistant Markdown、代码块和用户消息中的会话记录文本,然后在测试渲染器中检查内置的浅色主题 opencode。比较浅色和深色主题中所选文本的对比度,并在可用时于 Ghostty 中复现黑色选择栏。完成标准是:在浅色主题下,会话记录的三个区域中所选文本均保持可读;深色主题下的选择功能仍然正常。

由索引模型根据 Issue 内容生成。

描述

pending close triaging
Description

Selecting text in the session transcript on a light theme is unreadable: the selection paints black text on a black background. This happens in assistant markdown, code blocks and user messages. The dark theme is fine.

Selected text has no background of its own (the surrounding block's color is transparent for the text cells), so OpenTUI's default inverse selection turns the foreground black on the ink color. In a test renderer on the built-in opencode light theme (no custom theme), selected text in a user message and in assistant markdown has a contrast ratio of 1.21:1 (dark theme: 18.1:1).

Also seen live in Ghostty with a custom light theme: dragging over text shows a solid black bar and the text cannot be read.

Plugins

none

OpenCode version

dev (6a5973d263)

Steps to reproduce
  1. Use a light theme (theme.mode: "light").
  2. Open a session with at least one user message and one assistant reply.
  3. Drag over text in either one.
Screenshot

I can attach a recording if useful.

Operating System

macOS

Terminal

Ghostty

主要语言
TypeScript
星标
215k
派生
28.9k
平均合并
4 小时 21 分钟
30 天内合并 PR
476

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

anomalyco/opencode 的其他 Issue

查看 anomalyco/opencode 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。