Repository navigation
fix(desktop,markdown): active while a child runs; keep currency out of inline math - #1580
Merged
Merged
Conversation
A reply that quotes prices — `$0.20/$0.60` — had every span between two `$` read as inline math by remark-math, so the prose around an amount was typeset by KaTeX as a formula: a real pricing report produced 13 such spans and the paragraph collapsed into raised, shrunken glyphs. Claim a single `$` that is glued to a number (`$10`, `$0.20`, `$1,200`, and a bare digit followed by CJK prose such as `$5 首月`) as ordinary text, and leave everything else to remark-math: `$$…$$`, `\(…\)`, `$a+b$` and `$2^n$` still render. Claiming only the sigil keeps emphasis inside a quoted amount: `**…**` is parsed by the emphasis pass, not frozen into text.
…n runs A child session — a fork, or a worker an agent started — is drawn inside its conversation's fold, so a run under it is work the recent view shows no row for. The split read only each conversation's own run, so a conversation whose worker was still producing output sank to "Earlier" while its work moved out of sight; the phone's recent page already filed it under "Active". The split now ranks a conversation by its own run or by any run under it, and the page window keeps those rows: a long goal run speaks through its worker, so the conversation itself can be older than the page. The promotion brings the conversation's whole subtree with it, which is also what an opened fold draws.
huichen
enabled auto-merge (squash)
November 10, 2026 02:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
两个独立修复,摘成一条分支先送 main——它们本来挂在
dev-huichen上,而那条分支带着0797d2a2a(改.github/workflows/ci.yml),当前 PAT 没有
workflowscope,整条分支推不上去。这两个提交都不碰 workflow 文件,所以单独成支可以立刻落地。1.
fix(desktop): file a conversation under Active while its child session runs问题:桌面端
recentSplit()只看每行自己的 run 状态,而子会话在桌面是画在父会话折叠里的、不占行。于是父会话留在「更早」,它唯一在动的活儿(worker 子会话)又看不见 —— 看起来全静止。TUI 的
最近不折叠,所以没这问题。改法:
recentSplit()改看recentTree,一条会话只要有自己或任意一层子会话在跑(running / queued / waiting_approval)就进「活跃」;新增
inFlightRowKeys()供ActivityRail的页窗口过滤,把「因 worker 而活跃」的子树留在列表里(否则长 goal run 的父会话会因 last_message 掉出 30 条窗口而缺席);远端行同规则。验证:5 个新/改断言(父会话被 worker 提升、隔一层 grandchild、页窗口未覆盖仍保留、远端机器、worker 自身不占行);
证伪:去掉提升规则 4 个失败、去掉窗口保留对应那个失败。桌面全套
vitest run423 文件 / 5973 用例全绿,tsc --noEmit、eslint通过。2.
fix(markdown): keep currency amounts out of inline math问题:
remark-math把$0.20/$0.60之间的散文当行内公式,KaTeX 一排版整段塌成一串小字(实测最近 40 个会话正文,12 处"行内公式"全是金额)。改法:micromark 层新增
remarkCurrencyMath,只认领「紧贴数字的$」这两个字符、不做配对 ⇒$10 买到的是**一份 $100 额度**里的**…**仍走正常强调解析。已知取舍写进注释:
$1.5x$这类以两位数字开头的行内公式会被当文本;显示公式不受影响。验证:
packages/markdown679 测试 +tsc --noEmit+eslint干净;改后同一批正文里误判为公式的 0 处。回退
单提交各自 revert(
9dd89ae7f、c3f7cf53e);两者互不依赖,可分别回退。