Repository navigation
fix(workspace): keep unavailable Goal scopes out of steward navigation - #6818
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.1-sol · OpenAI · runtime_reported · reasoning_effort=max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
打开受限 Goal 链接的用户,需要在范围不可用时看清当前上下文,并能回到原来的合法阅读范围。
原页面虽已隐藏无关内容和输入框,页头仍显示“LoopX 管家”和管家导航;现在失败范围显示中立 Goal 视图,只保留导航与刷新,避免让人误以为已经切到另一段会话。
新旧构建在同一真实只读数据上复现了这个差异;当前手机导航、主动全部 Goals、Back 和刷新恢复原范围,390px 无横溢,未请求 Turn 或操作源状态。
只修现有范围失败的展示收尾,不改 Goal、来源授权、原范围解析、执行器或调度;不重新批准已合入的旧 PR。
改动思路
把已存在的范围不可用判断传给共用页头,派生展示即可;保持原数据和导航归属,比另建失败页或再存一份上下文状态更简单。
当前切片是失败页头与恢复路径的一致性,普通 Goal 和管家页头仍由原分支呈现,不扩展研究运行或来源权限。
既有 rootUnavailable 是原来源/选择的派生结果,新 prop 默认 false;没有另设需要同步的状态。不可用时隐藏管家绑定、运行时和会话范围选择,用已有“Goal 视图”翻译,同时保留刷新和手机菜单。主动“全部 Goals”仍是原来的自主导航,Back 回到原无效范围,不需要重输标识或多一次确认。
具体改动
完整五路径 +15/-6:两个 TSX 路径、既有 hierarchy 场景的五条断言、两张替换的合成实测 PNG。依据不可变基线的Goal workspace RFC:2-invariants 的真实来源和无执行副作用、7-failure 的明确失败及恢复、9-V6 的手机/键盘返回均已核验;旧 #6811 的批准没有代替本次判断。PR 描述的 before/after 桌面与 390px 图已逐张查看,与本次构建的中立错误页一致,未包含私有信息。
关键代码讲解
rootUnavailable保持原派生定义,唯一调用点把同一个失败事实交给页头,不修改 root 解析、数据过滤或当前 Goal 的身份。runtimeControl和绑定显示 在失败范围隐藏无关运行时/管家内容;默认 false 时是原有分支,没有新执行权限或配置操作。- 标题与导航 让不可用范围显示 Goal 视图,并禁止 null Goal 误走管家导航;正常 Goal 的 masthead/tabs 和普通管家仍由原代码呈现。
对主干的风险
独立当前构建、root 类型检查及三个 packaged 场景(hierarchy、navigation-sorting、research-history)通过。自己的 Ego 对照使用同一真实只读 directory/history:基线仍显示管家标题/nav,head 不再显示;手机菜单→全部 Goals→Back→Escape→刷新保留原范围,宽度 390/scrollWidth 390。冷读两个来源的 fixture 字节未变,mutation attempts 为零;桌面和手机全视口已目检。原生场景保留 malformed/missing/empty roots、普通阅读、排序与恢复,不只检查组件存在。
标准 premerge 四项直接检查和 13 项选中检查通过。更广的必需 Core 两断言仍失败(37/39),checkpoint-retention Ruff 仍报同一未使用导入;我在不可变基线和当前 head 用相同命令执行,完整归一化 Core 输出及 Ruff 字节分别相等,失败因果文件未被这五路径改动。它们与作者 non-passing quality receipt 的合并 hold 保留,不能把局部 green 称为全部 required green。未查询远端 CI。
我的整体评价
APPROVE,精确 head 11587e661b429f9465c7d908a9c9caf277aeb0b4。当前残余修复已完成:长期 Goal/来源语义保持,失败阅读和返回体验改善,用户没有额外配置或确认负担。一个既有派生 prop 比新错误页或重复上下文更合适,普通分支有当前浏览器验证。批准不覆盖既有 Core/Ruff/quality 合并限制,也不证明安装后 App 或真实研究收益。
English verdict: APPROVE — 11587e6. The actual base/head viewport comparison and three current packaged scenarios verify a neutral unavailable header with mobile/Back/refresh recovery. Independent complete Core and Ruff failures match the immutable base and remain separate merge holds; no CI or installed-App claim.
An unavailable Goal scope already withheld unrelated Goal content and the composer, but its header still said “LoopX 管家” and offered steward navigation. Reuse the existing unavailable state to show a neutral Goal header, with mobile navigation and refresh retained. Only explicitly choosing All Goals broadens the view; Back restores the unavailable scope.
This is the remaining five-file presentation fix after #6811 was merged by the maintainer. No Goal, source binding, execution authority or model operation changes. Normal Goal and steward headers keep their existing behavior.
Visual evidence
Actual compiled UI with a disposable read-only native directory/history backend. The unavailable view contains no private messages or operating data; the parent relationships and surrounding workspace are synthetic. Tested revision:
11587e661b429f9465c7d908a9c9caf277aeb0b4; base:2ca6c2b2e5155e9c6414e52a112fbcbdff1def50. Packaged browser evidence; not installed App qualification.Desktop before / after:
390px before / after:
Local read-only preview (available on the development machine).
Validation and limits