mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 12:11:09 +00:00
2.3 KiB
2.3 KiB
Electron Desktop E2E Record: Diff Review and Commit
Date: 2026-04-25
Slice
Slice 12 basic diff review and commit.
User-Visible Scenario
- Launch the desktop app with a temporary HOME/QWEN_RUNTIME_DIR and fake ACP.
- Open a temporary Git workspace with an initial commit.
- Modify a tracked file and create an untracked file.
- Verify the right Review panel lists changed files and textual diff content.
- Stage all changes from the Review panel.
- Enter a commit message and commit.
- Verify the Review panel returns to a clean state.
Assertions
GET /api/projects/:id/git/diffreturns modified and untracked files.- The Review panel shows changed file count and diff text.
POST /api/projects/:id/git/stageupdates Git status from modified/untracked to staged.POST /api/projects/:id/git/commitcreates a commit and returns a clean status.POST /api/projects/:id/git/revertcleans tracked and untracked changes when explicitly invoked.- Commit and Git errors are displayed in the review area.
Diagnostics on Failure
- Save renderer screenshot.
- Save renderer console errors and failed network requests.
- Save Electron main stdout/stderr.
- Save
git -C <workspace> status --porcelain=v1 --branch. - Save
git -C <workspace> diffandgit -C <workspace> diff --cached. - Save DesktopServer responses for diff/stage/revert/commit routes.
Automated Coverage Added This Iteration
The full Electron E2E harness is still pending. This iteration added
server-level coverage in packages/desktop/src/server/index.test.ts:
- opens a registered project and reads
/git/diff; - verifies modified and untracked files are returned with diff text;
- stages all changes and verifies status counts;
- commits staged changes and verifies a clean status;
- reverts all changes and verifies the workspace returns to the initial file content.
Execution Results
npm run test --workspace=packages/desktoppassed: 8 files, 50 tests.npm run typecheck --workspace=packages/desktoppassed.npm run lint --workspace=packages/desktoppassed.npm run build --workspace=packages/desktoppassed.
Remaining Risk
Hunk-level accept/revert, inline comments, Open in Editor, and real Electron renderer assertions are not complete yet. They remain required before the MVP can be marked done.