The generation-guard refactor moved the fetched.map{…}.sorted{…} chain into an
untyped `let merged`, dropping the type anchor the property assignment used to
provide. A multi-statement .map closure then leaves .sorted's $0 uninferred
(error: cannot infer type of closure parameter). Annotate merged in
OLTListViewModel and ONUListViewModel as [OLTStateDoc]/[ONUStateDoc].
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| Assets.xcassets/AppIcon.appiconset | ||
| 323-1961-302_mcms_6_2_pon_manager_user_guide.pdf | ||
| 323-1961-306_mcms_6_2_rest_api_developer_guide.pdf | ||
| APIClient.swift | ||
| APIConfiguration.swift | ||
| APIEnvelope.swift | ||
| APIError.swift | ||
| APIQuery.swift | ||
| AppEnvironment.swift | ||
| AuthModels.swift | ||
| AuthRepository.swift | ||
| Components.swift | ||
| DashboardDrilldownViews.swift | ||
| DashboardView.swift | ||
| DashboardViewModel.swift | ||
| DeviceModels.swift | ||
| DeviceRepositories.swift | ||
| Firmware.swift | ||
| FirmwareUpdateSheet.swift | ||
| Format.swift | ||
| GUI-NOTES.md | ||
| HANDOFF.md | ||
| KeychainStore.swift | ||
| LoginView.swift | ||
| MCMS_API.md | ||
| MCMSConnection.swift | ||
| MCMSEndpoint.swift | ||
| MCMSMobileApp.swift | ||
| MongoTimestamp.swift | ||
| OLTDetailView.swift | ||
| OLTDetailViewModel.swift | ||
| OLTListView.swift | ||
| OLTListViewModel.swift | ||
| ONUDetailView.swift | ||
| ONUDetailViewModel.swift | ||
| ONUListView.swift | ||
| ONUListViewModel.swift | ||
| ONURepository.swift | ||
| README.md | ||
| ResetConfirmSheet.swift | ||
| ServerTrustEvaluator.swift | ||
| SessionStore.swift | ||
| SettingsView.swift | ||
PON Go — iOS
Native iOS app for Ciena MCMS 6.2 PON Manager basics on the go — dashboard,
ONU and OLT browsing/diagnostics, firmware updates, resets. SwiftUI + URLSession,
no external dependencies. Sibling of the Android app (../mcms_android); the REST
behaviour and field paths are identical and documented in
MCMS_API.md.
App name PON Go (Xcode project/target is currently SVO_MCMS).
⚠️ Source layout — read this first
This folder holds the canonical flat Swift sources (plus docs, the app icon,
and the dev-guide PDFs). The actual Xcode project lives elsewhere
(~/Documents/mcms_ios_xcode/run<N>/SVO_MCMS/); the workflow so far has been to
copy changed .swift files into the Xcode project and build there.
For a clean git repo, consolidate: move these .swift files +
Assets.xcassets/ into the Xcode project directory, make that the iOS repo
(with docs/MCMS_API.md and the PDFs alongside), and drop the copy-sync dance.
Until then, this folder is the source of truth — edit here, copy into Xcode.
Build (Xcode)
- Xcode 26 (iOS 26 SDK), deployment target iOS 17+. New iOS App
(SwiftUI lifecycle); delete the template
ContentView.swift/ generatedAppstruct (this scaffold provides its own@maininMCMSMobileApp.swift). - Build Settings → Default Actor Isolation →
nonisolated. Xcode 26 defaults this to MainActor, which makes the pure-data types (APIQuery.empty,JSONValue: Equatable, …) emit ~8 main-actor warnings (errors under Swift 6 mode). The code is designed nonisolated-by-default; only UI/stateful classes are explicitly@MainActor. - App name / icon: set the target's Display Name → "PON Go", and drag
Assets.xcassets/AppIcon.appiconsetinto the project's asset catalog (replacing the existing AppIcon). - App Transport Security: self-signed TLS is handled in code by
ServerTrustEvaluator(no Info.plist change for HTTPS cert validation). For plain HTTP hosts, add a scopedNSAppTransportSecurity→NSExceptionDomainsentry for that host in Info.plist — neverNSAllowsArbitraryLoads.
Verify off-device (no iOS SDK needed)
The networking core + AppEnvironment + view models import only
Foundation/Observation, so they typecheck against the macOS SDK:
swiftc -typecheck -sdk "$(xcrun --show-sdk-path)" \
<core + AppEnvironment + *ViewModel .swift files> /tmp/loadphase_stub.swift
Add a one-line stub for LoadPhase (it lives in the SwiftUI Components.swift):
enum LoadPhase: Equatable { case idle, loading, loaded; case failed(String) }.
Target every run: 0 errors, 0 warnings. SwiftUI views that use iOS-only APIs
can't be compiled this way — validate those with isolated snippets or in Xcode.
Layout
App: MCMSMobileApp (@main), RootView routing, AppEnvironment
Networking: APIConfiguration, MCMSConnection, APIClient, APIEnvelope (JSONValue),
APIError, APIQuery, MCMSEndpoint, SessionStore, ServerTrustEvaluator,
KeychainStore, MongoTimestamp, Format
Models: DeviceModels, AuthModels, Firmware
Repos: AuthRepository, ONURepository, DeviceRepositories
UI: Components, Login/Settings/Dashboard/ONUList/ONUDetail/OLTList/
OLTDetail views + view models, ResetConfirmSheet, FirmwareUpdateSheet,
DashboardDrilldownViews
Docs: MCMS_API.md (field guide), the two 323-1961-30x dev-guide PDFs
See HANDOFF.md for architecture, the API gotchas, and status.
GUI-NOTES.md is early scaffold notes (historical — superseded by this README).