Skip to content

fix(chat): retain ordered list starting numbers - #8467

Merged
loopx-agent merged 1 commit into
mainfrom
codex/markdown-ordered-start-20261109
Nov 9, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/markdown-ordered-start-20261109

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Paragraph-separated ordered steps in a quoted message all restart at 1. Preserve each block's first source number in the shared Markdown parser and render it through native <ol start>, so the same source reads 1, 2, 3 across paragraphs. This applies to all consumers of the shared renderer.

Author: LoopX Agent (Codex). Implemented against main at 67dcbde9bebe9d12c03193dc3edc39a0435d7250; proposed/tested head 87de389cd2524349bfff29055c6b77b5b638e976.

The outcome follows the existing original-conversation RFC (docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md): read the complete source in its bound conversation without modifying canonical model input or submitting another Turn. This is a standalone presentation defect; it adds no setting or execution behavior.

Validation: the same packaged browser scenario failed before the fix with starts [1,1,1,1,1] and passes with [1,2,3,7,0]. It also checks consecutive-list continuation (7 then 8 despite a later source marker of 42), unordered items, inert fenced code, keyboard, English, 390px overflow, unchanged source evidence and zero model Turns. Packaged Chat build, shared parser/team-report and answer-report smokes, Python compilation, diff/RFC hygiene and both selected standard premerge canaries passed. Existing bundle-size warnings remain. CI was not queried under the configured policy. Installed native App adoption is a separate next step.

Visual evidence uses synthetic provider/model identities with real isolated SQLite/Chat HTTP and the packaged Chat bundle. No private conversation or screenshot is published. Baseline captures use 4995f606b74d9512a43a8008ae81ec7cad4339f2; the intervening main changes do not touch these frontend paths. Candidate captures use the exact tested head above.

Default desktop (unchanged hierarchy: current question first, source folded):

Default desktop

Expanded desktop before → after (same source and viewport):

Before: numbered blocks all restart at one

After: each block retains its source number

390px first viewport and the expanded lower reading path (no horizontal overflow):

Narrow first viewport

Narrow steps retain 1, 2, 3, 7 and 0

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; GPT-6 (Codex); OpenAI; self_reported. Host execution observation is unavailable (session_not_found); no exact backend build is claimed.

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

用户在 App 中展开原消息的长引用,依靠步骤编号理解操作顺序。同一段原文中的 1、2、3 被说明段落隔开时,旧界面显示为三个 1;新界面保留各段起始编号,用户无需复制原文重新辨认步骤。同一隔离 Chat 服务和打包前端的对照已复现旧错误,并验证新界面显示 1、2、3、7、0。本 PR 只修复共享 Markdown 的列表展示,不改消息、模型输入、执行、受众绑定或重放规则。合并后的已安装原生 App 仍需采用新构建并读回原消息;这不影响源码修复的独立验收,也不等于整体验收完成。

改动思路 / Approach

起始编号由原文直接派生,解析和渲染沿用同一个共享 owner;不增加持久状态、开关、第二套解析器或业务特判。本次边界是共享列表解析、原生 ol 属性和现有真实 HTTP 浏览器回归,安装采用由现有安装器继续完成。保留旧行为会继续误导步骤顺序;只改引用组件会重复已有规则,而完整替换 Markdown 引擎会增加无关维护成本。解析器和渲染器必须一起传递这个原文事实,单改任一层都无法修复。已有输入只经过读取、分块和安全 React 呈现;不新增需要用户填写、确认或同步的信息,展开、收起和切换语言仍走原来的路径。

具体改动 / Changes

规范依据为 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md,固定版本 67dcbde9bebe9d12c03193dc3edc39a0435d7250,采用其中原会话继续阅读的已接受合同。original-body-exact-quote 在本次已实现:相同原文经共享解析器保留编号,原问题、引用和话题节选的结构仍沿用现有组件。frozen-original-session 的选择器与执行准入不在本 PR 修改范围,现有回归仍核对原绑定及零模型 Turn,不能把这项展示修复说成新绑定或业务执行成功。

关键代码讲解

parseMarkdownBlocks(apps/presentation/dashboard/src/features/personal-workspace/markdown-blocks.ts:18)在既有有序列表分支中分别捕获数字和正文,只为非默认起始数补充 start。因此 0 会保留,普通 1 的旧 block 形状保持不变;同一连续列表内后面的 42 不会重启序列,7 后仍由浏览器接成 8。代码围栏的优先级、无序列表的正文捕获、块行号与标题/节选归属均未改变。

MarkdownText(apps/presentation/dashboard/src/features/personal-workspace/markdown.tsx:119)仅把该数字交给原生 ol start,继续以 React 文本节点生成内容。引用组件、历史消息、回答报告和团队产物共享这个入口,没有新 HTML 注入或第二套编号规则。现有真实 HTTP 浏览器用例同时加入分段步骤、7/42、0、无序列表和代码围栏,独立读取 DOM 数字,而非仅检查“正文还在”。

对主干的风险 / Risks

未发现阻塞问题。主要回归面是共享渲染器:只看文本的测试可能全绿,但编号仍错误;新增的 DOM oracle 在旧打包渲染器上真实失败,修复后通过。默认起始1保持不变,0不用真假值回退,同一连续列表仍按原生序列前进,围栏代码的 9. 保持字面文本,无序两项仍是 ul。没有状态迁移、执行授权或开关隔离变更,字段属于随解析重算的临时投影。

PASS:相同真实 SQLite/Chat HTTP 与打包浏览器对照、原文证据不变/零模型 Turn、390px/键盘/英语路径、现有4个唯一解析测试和两个报告 smoke、Chat 构建、Python 编译、diff/RFC 检查及2个标准 canary。已有 bundle 体积警告保留,没有提高门限。范围扫描的5个公开文件通过;全局 check 的两个其他 Goal authority 诊断仍未解决,未宣称全局检查通过。CI 按配置未查询。若回滚,仅需撤销这一提交并重建,无数据迁移。

我的整体评价 / Verdict

当前源码交付属于 justified_increment:用户可读的编号缺陷已实证修复,后续安装采用归现有交付 owner。long_horizon 为 preserved,user_experience 为 improved;不引入新状态或额外用户轮次,生产改动与问题规模相称。桌面默认页仍以当前问题为主、引用折叠;展开后编号与正文可连续阅读。390px 首屏和下方步骤已目视检查,编号清楚,引用与代码仍可访问。本次截图证明合成来源的打包浏览器;已安装原生 App 的真实消息采用尚未包含在这份源码审查中。整体复用既有共享语义,保留原始输入;此前后对照不能替代原生 App 的采用验收,也不宣称修复完整 Markdown 嵌套语义。没有未解决 finding;合并资格与已有维护授权另行核对。

English verdict: APPROVE 87de389. No blocking finding; packaged baseline/head numbering and companion local checks passed. Installed native adoption remains separate; CI was not consulted.

@loopx-agent
loopx-agent merged commit 417e9fd into main Nov 9, 2026
14 of 35 checks passed
@loopx-agent
loopx-agent deleted the codex/markdown-ordered-start-20261109 branch November 9, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant