Skip to content

refactor: isolate application availability probing - #46

Merged
ygsgdbd merged 1 commit into
mainfrom
codex/app-availability-snapshot
Sep 12, 2026
Merged

ygsgdbd merged 1 commit into
mainfrom
codex/app-availability-snapshot

Conversation

@ygsgdbd

@ygsgdbd ygsgdbd commented Sep 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

Rule model properties previously probed the file system whenever menu classification or app information was read, making business tests depend on real directories. Introduce an injectable AppAvailabilityClient and an in-memory path snapshot so these projections read explicit availability results.

Refresh the snapshot at startup and on each new menu presentation. Rule cleanup probes again before deleting, preserving apps restored since the menu opened and all ignored rules. A changed path cannot reuse its previous result. Persisted rule fields remain unchanged, and README demo availability is deterministic.

Testing

  • Added regression coverage for menu reopening, cleanup after apps are restored or removed, ignored-rule protection, and changed-path invalidation.
  • Kept a live file-system adapter test for directory creation and removal; business tests use controlled availability.
  • Verified README demo menu presentation does not probe the live file system.
  • Full XCTest suite after rebasing onto current main: 141 tests passed, 0 failures.
  • Pinned SwiftFormat 0.62.1 and git diff --check passed.

Changelog

  • Updated both Chinese and English entries under Unreleased in CHANGELOG.md.
  • No changelog entry is needed. Reason: Internal dependency and snapshot refactor; existing availability criteria and stored rule format are preserved.

Privacy

  • This change does not add telemetry or upload user data, or the reason this is not applicable is explained above.

@ygsgdbd
ygsgdbd marked this pull request as ready for review September 12, 2026 05:30
@ygsgdbd
ygsgdbd enabled auto-merge September 12, 2026 05:30
@ygsgdbd
ygsgdbd merged commit 133865b into main Sep 12, 2026
3 checks passed
@ygsgdbd
ygsgdbd deleted the codex/app-availability-snapshot branch September 12, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant