fix: preserve scoped Android snapshot refs#456
Conversation
|
91e6d43 to
c649c61
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91e6d432ad
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const candidates = [ | ||
| session.snapshot, | ||
| ...(session.snapshotScopeSource ? [session.snapshotScopeSource] : []), | ||
| ]; |
There was a problem hiding this comment.
Invalidate stale scope source before resolving @refs
resolveSnapshotScope now falls back to session.snapshotScopeSource, but that cache is not invalidated on every snapshot-refresh path (for example, replay healing rewrites session.snapshot in src/daemon/handlers/session-replay-heal.ts without clearing snapshotScopeSource). In flows like scoped snapshot -> replay heal (replay -u) -> snapshot -s @ref, ref lookup can resolve against stale pre-heal nodes and scope to the wrong label instead of the current tree, which makes subsequent snapshot results inconsistent with the live UI.
Useful? React with 👍 / 👎.
6151848 to
0658e11
Compare
|
Addressed this in the latest push. Replay heal now uses the centralized |
0658e11 to
46367f2
Compare
Summary
Fix Android scoped snapshots so
snapshot -s @refresolves against the prior ref source without double-filtering by the raw ref.Render hidden-below list hints after visible descendants and keep scoped snapshot fallback state from leaking after unrelated snapshot refreshes.
Review and CI follow-up: centralized session snapshot replacement through
setSessionSnapshot, cleared the scope source for replay-heal refreshes too, moved scoped-ref coverage into a focused test file to keep Fallow clean, and updated the stalefindmetadata expectation.Touched files: 15. Scope stayed within snapshot/session formatting and session snapshot refresh paths.
Validation
pnpm exec vitest run src/daemon/handlers/__tests__/find.test.tspnpm exec vitest run src/daemon/handlers/__tests__/snapshot-scoped-refs.test.tspnpm exec vitest run src/daemon/handlers/__tests__/snapshot-handler.test.tspnpm formatpnpm check:quickpnpm check:fallowpnpm check:unit