SPB Git

Repository Public

PHASE2-iOS.md 7.3 KB 80 lines markdown

1<!--2SP Drive iOS3File: docs/next/PHASE2-iOS.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->7# SP Drive Next (2.0) on iPhone and iPad — phase 289Branch `next`. Phase 2 links the shared Swift package `SPDriveNext` (sibling repository `../SPDrive`, branch `next`, built and tested at10`c6c11d2`, local path package, linked by the app only) and builds the screens of the 2.0 endpoints. Backend used: the throw-away112.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.**12**No real language model was exercised**: the test bed's `maclustr` provider is the backend's `scripts/fake-llm.mjs`.1314## 1. Plumbing1516| Piece | Where | Notes |17|---|---|---|18| Transport | `NextKit/NextBridge.swift` `DriveNextTransport` | the app's base URL, device token and `X-SPD-Client` header |19| 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 |20| 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 |21| 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 |22| 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` |23| 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) |2425### Backend deviations D18–D23 (final backend)2627| # | What the app does |28|---|---|29| 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) |30| D19 reduced member activity feed | not shown: the app does not display a shared folder's activity to members |31| 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) |32| 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 |33| 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) |34| D23 `503 busy` on semantic search | shown as « Recherche par le sens indisponible », lexical search keeps working. Not provoked by a test |3536## 2. Screens (each exists only when its feature is announced by `/meta`)3738| Screen | Feature | File |39|---|---|---|40| Search: names + content with highlighted passages, scope chip; « Par le sens » toggle (order only, never a score) | `content-search`, `semantic` | `Features/Search/SearchScreen.swift` |41| 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` |42| Tags of a file (create, apply, delete) | api ≥ 2 | `Features/Next/CollectionsScreen.swift` (`TagsEditor`) |43| Smart collections: list, rule builder with live count, results | `collections` | `Features/Next/CollectionsScreen.swift` |44| Activity: account, file, folder | `activity` | `Features/Next/InsightsScreens.swift` |45| Versions: timeline, restore (adds a version), compare — text diff, images and PDF side by side, plain statement otherwise | api ≥ 2 | same |46| 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` |47| Members and roles, workspace name, folder activity; QR code of a link | `collab` (QR: always) | `Features/Next/SharingNext.swift` |48| « Partagés avec moi »: viewer reads, editor also writes, uploader sees only a drop surface | `collab` | same |49| Devices: platform, app version, last activity, revoke | always | `Features/Next/InsightsScreens.swift` |50| Infrastructure (administrators): worker, job queue, preview failures, backup — read only | role `admin`, api ≥ 2 | same |5152Entry points: iPhone « Plus », iPad sidebar section « Drive 2.0 », the item sheet, the folder's options menu, the details sheet, Settings.5354## 3. Design tokens5556`SPDTheme` in `Components/Theme.swift` now has the names **and values** of `DESIGN-SYSTEM-V2.md`: `Palette` (16 roles with their57Increase Contrast forms), `Typo`, `Space`, `Radius`, `Elevation` e0–e3, `Motion` (named motions). Documented differences on iOS:58the two-stop mark gradient also fills the primary button and folder tiles (the contract reserves it for the mark); grouped59screens use the system's grouped backgrounds; the widgets and the two older extensions still take their accent from the asset60catalogue (`AccentColor`), not from `SPDTheme`.6162## 4. What is not done or not verified6364- 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).65- « 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.66- 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).67- 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.68- Nothing on a real device (see `DELIVERY-CHECKLIST.md` §3).6970## 5. English7172`Resources/Localizable.xcstrings` (source language French) holds 638 English strings: every interface string written as a plain73literal. What is still French only:7475- 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;76- strings assembled in code as `String` outside `String(localized:)` in the 1.0 screens (settings footers with plurals, the sharing and deposit editors' summaries, transfer failure reasons, error descriptions of `AppModel.describe`);77- the three extensions (share, File Provider, widgets), local notifications, and the conflict-copy file name (« (conflit …) »).7879The English was not reviewed in the running app beyond the appearance-matrix screenshots.80
Files main
Menu

Theme