feat(desktop): separate Git review empty and error states - #5967
Draft
Colafornia wants to merge 1 commit into
Draft
Colafornia wants to merge 1 commit into
Colafornia wants to merge 1 commit into
Conversation
Colafornia
force-pushed
the
feat/5940-git-review-empty-error
branch
2 times, most recently
from
October 4, 2026 18:42
c0a8ca7 to
6922a5a
Compare
A valid non-Git task directory previously rendered the same red error Banner with Retry as a genuine read failure, even though retrying cannot turn a directory into a repository. The Changes panel now classifies GitReviewReadResult failures: not_git_repository, workspace_unavailable and unborn_repository are capability states with neutral guidance naming the task's recorded workspace, while git_failed keeps an error Banner with the underlying detail and a working Retry. The guidance offers a "Change task folder" action that reuses the existing Task Entry session workspace recovery picker (apache#5551), preserving task identity. A catalog-level session change subscription re-reads the Session's actual workspace after relocation. Refs apache#5940 Generated-by: Devin Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Colafornia
force-pushed
the
feat/5940-git-review-empty-error
branch
from
October 4, 2026 18:54
6922a5a to
61551fc
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
English
Summary
A valid non-Git task directory used to render the same red error Banner with Retry as a genuine read failure, even though retrying can never turn a directory into a repository. The Changes panel now classifies
GitReviewReadResultfailures:not_git_repository,workspace_unavailable,unborn_repositoryandremote_workspaceare capability states that get neutral guidance naming the task's recorded workspace, whilegit_failedkeeps an error Banner with the underlying detail and a working Retry. A clean repository with no differences still takes the separate "no changes" empty state.The capability guidance offers "Change task folder", which reuses the existing Task Entry session workspace recovery picker (#5551), reached through a small
application/contractspublish/subscribe seam rather than a shell-drilled prop so AppShell's debt metrics stay flat, so relocation preserves task identity instead of offering a new-task or default-directory action. A catalog-levelsubscribeSessionChangessubscription re-reads the Session's actual workspace after relocation, so the panel refreshes without a manual retry.Fixes #5940
Verification
npm run lint,npm run format:check,npm run build,npm run typecheck,npx knip --workspace apps/desktop,npx knip --workspace packages/ui: all pass.npm --workspace @maka/core run test:dist: 915/915 pass.npm --workspace @maka/desktop run test:dist: 3261/3261 pass, including new coverage: non-Git guidance with the task directory and no Retry, unavailable-workspace guidance with Retry plus the recovery action, unborn-repository guidance,git_faileddetail preserved through redaction with a working Retry, a remote host-owned workspace showing guidance with neither Retry nor recovery, and a session catalog change re-reading the relocated workspace. Four new IPC tests assert the recorded workspace is attached for non-Git and missing directories, and that an unknown Session is rejected.npm --workspace @maka/desktop run build-storybook+npm --workspace @maka/desktop run smoke:storybook: all 455 stories render;ChangesSourceNotGit,ChangesWorkspaceUnavailable,ChangesUnbornRepository,ChangesRemoteWorkspaceandChangesGitReadFailedcover the new states.Not run: the full Electron E2E suite (
npm run e2e).Screenshots (storybook capture):
AI use
Select exactly one:
Tool(s) and scope: Devin (Cognition) implemented the change end to end — result contract fields, main-process read and IPC, panel rendering and copy, recovery plumbing, tests and stories.
Generated-bytrailers are on the commits.Checklist
Does this PR entail a change in behavior?
中文
Summary
此前,一个合法但非 Git 的任务目录会渲染与真实读取失败相同的红色错误 Banner 和"重试"按钮,尽管重试不可能把目录变成仓库。现在变更面板按
GitReviewReadResult的失败原因分类:not_git_repository、workspace_unavailable、unborn_repository和remote_workspace属于能力态,展示中性引导并标注任务记录的工作区路径;git_failed保持错误 Banner,附带底层错误 detail 和有效的"重试"。干净的仓库仍走独立的"无变更"空态。能力态引导提供"更改任务目录"动作,复用 Task Entry 既有的会话工作区恢复选择器(#5551),该命令经
application/contracts发布/订阅 seam 获取、不经 shell prop 下钻,AppShell 债务指标保持不变;迁移保留任务身份,而不是提供新任务或默认目录动作。新增的 catalog 级subscribeSessionChanges订阅在迁移完成后重新读取 Session 的实际工作区,面板无需手动重试即刷新。Fixes #5940
Verification
npm run lint、npm run format:check、npm run build、npm run typecheck、npx knip --workspace apps/desktop、npx knip --workspace packages/ui:全部通过。npm --workspace @maka/core run test:dist:915/915 通过。npm --workspace @maka/desktop run test:dist:3261/3261 通过,含新增覆盖:非 Git 引导显示任务目录且无重试;目录不可用引导含重试与恢复动作;零提交仓库引导;git_failed经脱敏保留 detail 且重试有效;远程 Runtime Host 管理的工作区只显示引导、无重试与恢复动作;会话 catalog 变更触发对迁移后工作区的重读。另有 4 个新 IPC 测试断言非 Git 与缺失目录附带记录的工作区路径,以及未知 Session 被拒绝。npm --workspace @maka/desktop run build-storybook+npm --workspace @maka/desktop run smoke:storybook:455 个 story 全部渲染;ChangesSourceNotGit、ChangesWorkspaceUnavailable、ChangesUnbornRepository、ChangesRemoteWorkspace、ChangesGitReadFailed覆盖新状态。未运行:完整 Electron E2E(
npm run e2e)。截图(storybook capture):
AI use
Select exactly one:
Tool(s) and scope:Devin(Cognition)端到端实现了本次改动 —— 结果契约字段、主进程读取与 IPC、面板渲染与文案、恢复链路、测试与 story。提交含
Generated-bytrailer。Checklist
Does this PR entail a change in behavior?