Repository navigation
feat(site): read native Explore logs in Time Machine - #6742
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Reviewer: actor_kind=model_agent; model=gpt-6.1-sol; provider=OpenAI; reasoning_effort=max; declaration_source=runtime_reported.
精确审查:6742@b9000b2880c0a898a06424e208c9e0d8f9becba1;实际合并基点 c8a01299f2933801b579f58327956dd532f6674b。这是独立代码/本地验证结论;合并权限与 merge readiness 分开。
动机
已有原生 Explore JSONL 文件的访客,需要找到研究为什么改变方向,并回到那条记录的完整原文。 原页面只展示三个策展案例,自己的日志需要手工加工或逐行找决策;候选让访客选择原文件后直接阅读明确记载的决策,再按结果筛选或查看所有来源行。 实际静态构建中,键盘选文件后直接出现决策;五条真实原生构造器记录保留18小时跨度、负面结果、回填和未知关联。公开捕获的37条决策逐条对应原始来源行,29条调整方向与8条继续可筛选;错误文件整份拒绝,换文件和返回案例均恢复到正确上下文。 这是网站本地阅读交付;不上传或持久保存文件,不恢复历史状态、不执行 Agent,不证明研究收益、完整站点资格或已经部署上线。
改动思路
现有 TypeScript Explore 编解码与时间投影继续负责记录语义,新增代码只承担浏览器文件读取、局部阅读筛选和展示,不创建第二套研究状态或评判规则。 当前 PR 交付原生文件到明确决策及完整原文的实际网站旅程,保留原有三个案例;没有新 CLI、Lark、模型或执行配置。 维持现状要求访客自行加工文件;只给命令或下载链接仍不能完成阅读。复用现有 Explore owner 加一个本地文件适配器,比新增上传服务、转换格式或独立状态机更小。
| 路径 | 本头可观察结果 |
|---|---|
| 选择原生文件 | 直接读来源明确记载的决策;原文和全部记录仍可达 |
| 无效或切换文件 | 错误整份拒绝;新文件保留,旧读取不能覆盖 |
此表来自已检查的源码和下述执行边界;不表示安装、模型理解或部署证据。
具体改动
独立依据是 docs/development/design.md,不可变版本 8795fc042550c875d78b8bfc1a4874523fbb6693。Earn The User's Attention:决策先读、搜索选项折叠、原文可达;Accessibility:键盘选文件、恢复焦点和44px控制;Responsive Behavior:390px阅读先于索引且无横向溢出。三项在本轮构建与实际浏览器旅程均已实现。
新增适配器保留全部来源行,单独复用 Explore 的去重投影;时间条表示 recorded_at,不推断执行耗时或因果。只识别既有解码器给出的明确 Outcome,未知值保持原文,不用关键词猜测决策。默认有决策就直接读决策,无决策时读全部记录;两个视图、来源标记、时间和文本筛选都不改源顺序。
文件版本键与读取清理防止旧异步结果覆盖新文件。同一文件可重试,取消不清掉已有阅读,退出恢复策展上下文。原文用字面文本渲染,证据引用不变成自动打开的链接。20MiB/20,000条为明确整份拒绝边界;50条分页不截断数据。旧3513平铺阅读图片是历史,不能代替本次f08决策旅程验证。
关键代码讲解
- readLocalExploreLog:Strict whole-file intake reuses Explore validation/projection and preserves source lines.
- selectLocalLogEntries:Local exact outcome/status/time/search filters preserve append order and unknown values.
- LocalLogReader:Async file state and unmount guard prevent a stale previous read from winning.
- LoadedLog:Explicit decisions, original text, pagination and recovery use the same source entry.
- TimeMachine file input:One file choice starts local reading; cancel preserves and exit restores the existing case context.
对主干的风险
未发现阻塞问题。真实浏览器确认坏JSON第2行、无效UTF-8、混合Goal和冲突事件整份拒绝,重复行仍独立可读;来源HTML保持字面文本,未知决策标签不被重解释。受控延迟旧 File.arrayBuffer 后,后选文件仍保持37/76;这里的延迟是浏览器边界故障注入,不是伪造后端执行。文件操作期间fetch/XHR/beacon、存储和新资源请求均为空。
同一不可变基线和候选构建的三个策展案例,问题、结果、原文及来源完全一致;网站静态包实际运行,native构造器和append owner实际产出测试日志,没有用手填UI响应代替真实读路径。
本轮验证:当前 head b9000b2880c0a898a06424e208c9e0d8f9becba1 是合并 main 的提交。实际浏览器执行绑定 f08dfcccfff1b4c7460e45359d2a85d6b6b8bda1,这段源代码、共享解码器、原生生成器和设计依据均未改变;新头重新构建的119个静态文件逐字节相同,故复用该实际浏览器证据,不把旧执行重命名为新头。当前头11项测试、构建、前缀包、语义advisory及标准premerge已另行通过。第一次误用不存在的npm测试别名未运行测试,改用仓库实际node测试命令后通过,失败诊断保留。11项Node测试全过,TypeScript/Vite/SSR及前缀静态构建通过;标准premerge的4项直接检查、4项目录检查和1项边界检查全过。实际Ego桌面1440与手机390布局、中英文、减少动态效果、无横向溢出和至少44px新控制均通过。初始评审fixture少传expected_goal_id已在生成前修正;浏览器文本选择器错误、长requestAnimationFrame循环超时及远处分页指针可见性失败均保留,随后在同一Page清理待执行脚本并用正确DOM等待和真实键盘操作读回,未弱化断言。完整Playwright站点目录未独立重跑;作者早期home #learn超时仍是历史全站资格未知,不声称已修复。没有部署、已安装App、付费模型或研究收益证据。
我的整体评价
APPROVE:本次有界原生文件阅读目标达到,long_horizon 与 user_experience 均 improved;旧来源、负面结果与决策理由可以带入后续阅读,所需额外输入只有本人选文件这一项缺失本地事实,没有转换、配置或重复确认轮次。隐私取舍是刷新后需重新选择文件,界面如实说明。局部UI词汇复用现有类型化 owner,已做的Map/解码器复用就是本次合适的前瞻收敛,不需再造通用框架。 现有 TypeScript Explore 编解码与时间投影继续负责记录语义,新增代码只承担浏览器文件读取、局部阅读筛选和展示,不创建第二套研究状态或评判规则。 当前 PR 交付原生文件到明确决策及完整原文的实际网站旅程,保留原有三个案例;没有新 CLI、Lark、模型或执行配置。 本次没有执行合并、升级浏览器或更改已安装产品;没有查询、轮询或等待远端CI。
English verdict: APPROVE. The built native-log journey preserves source lines and explicit decisions, rejects invalid files as a whole, handles replacement/recovery, and retains the three curated cases. Local checks and the affected real browser paths passed; full-site, deployment and research-utility qualifications remain separate.
Goal And Delivered Outcome
A visitor can open an existing native Explore JSONL in Time Machine and read the recorded decisions that changed its direction. The file stays in browser memory: no upload, storage, model call or Agent execution.
Before: prepare a custom capture or search raw records for a decision buried in a summary. After: choose the existing log → read its explicit decisions → filter by recorded outcome → see what changed, stopped and remained → open the exact original. All source records remain one click away. A file without explicit decisions keeps its ordinary reader and an honest empty decision view.
Author Declaration
docs/development/design.md/docs/development/frontend-delivery.md.explore_history.tsparser/projection andexplore_timeline.ts; shared owners are unchanged.Scope And Continuation
The public-site entry gains one complete local reading journey. CLI and Lark keep their existing log format and behavior; no companion provider, persistent configuration, new shared vocabulary, inference, score or causal graph is introduced. Source labels/outcomes remain claims, and recorded time is not execution duration. Reading neither restores a past state nor verifies a source.
UTF-8, one Goal per file, up to 20 MiB / 20,000 records. Exceeding either limit rejects the entire file. Identical repeated rows remain readable; the existing unique-event projection owns the time strip. Evidence references remain text and are never fetched automatically. The three curated episodes retain their own pinned-capture authority, which local files do not inherit.
Future-facing pass: the local adapter now indexes the existing typed findings once for both selection and rendering, replacing repeated linear lookups. This is a bounded presentation seam, without a second parser or authority owner.
Validation
Tested head:
f08dfcccfff1b4c7460e45359d2a85d6b6b8bda1; PR basemain. The new decision UI supersedes the earlier flat-reader stage at35131420bf6c254ed97d10d3d2aafbfde95a4f83; it is not claimed byte-identical to that earlier screenshot approval.The full packaged public-site rerun at the tested head passed: four fragment/history matrices (1440/390 × normal/reduced motion), EN/ZH × desktop/narrow Time Machine discovery and complete local-reader journeys, and 190 published entry links. The earlier flat-reader run's unchanged-homepage
#learnreload timeout remains a historical failure; this new run used the original assertions and timeouts. Required hosted CI, independent visitor utility, live-Goal and installed-App adoption are not certified. No paid probe, new benchmark job, hosted dispatch, merge, install or release action ran.Frontend / Visual Evidence
UI impact: changed. The reader screenshots below use the already-public native portfolio records in the packaged static candidate. Before is the flat reader at
35131420bf6c254ed97d10d3d2aafbfde95a4f83; after is the decision reader at the tested head above, with the sourcereplanfilter selected. This is proposed source/static delivery, not an installed or deployed App.English desktop and phone
Entry viewport and malformed-file recovery
The public entry and error treatment are unchanged from the earlier reader stage at
35131420bf6c254ed97d10d3d2aafbfde95a4f83; these historical screenshots retain that boundary. The new packaged journey rechecks chooser, error and retry behavior.Preview: no branch deployment. Build the public site at
/loopx/and open/loopx/lab/time-machine/?lang=zh, then choose an existing native Explore JSONL.Attention review: one selected decision and its concrete source changes lead the reading column. The source-derived view/outcome choices support that task; optional search and source/time filters are folded. No graph is invented for a source with zero explicit links. Desktop keeps a quiet source index beside the article; narrow screens put the article first. Raw IDs, JSON and format limits stay behind disclosures. Keyboard focus, unknown/empty/error states, monochrome tokens and reduced motion remain usable.
Type / Area / Direction
Boundary Checklist