refactor(capture-kit): share the snapshot tree helpers outside Android presentation
Merged
TH
2h ago+2+2+0123456789-2-2-0123456789
Summary
Move the platform-neutral snapshot tree helpers (findAncestor, ChildrenByParent, buildChildrenByParent, collectDescendants, markNodeAndDescendantsForRemoval) from packages/capture-kit/src/snapshot/snapshot-presentation/android/tree.ts to packages/capture-kit/src/snapshot/snapshot-tree.ts. Update the two Android presentation importers. No Android-specific code was left behind: every export of the old module is platform-neutral.
Touched files: 3 (1 rename, 2 import updates). Pure move, no behaviour change.
This prepares #4592: the cross-platform static accessibility audit must not import an Android presentation module for these helpers.
Validation
- Tested SHA:
64b9e4e02f8701a76e7373d9c4f6c74a9f7bf979 pnpm check:affected --run --head 64b9e4e02f: all runnable checks passed (format, lint, typecheck, layering, fallow, build, vitest-related, unit), receiptexactCommit: true.git diff -M90% --stat origin/main...HEADshows the rename with 0 content changes plus two import-line updates.- Not device-facing; no device run needed.
- CI obligations: standard lanes on GitHub. No unresolved risks.
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.