Commit graph

7 commits

Author SHA1 Message Date
Jason Monk
d2595ed091
Fix #406 final wave: ui.md drift fixes + relay.md endpoint pointer (#413)
ui.md (chunk C) — replace fictional CertStatus interface with real
OnboardingState (only two steps: Registering, ProvisioningCerts), drop
the "Connection Confirmed" screen and "Integration Settings
(integration-owned)" wireframe (neither exist in code), update the
Integration Enabled URL example to the per-integration-hostname format
(https://<integration-secret>.<subdomain>.rousecontext.com/mcp), redraw
the navigation flow to show the post-#389/#392 path
(Welcome → NotificationPreferences → onboarding?autostart=true → Home),
rename DeviceCodeApprovalViewModel to AuthorizationApprovalViewModel
and add rows for OnboardingViewModel, NotificationPreferencesViewModel,
and the four per-integration setup VMs, expand the screen catalog with
the missing screens (NotificationSetup/OutreachSetup/UsageSetup,
AllClients, AuditDetail). Add a top-of-doc note explaining the
Screen / Content / Destination split so readers know production
renders *Content via *Destination, with *Screen reserved for previews
and screenshot tests.

relay.md (chunk B) — fix mux frame numbering (DATA=0x00, OPEN=0x01,
CLOSE=0x02, ERROR=0x03) and add PING=0x04 / PONG=0x05 with the 8-byte
nonce on stream id 0; replace the wrong single-round /register and
single-body /renew Path A snippets with a high-level endpoint table
that defers to docs/design/relay-api.md for the canonical request /
response shapes; drop /wake/:subdomain (no such endpoint — FCM wakeup
is internal to passthrough on cache miss).

Refs #406. android-app.md "Still needs design" section reviewed; the
sole remaining item (third-party provider discovery) is genuinely
undesigned and a non-v1 future feature, so it stays.

Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
2026-04-25 18:49:10 -04:00
Jason Monk
cf0a98429d Move authorized clients into per-integration manage screen
- Removed global Authorized Clients screen and bottom nav tab
- Bottom nav is now 3 tabs: Home, Audit, Settings
- New Integration Manage screen (app-owned, /integration/{id}/manage):
  URL, recent activity, authorized clients, disable, settings link
- Integration Settings screen (integration-owned) reached via Settings
  button on Manage screen
- Dashboard taps Active/Pending → Integration Manage
- Updated navigation flow, ViewModel table, wireframes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 16:11:23 -04:00
Jason Monk
a357ade13b Fix consistency issues from per-integration auth changes
- Renumbered duplicate test IDs (69-70 appeared twice)
- Updated mcp-core OAuth test paths to use integration prefixes
  (/health/device/authorize, /health/token, etc.)
- Added test for cross-integration token rejection (91)
- Rewrote tests 168-173: removed stale isEnabled() references,
  now test IntegrationStateStore + ProviderRegistry + permission banners
- Fixed stale OnboardingFlow references in ui.md → onboardingRoute
- Authorized Clients screen now grouped by integration with per-integration
  revoke (matches per-integration TokenStore API)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 15:52:14 -04:00
Jason Monk
f4f501caf5 Per-integration auth, IntegrationStateStore, and gap analysis fixes
Major changes from final gap analysis:
- OAuth is now per-integration: each path has its own OAuth endpoints,
  device codes, and tokens. /health token can't access /notifications.
- TokenStore scoped by integrationId (validateToken, createToken, etc.)
- IntegrationStateStore: user-toggled enable/disable decoupled from
  platform permission checks. Backed by Preferences DataStore.
- NotificationSettingsProvider interface replaces static NotificationSettings
  in NotificationModel — settings changes take effect immediately
- DeviceInfo subdomain injected as StateFlow<String?> via Koin
- McpIntegration interface: added description field, removed isEnabled()
  (enabled state managed by IntegrationStateStore)
- Integration dashboard states derived: Available/Disabled/Pending/Active
  from IntegrationStateStore + TokenStore.hasTokens()
- CertStatus expanded with Onboarding sub-states (GENERATING_KEYS,
  REGISTERING, ISSUING_CERT)
- Device code approval shows integration name ("wants to access Health Connect")
- OAuth metadata per-integration (issuer = subdomain + path)
- Koin graph updated with new bindings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 15:36:54 -04:00
Jason Monk
bac3d10647 Refactor integration UI: own screens via Nav3 route registration
McpIntegration no longer injects Composables (OnboardingFlow, SettingsContent).
Instead, integrations register their own routes via registerNavigation() with
an app-provided prefix for uniqueness. Each integration owns its screens
entirely — the app just navigates to integration/{id}/setup or
integration/{id}/settings.

Updated Nav3 route table, Health Connect integration description, and UI
wireframes to reflect integration-owned detail/settings screens.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 15:12:23 -04:00
Jason Monk
86b873d31f Update UI design: integration detail screen, device code navigation rules
- Added Integration Detail screen (Active integrations: URL, recent
  activity, settings, disable button)
- Clarified device code navigation: auto-navigate ONLY from Integration
  Enabled screen, all other contexts use notification
- Multiple simultaneous auth requests: each posts notification, first-come
  first-served approval
- Pending integration tap: routes to Setting Up or Integration Enabled
  depending on cert state
- Added IntegrationDetailViewModel to ViewModel table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 14:58:08 -04:00
Jason Monk
762b24dd6d Add UI design doc: wireframes, navigation flow, ViewModels, integration states
Complete UI specification:
- 12 screens with ASCII wireframes (Welcome, Dashboard, Add Picker,
  Integration Setup flow (4 screens), Device Code Approval, Connection
  Confirmed, Audit History, Authorized Clients, Settings)
- Integration states: Available, Disabled, Pending, Active with transitions
- Cert status banners: None, Valid, Renewing, Expired, RateLimited
- Navigation flow map with all transitions
- ViewModel table with observables and key state
- Testing strategy: ViewModel unit tests, screenshot/preview tests,
  integration setup flow tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 14:44:24 -04:00