SP Drive Next (2.0) on iPhone and iPad — phase 2
Branch next. Phase 2 links the shared Swift package SPDriveNext (sibling repository ../SPDrive, branch next, built and tested at
c6c11d2, local path package, linked by the app only) and builds the screens of the 2.0 endpoints. Backend used: the throw-away
2.0 instance on m5ma:8663 (branch next of sp-drive.git, 0073557 at the final run — the commit that is live in production), never production. Simulator only.
No real language model was exercised: the test bed's maclustr provider is the backend's scripts/fake-llm.mjs.
1. Plumbing
| Piece | Where | Notes |
|---|---|---|
| Transport | NextKit/NextBridge.swift DriveNextTransport |
the app's base URL, device token and X-SPD-Client header |
| Event stream | SSEChangeSource → ChangeListener (phase 1) |
wired in AppModel.startForegroundLoop when /meta lists events; a closed or silent stream → polling every 30 s + reconnection 1 s → 60 s; a 5-minute safety poll while streaming |
| Capabilities | App/NextCenter.swift |
/meta at sign-in and when the app comes to the front; cached for offline starts; a 404 = 1.0 server |
| Bandwidth cap | TransferPolicy.bandwidthLimit, Settings → « Limite de débit des transferts » |
one transfer at a time, paced segments (uploads: smaller blocks; downloads: ranges). Per segment the system still sends at full speed: it is an average, not a shaper |
| Tags | NextKit/NextBridge.swift |
the package has no typed call for the 1.0 /tags routes: done locally through the package's generic get / send |
| Activity target names | Features/Next/InsightsScreens.swift ActivityLine |
decoded locally when the package's ActivityEvent.Target had no name (API-NEXT D16); the final package (c6c11d2) carries it, the local model was kept (same JSON, nothing depends on the difference) |
Backend deviations D18–D23 (final backend)
| # | What the app does |
|---|---|
| D18 members by e-mail only | MembersScreen adds by exact e-mail through addMember(to:email:as:); tested (engine: adding by identifier is refused before any request) |
| D19 reduced member activity feed | not shown: the app does not display a shared folder's activity to members |
| D20 uploader limited to the grant root, told the name it sent | the uploader surface never names a sub-folder; tested (engine: aiming elsewhere is refused, the answer carries the sent name) |
| D21 grant uploads capped, expire after 24 h | 413 too_many_pending_uploads is said in words; uploads to shared folders are immediate (no resumable queue on the device), so nothing waits 24 h. Not provoked by a test |
D22 503 on /sync/events |
any failure of the stream → polling + reconnection with back-off (tested with an unreachable stream and a cut stream; a 503 itself was not provoked) |
D23 503 busy on semantic search |
shown as « Recherche par le sens indisponible », lexical search keeps working. Not provoked by a test |
2. Screens (each exists only when its feature is announced by /meta)
| Screen | Feature | File |
|---|---|---|
| Search: names + content with highlighted passages, scope chip; « Par le sens » toggle (order only, never a score) | content-search, semantic |
Features/Search/SearchScreen.swift |
| SP Drive AI: ask a document / a folder / the whole Drive, streamed answer, numbered citations that open the file, model picker (creator vs route), unconfigured / external-not-allowed / nothing-retrieved / not-indexed states, consent switch in Settings, organisation suggestions applied one by one | ai |
Features/Next/AskScreen.swift |
| Tags of a file (create, apply, delete) | api ≥ 2 | Features/Next/CollectionsScreen.swift (TagsEditor) |
| Smart collections: list, rule builder with live count, results | collections |
Features/Next/CollectionsScreen.swift |
| Activity: account, file, folder | activity |
Features/Next/InsightsScreens.swift |
| Versions: timeline, restore (adds a version), compare — text diff, images and PDF side by side, plain statement otherwise | api ≥ 2 | same |
| Storage centre: by kind (tap to filter), by folder with drill-down, growth, largest files, duplicates (exact; similar images when announced) — every removal is one file, confirmed, to the trash | storage, similar-images |
Features/Next/StorageCenter.swift |
| Members and roles, workspace name, folder activity; QR code of a link | collab (QR: always) |
Features/Next/SharingNext.swift |
| « Partagés avec moi »: viewer reads, editor also writes, uploader sees only a drop surface | collab |
same |
| Devices: platform, app version, last activity, revoke | always | Features/Next/InsightsScreens.swift |
| Infrastructure (administrators): worker, job queue, preview failures, backup — read only | role admin, api ≥ 2 |
same |
Entry points: iPhone « Plus », iPad sidebar section « Drive 2.0 », the item sheet, the folder's options menu, the details sheet, Settings.
3. Design tokens
SPDTheme in Components/Theme.swift now has the names and values of DESIGN-SYSTEM-V2.md: Palette (16 roles with their
Increase Contrast forms), Typo, Space, Radius, Elevation e0–e3, Motion (named motions). Documented differences on iOS:
the two-stop mark gradient also fills the primary button and folder tiles (the contract reserves it for the mark); grouped
screens use the system's grouped backgrounds; the widgets and the two older extensions still take their accent from the asset
catalogue (AccentColor), not from SPDTheme.
4. What is not done or not verified
- AI: only the fake endpoint. Semantic search: the control and the call are built; no test asserts its results (they depend on the server's model).
- « Partagés avec moi »: download and upload go through the package's direct calls, not through the device's transfer queue: no pause, no background, no offline.
- An editor's actions in a shared folder (create, rename, trash, upload) are built; only the viewer and the uploader are covered by tests (engine and interface).
- Version comparison of images and PDF, similar-image duplicates, AI suggestions, the admin view, the bandwidth setting's control and the consent switch are built; their engine calls are tested where noted in
AUDIT-iOS.md§7, their screens are not driven by a test. - Nothing on a real device (see
DELIVERY-CHECKLIST.md§3).
5. English
Resources/Localizable.xcstrings (source language French) holds 638 English strings: every interface string written as a plain
literal. What is still French only:
- about 144 strings built with interpolation (counts, names, dates inside sentences — e.g. « (n) fichiers correspondent », toasts naming a file, plural forms): their catalogue keys depend on the argument types and were not written by hand;
- strings assembled in code as
StringoutsideString(localized:)in the 1.0 screens (settings footers with plurals, the sharing and deposit editors' summaries, transfer failure reasons, error descriptions ofAppModel.describe); - the three extensions (share, File Provider, widgets), local notifications, and the conflict-copy file name (« (conflit …) »).
The English was not reviewed in the running app beyond the appearance-matrix screenshots.