Skip to content

feat(research): compare original evidence revisions in history - #7370

Merged
huangruiteng merged 1 commit into
loopx-project:mainfrom
steven-kid:roadmap-auto/20261026-research-revision-comparison
Oct 26, 2026
Merged

huangruiteng merged 1 commit into
loopx-project:mainfrom
steven-kid:roadmap-auto/20261026-research-revision-comparison

Conversation

@steven-kid

@steven-kid steven-kid commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

Researchers can now compare original versions of a finding or research item without clearing their search and manually opening each record. In Research → Search research records, expand a result and choose Compare recorded versions. Changed text, status, evidence references and measurements appear together; another version can be selected and unchanged fields revealed.

Alternatives come from the full loaded snapshot, including revisions excluded by the current filters. Original IDs, source order, missing measurements and zero remain distinct. Partial/stale history keeps its coverage warning. Comparing performs no request, analysis, acceptance or source mutation.

Related to #4574, S5 readable/recoverable workspace and S6 evidence provenance. Intended base: main; implementation baseline 0e47330fe57ce5ea1101dae67ee19b836869ef4e.

Author Declaration

  • Written by: model_agent — OpenAI Codex, GPT-6 family.
  • Implemented against: docs/architecture/rfcs/loopx-overall-roadmap-v0.md §2 S5/S6 and docs/development/frontend-delivery.md task-first delivery at the baseline above.
Criterion Disposition Owner / evidence
S5 readable evidence and recovery implemented for this comparison Existing Research reader; packaged keyboard, three-version selection, reopening, interrupted refresh and narrow-layout checks
S6 preserve provenance and uncertainty implemented for this comparison Original Explore snapshot; kind/Goal isolation, original negative evidence, source references, unmeasured versus zero

Self-check: reviewed the complete diff, scope boundaries, React state/conditional rendering and all six synthetic images. The comparison helper is local presentation code under the existing built-in Explore owner; no provider, capability, protocol or decision vocabulary is introduced. The semantic advisory supports only loopx/ carriers and does not analyze these UI fields.

Scope And Continuation

Complete within this scope. The UI reuses the existing measurement renderer; no backend, CLI or Lark behavior changes. This does not qualify research benefit, causal utility, matched evaluations or the overall S5/S6 milestones. No successor is required for this bounded reader feature. Broader refactoring is unnecessary; the focused helper keeps comparison rules testable without growing the history component.

All-author open PRs and relevant issues were checked before implementation, including research-continuity and active research-reading work. No overlapping revision-comparison slice was found. Upstream advanced to 5cff2b9fa57bd846f0005dfe9dbaf47340d49917 during validation through unrelated blog changes; none of the touched implementation paths changed.

Validation

Tested source: 2353ec9a77be42eb8a242218840203fe9f15e0f9 (build/browser/unit checks used identical sources before commit). Run state: finished. Input classes: synthetic, public_fixture. Node 24.19.0; source-checkout Python 3.12.

Check Result and limitation
Focused unit Passed 12 tests: node --experimental-strip-types --test apps/presentation/dashboard/src/features/personal-workspace/research-record-{versions,search,export}.test.mjs apps/presentation/dashboard/src/features/personal-workspace/report-download.test.mjs
History contract Passed 9 tests: node --no-warnings --experimental-sqlite --experimental-strip-types --test tests/control_plane_ts/explore_history.test.ts
Real history backend Passed 8 tests: python -m pytest -q tests/test_chat_explore_results.py tests/presentation/test_explore_history.py in the checkout's test environment
Static / build Passed dashboard npm run build, npm run check:css-custom-properties, root npm run -s typecheck:control-plane, diff hygiene and staged bilingual RFC check
Packaged real entrypoint Passed LOOPX_USAGE_PING=0 LOOPX_PERSONAL_WORKSPACE_PACKAGED=1 LOOPX_PERSONAL_WORKSPACE_SCENARIO=research-record-search node examples/personal-workspace-browser-smoke.mjs: 79 native events, three versions, filtered-out alternatives, unknown/zero, switching/reopening, stale/partial read retry, download recovery, Goal isolation, Chinese keyboard use and unchanged source bytes with zero mutation attempts
Translation regression Passed the same packaged command with LOOPX_PERSONAL_WORKSPACE_SCENARIO=research-display-language
Public boundary Text scan passed with zero errors; standalone scan reports two expected unconfigured-registry warnings. Synthetic PNG metadata is empty.
Premerge canary Automated checks passed: 4 direct, 4 catalog, 8 risk-profile and 1 public-boundary check, zero failures. loopx canary premerge --from-git-diff --git-diff-base 0e47330fe57ce5ea1101dae67ee19b836869ef4e returns manual_review_required for six binary visual-evidence holds. Pixels/metadata inspected; independent review remains required.

The unchanged exact-base research-record-search scenario failed at its immediate pending-refresh button assertion (false !== true, line 170): observing the request did not wait for React's visible disabled state. The extended scenario now waits for that state while keeping the original assertion. This is a test synchronization repair, not an attributed hosted-CI failure or a claim that the entire baseline suite passed. Before images were captured earlier in that exact-base run.

Hosted CI failure diagnosis: The release browser job fails in conversation-activity.mjs:55, waiting 30 seconds for .personal-manager-conversation-tray .personal-message-elapsed. Its checkout log confirms synthetic merge 90d8d312f82fce13d4699178aa13d69c7aed4f8e, whose first parent is 5cff2b9fa57bd846f0005dfe9dbaf47340d49917. Independently building and running the packaged conversation-activity scenario reproduces the identical timeout on both this PR head and that exact CI base. The scenario, personal-workspace-page.tsx and message-activity.tsx are byte-identical across those revisions; the merge's frontend/scenario sources also match this head. This establishes a failure without this contribution, not a passing release gate. No unrelated conversation repair is included. Local reproduction used Node 24.19.0 versus CI 24.21.0; it is source-packaged browser evidence, not native Desktop qualification. Other hosted checks are still pending at this checkpoint.

Additional CI limitation: Chat browser shard 3 failed in “Qualify the actual compiled UI.” Its job-log download returned HTTP 403; the accessible annotation contains only “exit code 1,” so the hosted scenario and cause remain unverified. No access restriction was bypassed. Independently running packaged shard 3/3 locally stopped at managed-goal-results.mjs:40, waiting for goal-declared-objective; the same scenario reproduces on exact CI base 5cff2b9fa57bd846f0005dfe9dbaf47340d49917. That unchanged scenario has a separately merged navigation-test repair in #7350. This local/base finding is not proof of the hosted failure's cause; no duplicate repair is included. The local shard stopped there, so later scenarios were unexecuted.

Hosted CI monitoring checkpoint (2026-10-26, 08:29 UTC): Current head has 21 successful, 8 failed, 7 skipped and 6 pending checks. Failures are the release build described above, all three Chat browser shards, all three Dashboard browser shards, and the aggregate checks gate (failed at “Require the planned backend and Dashboard qualification”). The six Python test shards remain pending without an assigned runner or executed steps. Browser-job log downloads returned HTTP 403, so their exact hosted causes remain unverified; the local/base shard-3 reproduction above must not be generalized to them. All three TypeScript core shards and TypeScript coverage passed. This is an incomplete CI checkpoint, not an all-green result.

Full Python/TypeScript suites, installed Desktop/WebView, Windows/macOS and live research providers were not run locally. These source-packaged HTTP/SQLite reader checks do not certify installed App behavior or scientific benefit. Hosted CI and independent exact-head review remain separate gates; no merge readiness is claimed.

Frontend / Visual Evidence

UI impact: changed. All captures are synthetic, source-packaged Chromium at 1440×900 and 390×900. Before uses the exact baseline; after uses the tested source above. No hosted or installed-App claim.

Attention review: one collapsed disclosure inside an already-expanded source record. Original evidence remains the default; comparison shows only differing fields. Desktop uses aligned columns; narrow layout repeats side labels and stacks values without horizontal overflow. The populated fixture has 75 unrelated findings plus retained revisions, not merely an isolated component. All six images were inspected.

Before After
Before desktop After desktop
Before narrow After narrow
Expanded desktop comparison Expanded narrow comparison
Desktop comparison Narrow comparison

Type / Area / Boundaries

  • New feature, documentation and focused validation; public presentation surface.
  • Shared-authority fixture impact: N/A; no authority/provider/persistence changes.
  • Public-safe code, fixtures and screenshots; no private state, credentials or raw sessions.
  • One signed commit; no paired RFC modified; no maintainer-owned benchmark work duplicated.

Signed-off-by: Yuchao Wang <stevenkid404@gmail.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

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

动机

在研究页检索同一结论的多个原始版本的读者。此前需清除筛选并逐个打开旧记录才能比较;现在可在选中记录内选择其他版本,直接并排查看差异。独立打包浏览器场景通过,原始负面证据、未测量与零值、来源和历史不完整提示均保留。只比较记录,不执行分析、修改来源或证明研究质量改善。

改动思路

比较逻辑属于现有阅读器的本地投影;复用原始事件和测量渲染,不新增证据判断、后端状态或执行规则。本 PR 交付可用的原始版本比较入口;未新增分析、评分或写入。入口沿现有研究页、原始历史查询和单条记录展开;比较从完整已读快照寻找同 Goal、同记录类型、同结果 ID 的版本,所以筛选掉的版本仍可作为对照。默认只展开差异字段,用户可选择其他版本或显示相同字段。无改动时仍需退出筛选、逐条记住内容再比较;复用现有记录与测量组件比另加分析接口或配置页更合适。读取失败继续由原历史读取器保留旧快照和部分范围提示,组件自身不做后台重试或评分。

具体改动

规范:整体路线图,固定修订 0e47330fe57ce5ea1101dae67ee19b836869ef4e。其中 S5 的可读结果入口、S6 的原始版本及不确定性保留,在本次比较范围内均已实现;不等于两个完整里程碑完成。另按现有 task-first/design 阅读路径核验默认、展开和恢复。

关键代码讲解

  • researchRecordVersions 用原始身份筛选,保留来源顺序,不从标题、时间或 supersedes 文本推断血缘。
  • changedResearchFields(同文件22行)只规范对象键顺序;数组顺序、原文换行、空缺与零仍能区分。新增字段集合是本地展示类型,不是共享证据词汇。
  • ResearchRecordComparison 没有替代版本即不渲染;对照选择只存实际事件 ID,测量复用 ExploreMeasurements,不会生成收益差值或接受结论。
  • ResearchRecordSearch 把完整原始 events 传入,比较位于既有单条记录内。14行响应式 CSS、既有场景扩展和六张合成图片服务同一路径;没有后端、CLI、Lark、Provider 或持久化修改。

对主干的风险

最强反例是把筛选结果误作完整历史、把同名异 Goal/类型混成一组,或把未测量显示为零。独立完整打包 research-record-search 已跑通:75条无关结论后的负面旧记录、三版本切换、被筛掉的替代版本、缺测/零、关闭再打开、部分/陈旧读取、下载失败重试、Goal 切换、中英文及窄屏,实际源字节不变、写入尝试为零。基线同一合成原始快照没有比较入口;当前构建有,额外8组无替代/空/普通/陈旧输入的完整 SSR HTML 与基线一致。另有两种语言的原始三版本渲染反向对照。

本轮独立12项相关测试、9项历史测试、8项真实 HTTP 测试、Chat 构建、CSS 属性检查和控制面 typecheck 通过。标准 premerge 的4项直接检查、4项 catalog、8项风险检查及1项公共边界检查均过,整体仍是 manual_review_required,退出码1,六个图片人工待办未被改写成绿色。我已查看全部六图及元数据,并以 Ego 重建相关页面。未查询或等待 CI;作者列出的远端故障归因属于作者证据,未冒充本轮独立复现。

我的整体评价

对精确 head 2353ec9a77be42eb8a242218840203fe9f15e0f9 给出 APPROVE,本次有界比较阅读任务达到 goal_achieved;长程维度为 preserved,用户体验为 improved。桌面保留选定原文并对齐左右字段,窄屏把两侧堆叠并重复侧名;默认不展开全部版本,来源与缺测仍可辨。安装态 App/WebView、真实研究者理解效果、长程净收益和完整成本未验证。比较逻辑属于现有阅读器的本地投影;复用原始事件和测量渲染,不新增证据判断、后端状态或执行规则。本 PR 交付可用的原始版本比较入口;未新增分析、评分或写入。默认图和负面原文仍可读,展开内容在桌面左右对齐、390px逐侧堆叠,完整正文与来源未以小字压缩。已单独观察下方测量及来源层,不从“无溢出”断言推导整页可读性。长期科学收益、完整成本、安装采用及全站设计最优均不由本次比较证明。局部 helper 已是合理的同域拆分,无需增加通用 diff 框架;无需为完成的阅读请求另建跟进任务。评审结论不授予合并或安装权限。

English verdict: APPROVE at 2353ec9. The full loaded, scoped original history drives an optional version comparison; negative evidence, null/zero, source order and failure coverage remain intact. Independent packaged HTTP/SQLite reading, immutable-base UI/SSR comparisons and focused checks pass. Premerge retains six manual image holds; installed adoption and scientific benefit are unverified.

@huangruiteng
huangruiteng merged commit e1c42d1 into loopx-project:main Oct 26, 2026
28 of 42 checks passed
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.

3 participants