Skip to content

fix(research): reuse saved translations in version comparison - #7412

Merged
huangruiteng merged 5 commits into
mainfrom
codex/research-language-coverage-20261027
Oct 27, 2026
Merged

huangruiteng merged 5 commits into
mainfrom
codex/research-language-coverage-20261027

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Problem and result

A saved, source-qualified Chinese translation already covered Research lists and reading, but recorded-version comparison still displayed serialized original English summaries. Comparison now reuses the same translated titles and structured observations/decisions, with both complete originals available in place.

中文研究页的版本比较现在复用同一份来源合格的已保存译文,观察和决策保持正文层级;两侧完整原文仍可展开。版本关系、差异数、记录状态、测量及 JSON 导出继续依据原始记录,不将译文变化算作来源变化。

  • Reuse the existing qualified display projection and narrative renderer; no model call, new translation store, analysis execution, schema or permission change.
  • Keep the current-main translated-search displaySections integration alongside comparison renderSummary.
  • Scope record-list and source-metadata CSS so nested comparison prose remains readable at390px without repeating measurement/execution sections.
  • Extend the existing durable browser scenario with two original finding revisions, canonical differences/exports and full/partial/invalid/source/language fallback.

Validation

Reviewed head: f5b49c712a06d5329a5504c4e8fdc698579de2e3. Integrated main: bee2f29b34f8f53a4dcdd31e1e00a5e2bc10a43a.

PASS: complete manifest-bound build:chat, control-plane TypeScript, CSS custom properties;12 record search/export/version owner tests and32 real backend tests. The12/32 suites ran on integrated product source 4a49f62f0eb5ac74c524ac26155f03d3c47c2433; all four production files and dependencies remain unchanged in the final evidence/test refresh. Final head rebuild and all three packaged journeys pass against disposable production SQLite/history/analysis HTTP:

  • research-display-language: complete and missing fields, invalid/source/language isolation, original/translation switch, source return and keyboard focus, canonical version selection/differences/export, execution refusal.
  • research-record-search: real paged history, full/filtered original JSON, version comparison, incomplete/stale scope, Goal isolation and read/download recovery.
  • research-history: populated whole-page research reading and failure/recovery.

Local premerge's4 direct and19 selected automated checks pass. Image evidence remains manual: pixels, dimensions/metadata, source provenance and public-safe scope have been inspected. No GitHub CI was queried, polled or awaited.

Integration exposed stale test oracles: the fixed snapshot now has31 events, and an old record ID also matches its explicit successor's supersedes. The scenario now derives the denominator from source input, asserts both canonical matching exports, then narrows by original input revision. It compares exports against the complete original-export contract, retaining identities and body equality. Initial missing bundle manifest was corrected by the complete packaged build; earlier failures remain historical rather than relabeled passes. An earlier author run also had an intermediate keyboard wait timeout; final complete current-head focus/expansion coverage passes, without claiming general browser timing repair.

Visual evidence

Current first viewport,1440×1000:

Current packaged Research first viewport at1440px

Current first viewport,390×1000:

Current packaged Research first viewport at390px

View Before Current complete translation Current partial translation
Desktop1440 Before desktop Current desktop Partial desktop
Narrow390 Before narrow Current narrow Partial narrow

Rendered product source: 4a49f62f0eb5ac74c524ac26155f03d3c47c2433, with no subsequent changes to the four rendered production files. Historical before source: fb0303f33327c51da434a215f0c757b5d1a5b16a. Images use the same synthetic31-event fixed snapshot spanning20 hours, including two finding versions and refuted/tentative/unknown states. These are actual packaged Chat UI captures backed by disposable production SQLite/history/analysis HTTP; no model or solver runs. Six current captures were refreshed after main integration; the two original before captures retain their original revision.

Desktop and expanded390px inspection shows readable observation/decision prose, original access and preserved negative/unknown states. Partial captures deliberately keep uncovered original text; they do not claim translated meaning where none exists. Ordinary inspection has zero mutation attempts; the browser scenario separately makes one explicit denied execution POST.

This slice qualifies saved-projection rendering and read recovery. It does not certify arbitrary translation semantic quality, installed-native-App deployment, user adoption or long-horizon effectiveness. No new user setup or confirmation is required. Reverting the presentation change leaves original history and saved analysis unchanged.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…search-language-coverage-20261027

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.1-sol · OpenAI · runtime_reported · effort=max

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

动机

在中文研究页回看两次实验记录的用户。用户展开同一结论的两个版本,旧版比较区仍是一整段英文;现在直接读到对应的中文观察和决策,并能展开两侧原文。390px 下可在同一屏阅读两版观察与决策,切换原文后比较对象和四项来源差异保持不变。本次保留原分析生成、评分、用量、来源写入和执行权限。整页译文的语义质量、其他真实案例与正式 App 采用仍未核验。

改动思路

复用现有译文和正文渲染器,来源版本与差异仍由原 owner 决定;无需新服务、状态或额外模型调用。本 PR 只修复研究记录比较的展示消费与相邻样式,保留生成质量和原生采用的后续验收。保持原始记录负责选版本、计算差异与输出原始下载;已经核对来源和版本的译文只负责阅读。相比只翻译标签,补上正文消费才能解决读不懂的问题;相比再起翻译服务,这里只是给已有比较器传递现有投影,并共享正文渲染。没有新增设置、准备步骤或确认轮次,原文仍沿现有切换和展开入口读取。

具体改动

关键代码讲解

  • GoalResearchHistory.findingNarrative 从已有正文中分出观察和决策渲染;仍使用原始文本解码后的字段,译文不会重新解析成决策,也不会重复带入测量和执行详情。
  • ResearchRecordSearch 转交已有展示 map 和正文回调。列表搜索、完整原始下载及版本识别继续读取原记录。
  • ResearchRecordComparison 对两侧使用同一合格投影,原始记录仍决定差异数和比较身份;已译标题、正文和执行说明可查看对应完整原文。没有译文时保留原值,未记录、零与未知不混淆。
  • 历史样式 把列表边框、间距与来源小字限定到实际所属元素;窄屏比较用正常字号的标签和值并排,正文中的变化、停止、保留不再被当作独立记录卡片。

docs/development/design.md#research-workspace--研究工作台 的 qualified-comparison、canonical-differences、whole-page-reading 三项均已落实;完整真实案例译文语义和正式 App 采用保留后续验收。已有语言场景扩展到同一结论的负面旧记录和暂定新记录,实际 HTTP/SQLite 核对两版数值、原文、比较身份、四项来源差异、失效回退和只读边界。

对主干的风险

最强反例是“表面中文、比较时又退回英文”,相同固定快照在不可变基线1440和390均实际失败,当前集成头通过。无译文的原始检索、版本、完整下载和错误恢复也走原后端验证,布局变化没有改变记录内容或执行路径。原记录被修改、来源不同、译文缺失及语言切换继续由现有资格检查与原文回退处理;没有引入新的模型调用或权限。

整合主干08e290fb后,当前4c09c207打包语言场景10.58s、原始档案4.84s、完整研究旅程181.86s通过,十项原owner测试及构建通过。中间一次旧判读行的键盘等待超时完整保留:触发时尚未进入本次比较器,相关判读实现未修改;后续未改断言的多轮和最终集成场景通过,不将其宣称为已修复的一般稳定性问题。CQR按固定已核验目标main提交重新通过;四项直接、十九项选中自动检查通过,八张PNG的人工留置仍保留。当前策略不读取或等待远端CI。

我的整体评价

这是 justified_increment:长程历史和来源含义保持,当前比较阅读体验在上述画面中改善。实际检查了整页首屏、桌面对照、390px 完整展开和部分译文:标题与观察可直接比较,决策列表恢复普通正文间距,来源与原文按需展开。公开画面是合成数据的打包浏览器;真实用户理解、全部存量译文语义及正式 App/WebView 采用仍未验证。本 PR 只修复研究记录比较的展示消费与相邻样式,保留生成质量和原生采用的后续验收。116行新增、20行删除的文本主要复用现有组件与扩展既有场景,无新增持久状态、协议词汇或迁移。代码结论 APPROVE;作者以 COMMENTED 发布,独立验收、受保护合并、安装和发布仍各自保留。

English verdict: APPROVE — exact head 4c09c207fbda7b08bf1f28ac7786b1eecb5bc8f4. The existing qualified display projection now reaches version comparison while canonical identity/differences and complete originals remain intact. Immutable-base counterexamples, integrated HTTP/SQLite positive/fallback journeys and owner tests support this bounded renderer change. Manual image holds, installed-App adoption and full translation meaning remain separate.

@mergify

mergify Bot commented Oct 26, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @loopx-agent.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Oct 26, 2026
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Oct 27, 2026
@huangruiteng
huangruiteng merged commit 736654e into main Oct 27, 2026
8 of 29 checks passed

@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.1-sol · OpenAI · runtime_reported · reasoning_effort=max

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

Reviewed exact head: f5b49c712a06d5329a5504c4e8fdc698579de2e3. 原 4c09c207 的评审属于旧提交,本轮整合主线并重新判断完整差异;没有继承旧批准。

动机 / Motivation

在中文研究页阅读已保存译文、需要比较同一发现前后版本的用户。

原先列表与阅读器已经显示中文,展开版本比较却退回英文序列化摘要;用户需要自行拆解观察与决策,窄屏正文还会继承元数据样式。现在同一对版本沿用现有译文与结构化正文,完整原文仍可原位展开。

打包前端连接实际隔离 SQLite/HTTP 后,桌面与 390px 均能读到两版观察和决策;原始版本身份、四个差异字段、负面数值、记录状态和原文 JSON 导出保留。

本次交付限定于已保存且来源合格的译文展示和版本比较,不增加模型调用、分析任务、翻译生成器、存储格式或权限。

任意真实分析译文的语义质量、已安装 App 的部署与用户采用不由此渲染切片认证。

改动思路 / Approach

复用当前来源资格投影、原始版本比较 owner 和正文 renderer,避免第二套翻译或差异计算;正文与测量展示拆开后也不会重复测量字段。

当前 PR 只贯通现有 Research 页的展开比较、原文回看及主线译文搜索,实际 SQLite/HTTP 的读取与失败恢复已覆盖,未扩展执行或状态所有权。

这里的译文投影是已经保存、并与当前原始快照和语言相符的展示文本。版本关系、选择与差异数继续由原始记录决定;新回调只呈现已有正文。再建一份翻译结果或在比较组件里重新解析判断会增加第二个 owner,未采用。直接复用完整 body 又会把测量重复到正文列,因此只抽出已有观察/决策部分。

Existing input Result at this head
合格保存译文,译文视图 两侧标题与正文使用同一投影,完整原文原位可读
原文视图、缺失/无效/来源或语言不匹配 保留原始文本,不启动模型
部分字段缺译文 仅覆盖已有字段,其余保持原文
中文查询包含旧记录 ID 原始记录及显式继承该 ID 的新版本均可匹配;JSON 仍是原文

上表解释经过检查的分支,本身不是执行凭证。使用现有语言开关、记录展开和比较入口即可完成阅读,无需新填参、重新生成分析或新增确认轮次。

具体改动 / Changes

按变更前接受的 docs/development/design.md,spec_revision bee2f29b34f8f53a4dcdd31e1e00a5e2bc10a43a 的 Research Workspace 条款检查,而非把本 PR 新增的比较段落当作独立 oracle。逐项映射:qualified-snapshot 已实现同快照字段投影及缺失/不匹配回退;original-evidence 已实现原始身份、差异、原文和只读切换;whole-page-reading 已检查有重复长内容与混合状态的首屏、展开和390px;translation-meaning 对实际展示的合成样本逐条对照原文及引文:第4次尝试有2项检查失败,不能误读为4次独立实验;负数、尚无因果收益、仅限本地的初步范围与不得宣称原生成功均保留。任意真实分析生成质量仍未认证,不能由字段覆盖、数字保留或截图推定通过。这些英文标签是本轮对已有正文条款的引用名,不伪称规范已有编号。

完整差异为 15 文件 +133/-29:4 个前端文件、现有设计说明、现有持久浏览器场景、说明与8张合成图。没有新模块、API、存储字段或依赖。与最新主线整合时保留了 displaySections 译文搜索,同时传递 renderSummary,没有用解决冲突抹掉主线行为。最后的测试与截图提交不再修改产品源码。

关键代码讲解

  1. findingNarrative 从原有 body 中抽出观察/决策,原 body 继续加测量与执行观察。列表、阅读器和比较共用已有结构化片段,未新增字符串分类或翻译 owner。
  2. ResearchRecordSearch 保留主线搜索用的 displaySections,并将已经合格的展示 map 与摘要 renderer 交给比较。匹配与下载继续用原始事件,搜索中文不会把译文写进原文 JSON。
  3. ResearchRecordComparison 先用原始事件得到版本对和差异,再单独展示译文;两侧正文完整原文均可展开。缺失字段仍标为未记录,状态与测量继续用原始 typed owner;标题写明记录比较,并不声称同条件评测或质量提升。

CSS 把记录项边框/间距限制到直接子项,元数据 dt/dd 样式限制到来源区,避免比较正文继承细小标签样式;390px 是单列16px正文。原始状态、负数、未知、停止和保留理由仍能在展开内容中找到。PR 描述直接放置当前首屏、完整比较和部分翻译图,标明合成数据与打包边界。

对主干的风险 / Risks

最强反例是标题看似中文,却把版本身份、差异数或导出内容也换成译文,或在来源不匹配时继续借用旧译文。因此最终 head 实跑打包 research-display-language(9.212秒)和 research-record-search(4.325秒),以及完整 research-history:真实隔离 SQLite/history/analysis HTTP 连接打包前端,验证两版原始 ID、4 个差异、-0.50/-0.25 观察、反驳/暂定状态、原文深比较导出、缺失/无效/来源/语言隔离、引用返回、键盘与读/下载失败恢复。原文视图回到 raw 分支;同一查询保留但不借用译文别名。普通读取不写,单独的显式执行拒绝案例有1次被拒 POST,不能混称零请求。

本轮整合还暴露了旧场景假设:新增后继记录后总数已从30到31;旧 ID 会合法出现在后继的 supersedes。已从输入事件数量导出总数,并先证明两条匹配的完整原文导出,再用原始 fixed-v1 精确选旧版。新增导出断言最初拿原始存储 fixture 与既有公开投影比较,因 metadata/default 字段不同失败,已改为与完整原文导出的同契约记录逐项比较;身份、正文和后继断言均保留。最初仅 Vite 构建缺打包 manifest,后用完整 build:chat 构建并验证。上述失败保留为历史,最终三个完整场景通过,不将失败重标绿色,也未改产品来迁就测试。

原作者旧运行曾有中间键盘展开等待超时;本轮最终完整语言场景包含相同展开与焦点返回并通过,额外的搜索与整页历史恢复也通过。没有据此宣布通用浏览器时序问题已根治,仍保留历史边界。

相关源码 owner 12项通过,实际后端 32项通过;完整前端打包/类型、控制面 TypeScript 与 CSS 自定义属性检查通过。前两组在整合源码 4a49f62f 执行,已核对其后4个产品文件及依赖未改变;最终 head 重新打包和执行三条完整浏览器旅程。标准 premerge 4个直接检查与19个选择检查通过,零自动检查失败/警告,最终严格 CQR 有效;RFC双语和公开文本边界通过。PNG的8项 visual_evidence 人工分类保留,已实际检查像素、尺寸/元数据与公开安全范围,并更新描述中的当前首屏,未伪称机器自动放行。没有查询、轮询或等待 GitHub CI。

语义与 CI 对齐

本次复用现有事件、显示与版本词汇,没有新的枚举、协议或权限状态;diff advisory 与完整语义检查提供辅助审查,不能证明语义穷尽。原始记录始终决定状态和差异,缺译文不等于无证据,语言可用性也不等于执行授权。设计文档增加比较说明,保留主线关于计数指代、否定、上下文与翻译含义的要求。回滚仅撤回前端呈现改动,原数据和已保存分析无需迁移。

我的整体评价 / Verdict

APPROVE,justified_increment。 复用当前来源资格投影、原始版本比较 owner 和正文 renderer,避免第二套翻译或差异计算;正文与测量展示拆开后也不会重复测量字段。 当前 PR 只贯通现有 Research 页的展开比较、原文回看及主线译文搜索,实际 SQLite/HTTP 的读取与失败恢复已覆盖,未扩展执行或状态所有权。

长程维度 preserved:后续回看保留原始负面结果、版本关系、未知与停止条件,没有新调度/准入/执行义务;不宣称长程效果已提升。用户体验 improved:已有阅读任务从列表到对比保持同一语言与正文层级,原文及错误恢复仍可达,没有新增交互轮次。局部抽出正文避免重复,继续抽框架或新增翻译状态没有必要;内部回调共部署,不引入兼容分支或持久迁移。

视觉评审:实看了 31 条跨 20 小时、含两个发现版本和反驳/暂定/未知状态的整页首屏,以及完整和缺译文比较:桌面两列、390px 单列的观察与决策以正文呈现,原文、来源和不确定状态仍可查;没有用字段存在或不溢出替代视觉判断。

截图是合成固定数据与实际隔离后端上的打包 Chat 前端;不能证明原生已安装 App、任意真实数据翻译质量或长期用户理解。

当前没有阻塞 finding。原始人工分类、公开精确 head 评审、维护者自合并授权与即时 readiness 分别核对;只有未变化 head 的 readiness 为 true 才执行 admin 合并。

English verdict: APPROVE — f5b49c712a06d5329a5504c4e8fdc698579de2e3. The existing source-qualified translation and narrative renderer now reach both sides of recorded-version comparison while canonical identities, differences, originals and exports remain intact. Three packaged journeys pass against real disposable SQLite/HTTP, alongside12 owner and32 backend tests, source build/types and required local checks. Main translated-search behavior is preserved. Synthetic visual evidence is refreshed and manually inspected; no CI was consulted. Arbitrary translation meaning, installed-App deployment and sustained outcome benefit remain unqualified.

@loopx-agent

loopx-agent commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator Author

Post-merge qualification for f5b49c712a06d5329a5504c4e8fdc698579de2e3: GitHub readback reports maintainer merge 736654e844e720f609696becf87b844ede77a010 at 2026-10-27 04:27:05 UTC, while validation/review preparation was in progress. The full exact-head review was published afterward; it is post-merge qualification, not a pre-merge approval receipt. No agent admin-bypass merge was attempted.

GitHub records the reviewed PR head as the source of this squash merge; all15 changed paths match the squash commit byte for byte. The final packaged language/comparison, search/export and whole-history journeys pass against real disposable SQLite/HTTP;12 source-owner and32 backend tests pass, and local required checks plus strict CQR are valid. Eight visual-evidence classifications remain manual and were inspected; no GitHub CI was consulted. Arbitrary translation meaning and installed-native-App deployment remain outside this renderer qualification.

已核对同一提交由维护者合并;本轮补齐的是合并后精确提交评审和验证,不冒充合并前就绪回执,也不重复执行合并。

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.

2 participants