[Agent] feat(file-provider): add save state & screenshot enumeration#3618
[Agent] feat(file-provider): add save state & screenshot enumeration#3618github-actions[bot] wants to merge 4 commits intodevelopfrom
Conversation
|
🤖 PR created. AI review starting automatically. |
7e131f5 to
1b0e5d7
Compare
|
@claude please do a self-review pass on this PR: Verify all changed files compile (check for unresolved symbols, missing imports, type mismatches) |
✅ Self-Review CompleteCompleted
Issues Found & Fixed
No Issues Found
Updated: 2026-04-03 |
Self-Review ResultsReviewed all 7 changed files. Found and fixed 2 issues, confirmed no other bugs. Issues Fixed1. Linux compilation failure —
Fix:
2. Line length violation in
Verified Clean
Build verified: |
2294601 to
6cd3ad9
Compare
|
@claude please do a self-review pass on this PR: Verify all changed files compile (check for unresolved symbols, missing imports, type mismatches) |
6cd3ad9 to
ca1a24c
Compare
Self-Review ResultsReviewed all 9 changed files. Overall the implementation is solid — correct Realm property access, safe prefix collision avoidance between Fixes Applied1. 2. 3. Verified Clean
✅ Fixes pushed — DateFormatter locale/tz, guard cleanup, docstring update |
6e37176 to
6e04ba8
Compare
|
@claude please do a self-review pass on this PR: Verify all changed files compile (check for unresolved symbols, missing imports, type mismatches) |
6e04ba8 to
8264090
Compare
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
Self-Review ResultsFiles Reviewed
Findings✅ No Compilation IssuesAll changed Swift files have correct types, imports, and symbol references:
✅ Multi-Platform Compatibility
✅ No Dead CodeNo unused imports, properties, or variables found. ✅ Thread SafetyRealm access follows the established per-call pattern used throughout the extension. Object capture before write blocks (e.g. Issues Fixed (pushed in commit
|
ed4e92a to
a0db45a
Compare
Adds Save States and Screenshots as browsable top-level categories in the ROM File Provider extension. Each game with saves or screenshots gets a named sub-folder; files can be copied out or deleted from Files.app via the file provider. Changes: - RomFileProviderRootCategory: add .saveStates and .screenshots cases - RomFileProviderVirtualPath: add save-state / screenshot identifier helpers (ss-game:, ss:, sc-game:, sc:) with encode/parse round-trip - FileProviderItem: new Kind cases + inits for saveStateGameFolder, saveStateFile, screenshotGameFolder, screenshotFile - RomFileProviderCPDI: SaveStateEntry / ScreenshotEntry structs and loaders (loadAllSaveStateEntries, loadAllScreenshotEntries, saveStateGameFolders, screenshotGameFolders) - FileProviderEnumerator: route ss-game: and sc-game: prefixes; enumerate save state / screenshot items with paging - FileProviderExtension: fetchContents, deleteItem, and resolveItem support for save state and screenshot items; modifyItem guard - Tests: round-trip tests for new identifier helpers Part of #3595 Closes #3617 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add swift-crypto as explicit PVPrimitives dependency so `import Crypto` works on Linux (CryptoKit is Apple-only; SHA256 API is identical) - Guard import with `#if canImport(CryptoKit)` in RomFileProviderVirtualPath.swift - Split overlong switch case in FileProviderItem.contentType (>200 chars) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d refactor, docstring - Add locale=en_US_POSIX and timeZone=UTC to DateFormatter in FileProviderItem.filename for saveStateFile to ensure deterministic filenames regardless of user locale/timezone - Refactor loadAllSaveStateEntries guard chain to single guard (eliminates intermediate URL? var) - Update FileProviderEnumerator class docstring to include Save States and Screenshots categories Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Extract DateFormatter in FileProviderItem.filename (saveStateFile) to a private static lazy property — eliminates repeated allocation on every filename access without changing output behaviour - Add edge-case tests: parseSaveStateID/parseSaveStateGameMD5 with empty content after prefix, parseScreenshotID must not match sc-game: prefix, screenshotItemIdentifier round-trip with zero index Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
a0db45a to
14e4ea8
Compare
Summary
ss-game:<md5>/sc-game:<md5>).Files Changed
PVPrimitives/.../RomFileProviderVirtualPath.swiftsaveStates+screenshotscases toRomFileProviderRootCategory; add identifier helpers forss-game:,ss:,sc-game:,sc:prefixesExtensions/ROM File Provider/FileProviderItem.swiftKindcases + inits:saveStateGameFolder,saveStateFile,screenshotGameFolder,screenshotFileExtensions/ROM File Provider/RomFileProviderCPDI.swiftSaveStateEntry/ScreenshotEntryCPDI structs; loadersloadAllSaveStateEntries,loadAllScreenshotEntries,saveStateGameFolders,screenshotGameFoldersExtensions/ROM File Provider/FileProviderEnumerator.swiftss-game:andsc-game:prefixes;buildSaveStateItems/buildScreenshotItemspaged list buildersExtensions/ROM File Provider/FileProviderExtension.swiftfetchContents/deleteItem/resolveItemsupport for save states and screenshots;modifyItemguard for read-only itemsPVPrimitives/Tests/.../RomFileProviderVirtualPathTests.swiftTest Plan
Provenance-Lite (AppStore)for iOS Simulator — both extension targets compile cleanly..pvsfiles..pngfiles.Closes #3617
Part of #3595
🤖 Generated with Claude Code