Reference Production

Current State

Current shipped behavior and known remaining gaps.

Host
docs.bagels.top
Source
documentation/reference/current-state.md
Updated
2026-04-15

Current Product State

This document is the current-source-of-truth snapshot for the AspectAvy platform as of April 14, 2026.

For remaining work, start with development/v1-remaining-milestones.md, then use development/handoff-next-chat.md, development/follow-up-backlog.md, and development/manual-validation-remaining.md as the detailed source material.

Repo Shape

aspectavy-platform is the backend/platform continuity repo after the split.

Most sections below still describe cross-product behavior because this repo owns the canonical API, admin, hosted docs, and contract surfaces. When older references point at the previous monorepo iOS paths, treat them as historical pointers into the extracted aspectavy-ios repo.

What Works Today

Core app shell

- Map - Library - Safety - Profile - dedicated Search

Authentication, account, and settings

Forecast-first map

Tools and checklist flows

- Trailhead Checklist - Drop-In Checklist - Inclinometer

Routes, plans, and tracks

Offline

Shared Data Spine And Apple Edge Foundations

Backend

- /api/user/forecast-overrides - PUT /api/user/forecast-overrides/:zoneID - DELETE /api/user/forecast-overrides/:zoneID

- user-routes.ts now serves as an orchestration entrypoint over profile, avatar, account, forecast, favorite-zone, and safety-contact route modules. - auth-platform-routes.ts owns auth entry, elevation, invite creation, push-device registration, and provider webhook/platform integration routes. - route-management-routes.ts owns route CRUD, route-plan CRUD and shared-copy flows, work sessions, sync, import/export, and search routes. - route-intelligence-routes.ts owns route exposure, readiness, trip safety, decision logs, trip observations, debrief, and AI assistant routes. - public-content-routes.ts and admin-routes.ts now also act as orchestration entrypoints over smaller route modules grouped by public edge surface and admin domain.

- GET /api/user/forecast-override-history - GET /api/user/support-summary - GET /api/user/settings and PUT /api/user/settings now return both settings and typed metadata

What Has Been Manually Validated

The local rewrite has already been validated for:

See development/manual-validation-remaining.md for the remaining unvalidated slices.

Known Gaps Or Open Areas

These are the important remaining gaps, not already-fixed bugs:

- the backend owns POST /api/analytics/events, typed event validation, forbidden-key rejection, and the Aptabase-backed sink adapter seam - hosted staging and hosted production now support separate Aptabase app keys so QA traffic can stay isolated from production analytics - signed-in user settings persist the anonymous analytics preference through the shared backend contract, while signed-out state keeps a local fallback - iOS now has a typed analytics client, reducer-driven instrumentation for the key shipped product flows, and a developer-tools analytics diagnostics surface

- forecast quick-brief and route-plan briefing refinement use Foundation Models when available and fall back to the existing backend-owned briefing payloads when not - natural-language search interpretation now narrows canonical /api/search queries instead of acting as a second search system - decision-log, observation, and debrief drafting assistance now use structured on-device responses with deterministic heuristic/backend fallbacks - shared or hosted AI remains intentionally out of scope for V1

- MapFeature.swift now uses grouped camera/search storage and delegates presentation/view handling into MapFeature+PresentationReducer.swift, MapFeature+ViewReducer.swift, and the later dedicated helper modules under Features/Map - MapView.swift remains a thin entry surface, and the former monolithic map-content file is now split into MapView+Presentation.swift, MapView+Chrome.swift, MapView+BottomContent.swift, and MapView+Helpers.swift

- live-location, recenter, and tracking-runtime handling now route through MapFeature+LocationReducer.swift instead of staying inline in MapFeature.swift - the tracking-runtime helpers moved into MapFeature+LocationHelpers.swift, which makes the existing LocationState in MapFeature.swift a real ownership seam instead of placeholder structure only

- chrome and tool-launch view actions now route through MapFeature+ChromeReducer.swift instead of staying mixed into MapFeature+ViewReducer.swift - forecast/detail/paywall/offline-map presentation builders and override-coordination helpers now live in MapFeature+PresentationHelpers.swift

- camera updates plus search UI actions and search-response state now route through MapFeature+SearchCameraReducer.swift - centered-zone resolution, camera-focus updates, and recenter fallback helpers now live in MapFeature+CameraHelpers.swift instead of the generic helper bucket

- shared-link entry points and shared-content result handling now route through MapFeature+SelectionPresentationReducer.swift - shared-route and shared-plan loading helpers now live in MapFeature+SelectionPresentationHelpers.swift, and selection-driven route-detail opening no longer sits in the generic view switch

- selection-related storage now lives in MapFeature.State.SelectionState inside MapFeature.swift, including selected map hits and selected-zone ownership - MapEngineState no longer owns selectedMapHit, which narrows engine state back toward rendering and runtime concerns while keeping selection semantics in the map reducer

- route-draft and tracking-task storage now lives in MapFeature.State.TaskState inside MapFeature.swift, including draft persistence IDs, active work-session IDs, route-draft content, tracking content, route-draft launch prompting, and field-presentation state - the map shell keeps compatibility accessors for routeDraft, tracking, routeDraftStartPrompt, and related task fields, so current reducers and views preserve behavior while task ownership moves out of the top-level state bucket

- route-content coordination storage now lives in MapFeature.State.RouteContentState inside MapFeature.swift, including popular-route exposure loading state, popular-route exposure content, exposure errors, and showcased routes - selection ownership is now narrower and cleaner, while current reducers and views keep working through compatibility accessors during the larger map-shell refactor

- broader map-content coordination now lives in MapFeature.State.ContentState inside MapFeature.swift, grouping forecast snapshot state, offline region content, selection state, and route-content state behind one map-content boundary - forecast loading/offline content concerns are no longer scattered directly across the top-level map state bucket, while compatibility accessors keep the active reducers and views behavior-stable

- modal and full-screen map presentations now flow through the owned MapFeature.Presentation child reducer instead of twelve separate top-level action cases in MapFeature.swift - the root reducer now receives one presentation coordinator action surface, while MapFeature+PresentationReducer.swift handles only the parent-level delegate bridge back into map state and side effects

- map-hit handling, selection actions, popular-route exposure refresh, and forecast/offline content responses now route through MapFeature+ContentReducer.swift - the related content helpers moved into MapFeature+ContentHelpers.swift

- route-draft and tracking workflows now route through MapFeature+TaskReducer.swift, which pulls route-draft, tracking, and work-session coordination out of the root reducer and generic view switch - the remaining mixed helper bucket is gone: bootstrap helpers now live in MapFeature+BootstrapHelpers.swift, offline helpers in MapFeature+OfflineHelpers.swift, task/work-session helpers in MapFeature+TaskHelpers.swift, and route/plan/offline camera focus helpers in MapFeature+CameraHelpers.swift

- browse-mode location authorization now loads at map bootstrap, and browse mode can run its own light user-location stream independently of tracking runtime through MapFeature+LocationHelpers.swift - the recenter control now requests when-in-use authorization when needed, waits for the first available fix, and centers on actual user location through MapFeature+LocationReducer.swift and MapFeature+CameraHelpers.swift instead of resetting to content selection - a shared AppPermissionClient.swift now reports centralized permission snapshots for location, notifications, camera, and motion - PermissionCenterFeature.swift and PermissionCenterView.swift now provide a shared Permissions & Access surface from both Settings and Developer Tools - the cartography prototype surfaces now live under Developer Tools > Cartography Lab through CartographyLabFeature.swift, CartographyLabView.swift, and AppDebugPanelView.swift instead of a map-chrome-only debug affordance - this closes the current map-shell decomposition milestone

- AppServices is now organized by domain folders instead of one flat source root, which restores readable ownership boundaries for backend, auth, commerce, forecast, routes, safety, account, location, and storage seams - the remaining high-duplication clients now route through the shared validated transport helpers in BackendJSONTransport.swift and BackendUserRoute.swift, including route-readiness, route-exposure, trip-session, decision-log, AI briefing, favorite-zones, and home-summary calls - the package overview doc is now current in AppServices.md, and focused transport seam coverage now exists in BackendJSONTransportTests.swift

Current Runtime And Dev Constraints

Simulator and local backend

Local secrets

- apps/ios/AspectAvy/Config/LocalSecrets.xcconfig

- apps/ios/AspectAvy/.xcode-cloud - apps/ios/AspectAvy/ci_scripts

Testing and CI status

- ios-architecture.md - ios-security-and-data-handling.md

- xcodebuild build -project apps/ios/AspectAvy/AspectAvy.xcodeproj -scheme 'AspectAvy Local' ...

- xcodebuild test -project apps/ios/AspectAvy/AspectAvy.xcodeproj -scheme 'AspectAvy Local' ...

Remaining noisy logs

Some runtime noise is still expected during simulator development:

These are not currently treated as blockers.

App-generated startup and forecast noise is lower now: