Repository navigation
feat(workspace): add keyboard navigation for Goals, tasks and previews - #6996
steven-kid wants to merge 4 commits into
Conversation
Signed-off-by: Yuchao Wang <stevenkid404@gmail.com>
Signed-off-by: Yuchao Wang <stevenkid404@gmail.com>
Signed-off-by: Yuchao Wang <stevenkid404@gmail.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | effort=max
动机
需要按名称找到目标或当前目标任务的工作区用户。 过去要逐行寻找目标和任务;现在可用快捷键搜索并打开原详情,但已加载的用户待办仍搜不到。 目标、Agent 任务和已有成果/预览能够直接导航;用户待办遗漏需要修复后才能兑现完整的当前任务导航。 不新增执行权限、完整历史索引、模型运行或已安装原生 App 资格。 当前目标中已加载的 User Todo 尚未进入索引;不能把界面上的“没有匹配项”解释成没有这项任务。 这个切片本身有用,但用户自己的待办正是需要直接找到的工作,不能只因普通 Agent 任务能够搜索就宣布范围完整。
改动思路
面板只负责展示与导航,复用现有选择和详情 owner;原生状态和操作权限不移入搜索器。 本 PR 是当前投影的导航切片;全键盘映射、完整历史和执行/安装资格继续由既有边界负责。 纯函数生成导航位置,原生 dialog 处理搜索、键盘、输入法与焦点,再把选择交给已有详情。导航不创建预览、不确认操作,也不发送 Agent 指令。普通目标浏览改为不提前准备会话;进入 Chat 或主动发送消息仍走原 owner。这个默认变化在正文和指南中有披露。
具体改动
精确 head 10880cb91e2d5f51ab00b78b95578efc7d5b10e7;实际不可变基线 3e35f83d6f009ad490320d2b525ebecea1605ea4。评审前读取 Goal Workspace RFC,docs/architecture/rfcs/goal-workspace-surface-v0.md,spec_revision 3e35f83d6f009ad490320d2b525ebecea1605ea4。§5.10 not_met:Agent 任务/目标/成果/已有预览可以导航,但已加载 User Todo 被漏掉;V6 implemented 于本导航切片,英中、键盘、输入法与 390px 测试通过;V9 implemented,导航零写请求,真实详情仅读取;M4 out_of_scope,完整键盘图、实时/深色/安装及团队资格没有被此 PR 关闭。新增英中 RFC 段落保持同一边界。
关键代码讲解
- workspaceCommandEntries:Indexes goal.agentTodos but never model.userTodos / attention items, causing the confirmed omission.
- WorkspaceCommandPalette:Native dialog, IME guard, current-render selection, disabled entries and focus restoration; no action execution.
- PersonalGoalHome:Explicit Chat view/sending retains preparation; ordinary Goal navigation no longer eagerly prepares a session.
新语汇是本地展示用的 entry/destination 联合,复用既有任务和详情类型,不新建业务状态或能力。18 个路径的主要新增是导航、双语文案和聚焦测试,没有建立第二套持久索引。已检查正文中的四张合成截图与本次实际打包页面;布局和焦点可用,实际未发现此前怀疑的详情焦点丢失。
对主干的风险
[P2] 将已加载的用户待办纳入任务导航。 索引器第 24 行只遍历 goal.agentTodos,后续只处理 output/proposal。当前页面的 model.userTodos 已经含有对应的人类事项,却没有进入索引。我通过正常原生命令在一次性 Goal 创建一项 User Todo:它出现在“需要你”,点击后能打开原有完整事项;同页面用标题搜索则返回“没有匹配项”。这是已加载数据的漏项,不属于未加载历史的范围限制。最小修复是将同 Goal/同来源的 WorkspaceAttention 行作为导航位置,选择时继续打开原 attention 详情;不需要新 API。补充 user_gate/user_action 标题与 ID 的回归,并保留异 Goal、只读来源和零执行的控制。
正常构建/typecheck、4 个条目测试、完整打包面板 smoke(含真实 Todo 读取与中断恢复)、7 个相邻组件契约、基线和当前 craft 浏览器检查、标准 4 direct + 13 selected 检查均已执行。面板的普通 Agent 任务、结果/预览、IME/Escape、来源切换、窄屏与关闭 DOM 行为均通过。这些正向结果没有覆盖 User Todo 反例。基线最初因残留旧 bundle、未同步前端依赖而未能启动,按原依赖和正常构建恢复后重跑;原失败保留,不归因给本 PR。没有查询、轮询或等待 CI。
我的整体评价
REQUEST_CHANGES,一个有实际页面和原生来源证据的 P2。实现的局部结构与问题规模相称,复用现有 owner 是正确路线;修复应继续沿同一投影完成,而不是增加持久缓存。long_horizon preserved:导航不启动工作或替换原执行/继续规则,未证明模型或长期收益;user_experience not_yet_proven:普通任务路径改善,但当前用户待办范围仍缺失。修复上述漏项并重跑同一真实来源/原有详情反例后可复审;这里没有合并或安装授权。
English verdict: REQUEST_CHANGES at 10880cb91e2d5f51ab00b78b95578efc7d5b10e7. The packaged launcher works for Agent tasks, but omits already-loaded User Todos visible and openable through Needs you. Reuse the existing attention selection and add scoped title/ID regressions; retain the current no-write and source-isolation checks.
| })); | ||
| const goal = goals.find(candidate => candidate.goalId === goalId); | ||
| if (!goal || goal.loadState) return entries; | ||
| for (const todo of goal.agentTodos) entries.push({ |
There was a problem hiding this comment.
[P2] 请把已加载的 User Todo 也纳入当前目标导航。当前仅遍历 goal.agentTodos,后续也只处理 output/proposal;真实一次性 Goal 的 User Todo 已在“需要你”出现并能打开原详情,但搜索相同标题/ID返回没有匹配项。这是已加载事项的漏项,建议复用 model.userTodos/WorkspaceAttention 和已有 attention selection,补 user_gate/user_action 的同来源、同 Goal 标题/ID 测试,继续保留只读和零执行边界。
There was a problem hiding this comment.
已独立确认并修复,提交 f629683。
索引现在接收已加载的 model.userTodos,按当前 Goal 和 active source 精确过滤,直接复用 {kind: "attention", item} 详情选择;不新增 API、执行路径或持久索引。只读来源仍可查看事项,原有写权限边界不变。
实际验证:
- 新增 user_gate/user_action 标题及 ID、异 Goal/异 source、只读/不可用来源和投影不变性回归;修复前新测试失败(0 个匹配),修复后 5/5 条目/快捷键测试通过。
npm run build通过(typecheck、dashboard 和 packaged Chat bundle)。LOOPX_PERSONAL_WORKSPACE_PACKAGED=1 npm run smoke:workspace-command-palette通过:正常 CLI 在一次性 Goal 创建两类 User Todo,经真实 status 投影按标题/ID打开既有 attention 详情并核对 Todo ID;只读测试使用真实后端读出的快照,验证原详情和无写控件。导航期间非 GET/HEAD/OPTIONS 请求均为零;原 Agent Todo 真实详情读回、状态读取中断恢复、英中/键盘/IME/窄屏测试继续通过。- packaged
smoke:status-source-switch-packaged通过;相邻 component contracts 7/7;Python dependency-lock/module-budget invariants 7/7;git diff --check通过。
未自行 resolve 本线程;未扩大修复范围处理无关上游问题。
CI evidence for f629683ce422ab0cc7899572b5b94e6ae6b3a6bd:
-
Python Tests: failed at
kernel-static-checks→Check repository invariants before long tests; downstream lanes were skipped and aggregate gates failed. Independently ran the exact two invariant test files on clean worktrees at merge base3e166772b6b3b7e00b7d44ae9fcddb9cfba09c68and GitHub merge923101a1561345bb0996d359246ba524ed2dae3d: both 1 failed, 6 passed, module count 147 > 145. Feature head passes 7/7. Remote job-log download was denied with HTTP 403; the remote failing step is confirmed by metadata, while the exact assertion is independently reproduced locally, not quoted from an unavailable CI log. -
Release Artifacts: failed at
Exercise the installed page in a real browser(job). This step runs Playwright installation followed by the fullsmoke:personal-workspace-packagedchain. Log download was denied with HTTP 403 and the run has no diagnostic artifacts, so the precise failing subcommand/assertion and attribution remain unknown. This is not claimed to be the previously reproduced replan-cadence failure or to be fixed by the passing focused local tests. Upload/release publication jobs were skipped. -
Desktop Release Artifacts: macOS and Windows passed; publication skipped. Frontstage Pages, DCO, Dependency Review, and CI Maintenance passed. All new-head workflows are terminal; CI is not fully green.
Signed-off-by: Yuchao Wang <stevenkid404@gmail.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
APPROVE — 已独立复验并修复原 User Todo 搜索漏项;当前完整导航切片可批准,原集成限制保留。
动机
需要按名称或 ID 找到当前工作区事项的用户。
原来需要逐行寻找目标、任务和成果,旧面板还遗漏已经在“需要你”中显示的用户待办;现在快捷面板能将已加载的 Agent/User Todo 导向原详情。
同 Goal、同来源的 user_gate 和 user_action 都能按标题或 ID 搜索并阅读,导航不产生写请求。
不增加执行权限、完整历史索引、完整 M4 键盘图、实时/深色资格、已安装原生 App 或真实团队验收。
改动思路
面板复用既有投影、选择与事项详情;新增本地导航目标,不建立第二套持久索引或执行 owner。
当前 PR 完整交付已加载投影的导航切片;完整 M4、安装态、实时团队与历史索引仍由原边界验收。
最小修复在纯条目构造器加入同来源、同 Goal 的 WorkspaceAttention,选择时传给原 attention 详情。已读取当前全部18路径,并单列旧10880cb91到新头的4文件修复。普通概览/任务/成果浏览不再提前准备 Chat 会话,这是已在正文和指南披露的默认变化;显式进入 Chat 或发送仍由原会话 owner 准备。
具体改动
精确 head f629683ce422ab0cc7899572b5b94e6ae6b3a6bd;实际不可变基线 3e35f83d6f009ad490320d2b525ebecea1605ea4。在读 diff 前固定的规格为 docs/architecture/rfcs/goal-workspace-surface-v0.md,spec_revision 3e35f83d6f009ad490320d2b525ebecea1605ea4。5.10-launcher implemented;V6-navigation-slice implemented;V9-no-effects implemented;M4-full out_of_scope。
关键代码讲解
- workspaceCommandEntries:从既有类型化投影生成导航位置。 本头补充同 Goal/来源的 attention;无写副作用。
- WorkspaceCommandPalette:原生dialog处理搜索、选择、输入法与焦点。 关闭时返回null;选择当前render中的条目。
- PersonalGoalHome:保留原会话准备 owner。 普通Goal浏览不提前建会话;显式Chat/发送仍沿原路径。
修复相对旧头只改四文件:条目函数接收 model.userTodos 与当前 source,按 Goal/source 精确过滤,再交原 attention 选择;补充两类 User Todo 的标题/ID、异作用域、只读和真实 owner 回归。其余14路径逐字节未变;基线、消费者、平台、依赖、claims 失效矩阵已核,旧普通 craft 证据只在相同3e35基线和未变前提下复用,不继承旧 verdict。当前构建/typecheck、全部面板 smoke 和来源切换重新执行。
对主干的风险
实际验证:同一新测试对旧10880条目函数4过1败,失败为已加载用户事项0匹配;当前5项均过。当前完整打包面板覆盖英中、IME/焦点、390px、历史与来源切换、已有预览零创建/应用、真实Todo详情及来源中断恢复。另用独立真实CLI/HTTP和Ego分别打开user_gate标题与user_action ID,原文字/类型一致、写请求为零;390px弹窗位于17–373px、无横向溢出。29项相邻组件测试、标准4direct+13selected均过。实际后端未提供模型执行服务,页面仍明确提示不可用;可读状态没有被当作可执行授权。作者远端CI披露只作为未独验上下文,不查或轮询CI。
我的整体评价
本切片 goal_achieved:原P2已有独立当前头代码、可区分旧失败的新回归和真实事项旅程证据。long_horizon=preserved;user_experience=improved,仅指能直接找到原已加载事项。保留原授权边界,未从测试、图或评审数量推导长期净益。
作者披露的完整 workspace 本地旧基线失败和当前远端 browser 失败归因未知均保留;本轮未查 CI,也不将聚焦通过等同全链绿灯。旧 REQUEST_CHANGES 及未解决线程保持原记录,本 Agent 不 dismiss/resolve/merge。未认证原生 App、Windows、真实团队或长期收益。
English verdict: APPROVE — exact head f629683ce422ab0cc7899572b5b94e6ae6b3a6bd. The full loaded-projection launcher is coherent and the prior loaded User Todo omission is independently fixed through the existing attention owner. Real title/ID/detail navigation is read-only; scope, IME, source-recovery and focused packaged checks pass. Prior unresolved review records and separately disclosed integration limitations remain; no merge or native-App qualification.
Goal And Delivered Outcome
Owners can now find a Goal, task, projected result or existing action preview with ⌘K / Ctrl-K, instead of locating its row across workspace views. The palette filters names/IDs, supports arrows/Enter/Escape and IME, and opens the existing selection/drawer/task deep link. The sidebar provides a discoverable pointer/touch entry.
Related to #4574, roadmap S5, and the accepted Goal Workspace RFC §5.10. Base:
loopx-project/loopx:main; implementation baseline3e35f83d6f009ad490320d2b525ebecea1605ea4. Open PRs and current implementation were checked for overlap.Search is local to the current projection. Source/Goal changes invalidate the open palette; unavailable sources suppress entries, and read-only sources exclude action previews. Opening a preview never prepares another one or applies it. Default behavior change: browsing Goal Overview/Tasks/Files no longer creates or resumes a chat session in the background; entering Chat or sending a message retains the existing preparation owner. Browser tests assert zero write requests during palette navigation and a session request on explicit Chat entry.
Author Declaration
Written by: model_agent — OpenAI Codex, GPT-6 family.
Implemented against the accepted workspace RFC at
3e35f83d6:workspace-command-entries.ts,workspace-command-palette.tsx; packaged browser smokeSelf-check: inspected the final diff, existing selection/session owners,
AGENTS.mdand design/delivery guidance. The entry/destination unions are private presentation vocabulary, not a new capability or execution contract. The semantic advisory only scans its supported core paths; it does not certify these UI unions.Scope And Continuation
Complete within the launcher scope. Search covers loaded projected items, not a new full-history index. Preparing new actions still belongs to the existing UI; this slice opens already stored previews. App/CLI/Lark execution and state authority are unchanged. No live-team or installed native WebView qualification is claimed. Reverting this PR removes the launcher and restores eager Goal session preparation.
Validation
Current follow-up head:
f629683ce422ab0cc7899572b5b94e6ae6b3a6bd. Fixes the confirmed omission of loaded User Todos: same-Goal/same-source attention entries open the existing detail owner. New user_gate/user_action title/ID and isolation regression failed before the fix and passes after it.Current-head checks passed:
npm run build; packagedsmoke:workspace-command-palette(5 entry/shortcut tests, real CLI-created Agent/User Todo navigation, read-only snapshot details, zero navigation writes, existing en/zh/keyboard/IME/mobile/recovery coverage); packagedsmoke:status-source-switch-packaged; 7 adjacent component contracts; 7 Python dependency-lock/module-budget invariants;git diff --check. The read-only User Todo browser case uses a snapshot read from the disposable real backend; other service endpoints retain synthetic fixtures. Initial setup attempts failed because concurrent test edits invalidated a bundle build and the read-only test proxy timed out; the stable rebuild and corrected snapshot fixture passed. No installed native App or live-team qualification is claimed.CI evidence for
f629683ce422ab0cc7899572b5b94e6ae6b3a6bd:Python Tests: failed at
kernel-static-checks→Check repository invariants before long tests; downstream lanes were skipped and aggregate gates failed. Independently ran the exact two invariant test files on clean worktrees at merge base3e166772b6b3b7e00b7d44ae9fcddb9cfba09c68and GitHub merge923101a1561345bb0996d359246ba524ed2dae3d: both 1 failed, 6 passed, module count 147 > 145. Feature head passes 7/7. Remote job-log download was denied with HTTP 403; the remote failing step is confirmed by metadata, while the exact assertion is independently reproduced locally, not quoted from an unavailable CI log.Release Artifacts: failed at
Exercise the installed page in a real browser(job). This step runs Playwright installation followed by the fullsmoke:personal-workspace-packagedchain. Log download was denied with HTTP 403 and the run has no diagnostic artifacts, so the precise failing subcommand/assertion and attribution remain unknown. This is not claimed to be the previously reproduced replan-cadence failure or to be fixed by the passing focused local tests. Upload/release publication jobs were skipped.Desktop Release Artifacts: macOS and Windows passed; publication skipped. Frontstage Pages, DCO, Dependency Review, and CI Maintenance passed. All new-head workflows are terminal; CI is not fully green.
Results below refer to previous commits, not a claim that this new head is fully green. The full workspace suite was not rerun for this focused follow-up. Original-thread reply.
Previous validation and baseline limitations
Prior tested source:
10880cb91e2d5f51ab00b78b95578efc7d5b10e7. Follow-up removes closed palette labels/results from the DOM and resets IME state when reopened; the existing navigation/source-switch tests now pass unchanged. Local validation finished; remote CI is tracked separately below. Inputs: synthetic/public fixtures, plus an isolated real Chat/Todo owner with disposable state; no Agent/model execution.Commands in the dashboard directory unless prefixed with a repository path:
npm run build(dashboard and verified packaged Chat bundle)LOOPX_PERSONAL_WORKSPACE_PACKAGED=1 npm run smoke:workspace-command-palette: four entry/shortcut tests; en/zh search, keyboard/IME/focus, mobile, history invalidation, previews/results, read-only/unavailable state, zero-write navigation, explicit Chat preparationworkspace-view-recoveryandconversation-history-recoveryscenarios inexamples/personal-workspace-browser-smoke.mjs;smoke/goal-workspace-craft-browser-smoke.mjspersonal-workspace-contract.test.mjs,workspace-theme.test.mjs,composer-keyboard.test.mjsloopx check(14 text files clean; absent local registry warnings);examples/semantic-vocabulary-drift-smoke.py;git diff --check.venv/bin/python scripts/check_rfc_bilingual.py --base upstream/main --head HEAD.venv/bin/python examples/docs-governance-smoke.py:goal-outcome-refinement-v0.mdlacks the required “semantic mirror” text. Independently reproduced in a clean worktree at exact baseline3e35f83d6; that file is untouched here.npm run smoke:personal-workspace-packaged: 54 browser scenarios passed, thenreplan-cadencefailed withgoal_configuration_apply_failed. The identical isolated command failed on clean original base3e35f83d6and final head10880cb91; the original chain stopped there. The remaining 17 scenarios were then run separately and all passed: 71/72 browser scenarios pass, with only the independently baseline-reproduced failure. The 52 TAP tests in the chain passed. Chained team-evidence-return, team-feedback-recovery and craft checks were separately run and passed, as did source-switch and palette packaged smokes on the final patch.CI follow-up: initial head
4c4b49eb9completed. Core Tests failed at the module-budget invariant; exact current upstream base89bf43de45ab1709961d93913f9add66801fe977and GitHub mergeded1fc92fb2e4e2da3a2aba71539294cfaba8417both reproduce 1 failed, 6 passed (147 top-level modules, budget 145). Original base and feature head each pass 7/7; downstream matrix jobs were skipped, not passed. Release Artifacts failed at the installed browser step. Remote log storage returned HTTP 403, so its exact traceback cannot be attributed; local testing independently found and fixed the closed-palette regression described above. Desktop macOS/Windows, Frontstage build, sign-off and dependency review passed for the initial head. Previous head10880cb91Core Tests also fails at the same invariant. Its exact updated base63728ab9f039688bbf5855faec40c87a690defb7and merge snapshot253474040ba2b82da38dbfbf137fb815bea47afeindependently reproduce 1 failed, 6 passed; final feature head passes 7/7. Final-head desktop artifacts, Frontstage build, DCO and dependency review passed. Release Artifacts passed, including the installed-wheel browser step (job). All workflows for previous head10880cb91are terminal. Only Core Tests fails at the independently reproduced upstream module-budget gate; no all-CI-green claim is made. The local source-worktree replan-cadence failure above remains a local baseline-reproduced limitation, not a claim that installed-wheel CI failed.Docs-governance evidence: the same
check_rfc_language_mirrorsassertion atexamples/docs-governance-smoke.py:209fails on original base3e35f83d6, upstream bases89bf43de4and63728ab9f, and final feature head10880cb91. Both the script (blob1f49fb270c4ea6f70d4a01883a67626fee2ba5f4) and failing RFC (blobd5f094fd78d69f7f0cf8a16f5119e9b1767f0792) are identical on base/head. This separate local limitation is not the Core Tests failure above.The new smoke joins the existing packaged craft CI lane. No dependency or security configuration changes.
Visual Evidence
Packaged browser captures, synthetic showcase data. Before:
3e35f83d6; after: this PR's tested source. One sidebar launcher adds direct navigation without another persistent panel. The modal reuses workspace tokens and visible focus; loading, unavailable and no-match states remain explicit. No animation was added. Ordinary lookup requires no extra confirmation; any eventual write keeps its existing review.Type / Area / Boundaries