[Bug]: 聊天区超长行内代码横向溢出被裁切——既无折行也无横向滚动
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Start at the markdown component registration and rendering paths for the codePre and codeContent parts, then reproduce the long inline-code case in the desktop chat message view. Compare it with the existing fenced-code scrolling behavior; done means long inline code remains fully viewable by wrapping or horizontal scrolling without regressing fenced code blocks.
Written by the indexing model from the issue text.
Description
EN TL;DR — A long inline code span overflows the chat message container and gets clipped: there is no wrapping and no horizontal scrollbar, so the overflowing content is simply lost. Fenced code blocks in the same container scroll correctly, so this is specific to inline code.
环境
- OpenBitFun 1.0.1 桌面版
- Windows 10 22H2(19045)/ WebView2
- 消息区宽度:默认(未调窄)
复现步骤
- 让模型输出一条包含超长行内代码的消息(例如一整条长路径、长命令或长标识符串,约 80 字符以上)
- 观察该行内代码的渲染结果
实际结果
行内代码横向溢出消息容器边界,超出部分被裁切——既看不到,也无法横向滚动查看。表现为:那一行文字在容器的右边缘处被硬切断,右侧没有出现任何滚动条,超出部分无法通过任何方式查看。
对照:同一容器中的围栏代码块表现正常(可以横向滚动),问题只出现在行内代码上。
预期行为
行内代码应在容器内折行,或至少提供横向滚动,不应静默丢失内容。
补充信息(供定位参考)
以下是从当前版本可查证的信息:
markdown组件注册的 parts 共有 14 个,其中代码相关的是codeBlock/codeToolbar/codeBody/codePre/codeContent,没有行内代码对应的 part;- 从渲染实现看,
codePre对应<pre>元素、codeContent对应<code>元素;行内代码同样是<code>元素,其是否归属于codeContentpart 无法从 registry 或前端产物中确认; - 当前未给行内代码提供 overflow 兜底(既没有折行,也没有横向滚动),因此溢出内容既不可见也不可滚。
参考:外观包契约中 markdown 组件的 codeContent / codePre 属于 paint 属性档,该档允许 whiteSpace、wordBreak、overflowWrap(枚举包含 pre-wrap / anywhere / break-word),也就是说如果行内代码归属于这两个 part 之一,用户可以通过外观包从样式层缓解该问题。但目前注册表没有暴露行内代码的 part 归属,用户侧无法确认。
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 236
- Avg merge
- 2h 59m
- Merged PRs (30d)
- 598
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GCWing/OpenBitFun
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
GCWing/OpenBitFun#2363 ·
-
question
Difficulty 1/5 Under an hour Newbie friendliness 78/100
GCWing/OpenBitFun#2340 ·
-
[Bug]: 小应用无卸载功能 Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
GCWing/OpenBitFun#3158 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
GCWing/OpenBitFun#3155 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
GCWing/OpenBitFun#3153 ·
All issues in GCWing/OpenBitFun
Similar issues
-
risk:low runtime status:in-progress type:test
Difficulty 1/5 Under an hour Newbie friendliness 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
EricSpencer00/Resilient#4835 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bisq-network/bisq-musig#204 ·
-
agent:ready documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
cesarferreira/stax#890 ·