What happened?
The session review panel in "Last Turn" mode does not show per-turn file changes in two scenarios:
- Non-git projects: The turn diff is always empty, even when the assistant modified files during the turn. Users have no way to see what changed.
- Git-ignored files: When the assistant modifies a file listed in
.gitignore or .git/info/exclude (e.g. node_modules/, .env, build output), the turn diff silently omits those files.
The root cause is that the snapshot tracking system uses git internally (Snapshot.Service in packages/opencode/src/snapshot/index.ts) and has two hard gates:
enabled() returns false when project.vcs !== "git" (line 185), so no snapshot is ever taken for non-git projects.
ignore() calls git check-ignore against the project's .git directory (line 128-146), then filters matched files out of both the snapshot index and the diff output (lines 242-251, 698-701).
Steps to reproduce
Non-git projects:
- Open PawWork in a directory that is not a git repository
- Ask the assistant to create or modify files
- Observe the session review panel shows "No changes" after the turn completes
Git-ignored files:
- Open PawWork in a git repository
- Ensure
.env or a node_modules/ file is listed in .gitignore
- Ask the assistant to modify that ignored file
- Observe the turn diff does not list the ignored file
What did you expect to happen?
- Non-git projects: The turn diff should still show which files the assistant created or modified, using a git-independent tracking mechanism (e.g. file content hashes).
- Git-ignored files: At minimum, ignored files that were actively modified by the assistant during the turn should appear in the diff, possibly with a visual indicator that they are ignored. Alternatively, a user-facing setting could control whether ignored files are included.
PawWork version
dev branch (pre-release)
OS version
macOS (any version)
Can you reproduce it again?
Yes, every time
Screenshots, recordings, or extra context
Affected code paths:
| File |
Line(s) |
Role |
packages/opencode/src/snapshot/index.ts |
184-186 |
enabled() gates on vcs === "git" |
packages/opencode/src/snapshot/index.ts |
126-147 |
ignore() filters via git check-ignore |
packages/opencode/src/snapshot/index.ts |
242-251 |
Ignored files dropped from snapshot index |
packages/opencode/src/snapshot/index.ts |
698-701 |
Ignored files filtered from diff output |
packages/app/src/pages/session/review-change-mode.ts |
8-11 |
Non-git projects limited to "turn" mode only |
packages/app/src/pages/session.tsx |
737 |
turnDiffs reads from snapshot-produced summary.diffs |
Suggested approach:
For non-git projects, a lightweight git-independent diff mechanism could compare file content hashes (e.g. SHA-256) before and after each turn. The snapshot system's existing track() / diffFull() interface could be extended with a hash-based fallback when vcs !== "git".
For git-ignored files, the simplest fix is to stop filtering ignored files from the diff output (remove the ignore() call at line 698-701) while keeping the filter on the snapshot index (line 242-251) so ignored files are not permanently tracked. This way, changes to ignored files appear in the turn diff but don't accumulate in the snapshot history.
What happened?
The session review panel in "Last Turn" mode does not show per-turn file changes in two scenarios:
.gitignoreor.git/info/exclude(e.g.node_modules/,.env, build output), the turn diff silently omits those files.The root cause is that the snapshot tracking system uses git internally (
Snapshot.Serviceinpackages/opencode/src/snapshot/index.ts) and has two hard gates:enabled()returnsfalsewhenproject.vcs !== "git"(line 185), so no snapshot is ever taken for non-git projects.ignore()callsgit check-ignoreagainst the project's.gitdirectory (line 128-146), then filters matched files out of both the snapshot index and the diff output (lines 242-251, 698-701).Steps to reproduce
Non-git projects:
Git-ignored files:
.envor anode_modules/file is listed in.gitignoreWhat did you expect to happen?
PawWork version
dev branch (pre-release)
OS version
macOS (any version)
Can you reproduce it again?
Yes, every time
Screenshots, recordings, or extra context
Affected code paths:
packages/opencode/src/snapshot/index.tsenabled()gates onvcs === "git"packages/opencode/src/snapshot/index.tsignore()filters viagit check-ignorepackages/opencode/src/snapshot/index.tspackages/opencode/src/snapshot/index.tspackages/app/src/pages/session/review-change-mode.tspackages/app/src/pages/session.tsxturnDiffsreads from snapshot-producedsummary.diffsSuggested approach:
For non-git projects, a lightweight git-independent diff mechanism could compare file content hashes (e.g. SHA-256) before and after each turn. The snapshot system's existing
track()/diffFull()interface could be extended with a hash-based fallback whenvcs !== "git".For git-ignored files, the simplest fix is to stop filtering ignored files from the diff output (remove the
ignore()call at line 698-701) while keeping the filter on the snapshot index (line 242-251) so ignored files are not permanently tracked. This way, changes to ignored files appear in the turn diff but don't accumulate in the snapshot history.