Repository navigation
Keep Research open when comparing Goals - #7058
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6-astra · OpenAI · runtime_reported · xhigh
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
评审 37b8293620a2813af50aa17bec24eec7787332c4,未发现阻塞缺陷。
动机
需要在多个 Goal 之间比较研究记录的用户。 在研究页选择另一个 Goal,原来会回到概览,需要再点研究;现在直接看到新 Goal 的研究记录。 侧栏切换保留研究页,返回恢复原选择,新 Goal 不继承旧证据焦点。 本次不改变研究结果、模型调用、任务执行或来源权限。 这是整体工作台优化的一步;更广的页面验收仍由现有产品任务推进,安装后的实际 App 回读将在合并后进行。
改动思路
在侧栏调用既有选择函数时传入当前研究视图即可解决问题,无需新状态或新的导航抽象。 本 PR 完整交付研究中的跨 Goal 侧栏导航,其余入口维持现有目的地。 新增的是调用处的目的地选择,后面的来源读取、分页和浏览器历史都沿用现有实现。全局修改默认值会影响明确的任务或会话入口;额外保存“上次标签”则增加同步状态,均无必要。
| 起点与操作 | 原行为 | 当前行为 |
|---|---|---|
| 研究中从侧栏选另一个 Goal | 概览 | 新 Goal 的研究 |
| 概览或任务中从侧栏选 Goal | 概览 | 概览 |
| 返回 | 原 URL 和原选择 | 保留 |
表格对应这个版本的实际浏览器验证;不表示研究内容或模型结论发生变化。
具体改动
依据 docs/development/design.md,规范版本 9ea541b0f60ac2647ee5fbf957276567274e1fe5:Research Workspace 的视图恢复与 Goal/来源隔离由现有控制器和本次导航验证落实;Populated Page Review 通过桌面与窄屏的完整研究时间线检查。新加的双语句子把已授权比较任务明确为侧栏行为,未删掉原来的来源、返回及证据要求。
关键代码讲解
PersonalWorkspacePage的GoalSidebar.onSelectGoal只有在原 Goal、目的 Goal 都存在且当前标签为 research 时才传入 research。空选择和其他标签继续传入 overview,因此管家首页不会被当作研究上下文。PersonalWorkspacePage.selectGoal保留既有默认值,继续清除临时详情和会话回执、关闭手机侧栏,并把参数交给上层。其他调用者无需新增条件或重复逻辑。dashboard-page.selectGoal保持原来的 URL 更新与历史处理,清除会话、负责人和任务导航参数;研究证据的归属仍由已有 Goal/来源作用域校验。researchHistoryScenario不再在切换后主动点击研究来掩盖旧问题,直接断言目的页;完整分页、无跨 Goal 详情、Back 的原 URL/选择、Forward 的目标数据均一起检查。没有另建镜像测试框架。
对主干的风险
主要风险是把所有入口都改为研究,或在新 Goal 里显示旧证据。本次将改动限制在侧栏调用点,并在相同合成输入上运行不可变 base/head 的真实打包前端和原生 HTTP:原版研究切换得到 overview,独立断言失败;新版得到 research。两版从概览和任务切换均为 overview。完整研究场景同时验证原事件分页、负结果、读取失败恢复和无执行副作用,普通导航排序场景通过。
生产构建与类型检查、四项直接检查、四项 catalog、八项风险检查和公开文本扫描通过。canary 原始结论为 manual_review_required,因为三张 PNG 无法文本扫描;三张图片逐一检查像素和 PNG 元数据,均为合成研究数据,无私有路径/消息/轨迹。桌面1440×1000、窄屏390×844均检查,窄屏分段横向浏览,说明按需展开。手动验收中一次等待用了不存在的选择器,超时后检查真实 DOM 并采用已存在目标;这不是产品状态失败,未修改测试来规避问题。按当前策略未查询远端 CI。
语义与 CI 对齐
使用现有 WorkspaceGoalTab 精确值,无文本猜测、状态迁移或新的权限。设计说明新增的导航义务以同一前端对照验证,原有证据作用域与返回义务保留。阅读不启用研究模式,也不派发模型;“研究页可见”不等于分析已运行。三个截图直接放入 PR description,并标注打包/合成边界。
我的整体评价
这是已验证的 justified_increment,减少比较过程中的反复开页。长程执行行为保留,用户阅读路径改善,零新增确认轮次;可选阅读操作不影响权限和执行。在侧栏调用既有选择函数时传入当前研究视图即可解决问题,无需新状态或新的导航抽象。 本 PR 完整交付研究中的跨 Goal 侧栏导航,其余入口维持现有目的地。 更广的工作台改进继续沿原任务推进;本 PR 的安装回读与合并资格需分别核验。没有为两行逻辑抽出无独立语义的 helper,现有导航函数就是复用边界。
English verdict: APPROVE — 37b8293620a2813af50aa17bec24eec7787332c4. Research sidebar comparison now preserves the reading tab; ordinary destinations and scoped evidence remain intact. Production build, native packaged scenarios and immutable base/head comparison passed. Canary automated checks passed; its three image holds were manually reviewed. Installed readback follows merge; this is not a claim that the wider frontend program is complete.
Reading one Goal's research and selecting another Goal in the sidebar previously returned to Overview, interrupting case comparison. Keep Research selected for that transition, using the destination Goal's own records; Back restores the prior evidence selection.
研究中切换侧栏 Goal 会继续打开研究页。原 Goal 的证据焦点由返回恢复;首页与任务、会话、成果的明确入口维持原目的地。
The existing workspace selection callback owns the navigation. No new persisted state, provider, analysis invocation or permission is introduced. The design contract now records this comparison behavior, and the existing packaged history scenario checks cross-Goal isolation and Back/Forward.
Validation at
37b8293620a2813af50aa17bec24eec7787332c4:research-historypassed with production history HTTP paging, complete source identities, selection isolation and Back/Forward.navigation-sortingpassed for ordinary workspace destinations.Visual evidence
Packaged frontend with disposable native read-only backend and synthetic data. Before uses immutable base
9ea541b0f60ac2647ee5fbf957276567274e1fe5assets; after uses37b8293620a2813af50aa17bec24eec7787332c4. These captures qualify navigation/presentation, not experiment results or installed delivery. The local preview is ephemeral; captures are committed for review.Before: choosing the second Goal leaves Research and opens Overview.
After: the second Goal opens its own Research history immediately.
Narrow viewport:
Installed readback
After merge, the official upgrade adopted
8696bd6c3ba0f5169b92f83a6aa770c651065d45. The native desktop App kept Research selected when switching between two original child Goals and showed each destination's own history and analysis state. Existing Chinese analysis remained readable without a new model invocation. Real operating screenshots remain private; the public visual evidence above uses synthetic records.合并后已通过官方升级进入正式 App,实测真实子 Goal 双向切换仍留在研究页,数据与已有中文分析各自隔离。此验收覆盖本次导航修复,不代表整体前端优化或所有分析范围已完成。