feat: add the iOS files browser core - #181
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🔵 Needs a closer look
It introduces a new harness execution mode plus a new iOS browser surface and seeded API fixtures, so a human should validate the end-to-end runtime behavior beyond unit/UI/snapshot coverage.
Pull request overview
This PR extends the headless PutioHarness to support an iOS “files-browser” journey run (UI-tested, recorded, and proof-manifested), expands snapshot testing to multiple suites per platform, and introduces a real iOS Files browser surface backed by deterministic seeded API fixtures plus new unit/UI/snapshot tests.
Changes:
- Add
journey --platform ios --scenario files-browserto PutioHarness, including xcresult attachment extraction, MP4 recording, and proof manifest emission. - Replace single
snapshotSchemewithsnapshotSuitesto support multiple iOS snapshot suites (component + feature) and iterate them in harnesstest. - Implement the iOS Files browser UI/model and add seeded API fixtures + feature tests (unit, integration, rendering snapshot, and UI journey).
File summaries
| File | Description |
|---|---|
| Tools/PutioHarness/Tests/PutioHarnessKitTests/ModelsTests.swift | Adds contract tests for snapshot suites and browser-journey manifest/attachment selection. |
| Tools/PutioHarness/Tests/PutioHarnessKitTests/ArgumentParserTests.swift | Adds argument parsing coverage for the new journey command and rejects invalid shapes. |
| Tools/PutioHarness/Sources/PutioHarnessKit/SimulatorHarness.swift | Implements journey run flow; updates manifest writing, artifact kinds, and multi-suite snapshot testing. |
| Tools/PutioHarness/Sources/PutioHarnessKit/Models.swift | Adds SnapshotSuite, JourneyScenario, and journey result parsing helpers/contracts. |
| Tools/PutioHarness/Sources/PutioHarnessKit/HarnessService.swift | Wires .journey invocation into the harness service output pipeline. |
| Tools/PutioHarness/Sources/PutioHarnessKit/ArgumentParser.swift | Adds CLI usage + parsing/validation for journey; updates snapshot platform validation. |
| Tests/Shared/SnapshotSupport/SnapshotRendering.swift | Adds SwiftUI rendering helper for app-hosted feature snapshots. |
| Tests/iOSUITests/Sources/FilesBrowserJourneyTests.swift | New XCUITest proving root→nested→back flow and emitting named attachments. |
| Tests/iOS/Sources/PutioFolderModelTests.swift | New unit tests for folder loading/refresh/cancellation generation behavior. |
| Tests/iOS/Sources/PutioFileRouteTests.swift | New tests ensuring route identity/hash stability and item-kind mapping. |
| Tests/iOS/Sources/FilesBrowserSeededAPIIntegrationTests.swift | Integration coverage for seeded runtime list/navigation/route extraction. |
| Tests/iOS/Sources/FilesBrowserRenderingTests.swift | Snapshot assertions for Files browser in default + accessibility dynamic type. |
| Tests/iOS/Sources/BrowserTestFixtures.swift | Shared deterministic fixtures for browser tests (dates, items, contents). |
| Project.swift | Adds iOS feature test + UI test targets and shares SnapshotSupport buildable folder. |
| Packages/PutioCore/Tests/PutioCoreTests/ComponentKitTests.swift | Extends harness scenario parsing tests; adds PutioFileRow disclosure behavior test. |
| Packages/PutioCore/Sources/PutioCore/HarnessScenario.swift | Introduces new .filesBrowser harness scenario. |
| Packages/PutioCore/Sources/PutioCore/Components/PutioFileRow.swift | Adds ability to hide folder disclosure when embedded in a NavigationLink. |
| docs/HARNESS.md | Documents new journey command and updated multi-suite snapshot behavior. |
| CONTRIBUTING.md | Encourages running the browser journey for iOS file-browser changes. |
| Apps/Shared/Sources/PutioRuntimeFactory.swift | Enables seeded API for .filesBrowser scenario in DEBUG. |
| Apps/Shared/Sources/HarnessSeededAPI.swift | Expands deterministic URLProtocol fixtures to include /v2/files/list for browser flow. |
| Apps/iOS/Sources/PutioApp.swift | Replaces placeholder Files tab with real browser; adds accessibility probe for UI test route emission. |
| Apps/iOS/Sources/FilesBrowserView.swift | Adds the Files browser NavigationStack screens, load/retry/refresh UI, and accessibility identifiers. |
| Apps/iOS/Sources/FilesBrowserModel.swift | Adds browser domain model: routes, presentation mapping, and folder load state machine. |
Review details
Suppressed comments (1)
Tools/PutioHarness/Sources/PutioHarnessKit/SimulatorHarness.swift:495
- This failure message still refers to a "snapshot scheme" even though the configuration has been changed to
snapshotSuites. Updating the message keeps the CLI feedback aligned with the actual configuration model.
let suites = platform.configuration.snapshotSuites
guard !suites.isEmpty else {
throw HarnessFailure("test supports only platforms with a snapshot scheme: ios, tvos")
}
- Files reviewed: 24/26 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82f73aaf68
ℹ️ 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".
|
Fixed the valid snapshot-suite wording note in Verified with strict Swift format lint, all 30 harness tests, full |
The retry task re-runs whenever the screen re-appears, so a request that was not cleared before the user left could re-fire a load or refresh against a model that no longer needs it, racing the initial load and flashing a loading state over loaded content. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
6d4d6ce to
f82b0e5
Compare
|
Second-pass review follow-up; fix pushed to the branch. Fixed in f82b0e5 — Verified: full |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f82b0e57cb
ℹ️ 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".
A cancelled initial load reset attemptedInitialLoad only after its request drained, so a quick tab re-entry ran loadIfNeeded before the reset, saw the flag still set, and left the browser on a permanent spinner with no request in flight. Guarding on unsettled .loading state instead lets re-entry start a superseding request, and the generation check keeps the late unwind from clobbering it. The flag and the isInitialLoad payload become dead and are removed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Part of #123
Refs #130
Summary
PutioRuntime.files-browserjourney.This is only the browser-core checkpoint from #130. It does not close #130 or complete the #123 epic.
Reviewer Guide
FilesBrowserModel.swift, thenFilesBrowserView.swift,PutioApp.swift, andFilesBrowserJourneyTests.swift.Visual Aids
Validation
mise run verifymise run harness -- journey --platform ios --scenario files-browser --output jsonbuild/proof/20260829T165856Z-82f73aa/iosattachPutio,PutioNightly,PutioWatch, andPutioTVbuild.id=411;parent=410;kind=video.82f73aaand the follow-up at6d4d6ce. The two PNG baselines were reviewed at original resolution and re-asserted bymise run verify.Sanity Checks
410→ file411emits a typed video route; native Back restores root.SessionRootView.Benchmarks
N/A — this checkpoint adds the first browser path, not a performance-sensitive refactor.
Notes