Inventory of every .md under docs/, plus top-level README.md and
BLOCKERS.md. Classifies by audience (user/engineering/contributor/
historical) and accuracy (current/partially stale/rewrite/delete).
HTML files under docs/ also called out.
Output is a file — the rewrite/cleanup work becomes follow-up issues
per doc. No docs were rewritten, moved, or deleted in this pass.
Extract the hardcoded "rousecontext.com" base domain to a single Gradle
property (`-Pdomain`) that flows through BuildConfig to all Kotlin call
sites, and to a matching optional config field on the Rust relay. A fork
can now point a deployment at their own domain by setting one value.
Kotlin:
- New `BASE_DOMAIN` buildConfigField in :app, driven by `-Pdomain`
Gradle property (default "rousecontext.com"). `RELAY_HOST` derives
from it unless `-Prelay.host` is set explicitly.
- `McpUrlProvider` default reads `BuildConfig.BASE_DOMAIN`.
- `AppModule` session hostname uses `BuildConfig.BASE_DOMAIN` directly
instead of stripping "relay." from `RELAY_HOST`.
- `CertProvisioningFlow` / `CertRenewalFlow` / `CtLogMonitor` accept
base domain via constructor (still with a safe default so tests don't
need to change).
Rust relay:
- New `base_domain` field on `ServerConfig`. Empty (default) means
"derive by stripping 'relay.' from relay_hostname" -- the existing
convention. Operators with non-conforming hostnames can set it.
- `ServerConfig::resolved_base_domain()` helper centralizes the lookup.
- `RELAY_BASE_DOMAIN` env var override.
- Removed duplicate `strip_prefix("relay.")` logic in main.rs, api/register.rs,
api/renew.rs in favor of the helper.
Docs:
- `docs/self-hosting.md` walks through Cloudflare + Firebase + keystore
setup, Android build with `-Pdomain=...`, Rust relay cross-compile and
systemd deployment, and verification steps.
Test fixtures (test-only hostnames like "test.rousecontext.com",
@Preview composables, e2e helpers) remain as-is -- they're load-bearing
assertions about the URL format, not deployment-specific constants.
Verified:
- ./gradlew :app:compileDebugKotlin ktlintCheck :app:testDebugUnitTest
- ./gradlew -Pdomain=example.com :app:compileDebugKotlin (BuildConfig
shows BASE_DOMAIN="example.com", RELAY_HOST="relay.example.com")
- ./gradlew -Pdomain=example.com :app:testDebugUnitTest (still green)
- cd relay && cargo test && cargo clippy
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Follow-up to #78 cleanup. The code for NotificationModel was deleted
but implementation-specific references remained in other docs:
- docs/design/overall.md: rename section heading from
"NotificationModel + audit" to "notification behavior + audit"
- docs/test-coverage-audit.md: drop NotificationModelTest row and
update file count from 7 to 6
- docs/notifications/index.html: remove "/ NotificationModel.kt"
from source references (hand-written HTML, not generated)
Historical planning references in docs/workflow.md describing the
original T-7 plan are left intact.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The notifications-package NotificationModel state machine was never wired into
production code — only its own unit test referenced it. Its companion
NotificationSettings data class is exclusively used by NotificationModel (the
real per-user notification settings live in :api as a separate type). Delete
all three files.
Also prune design-doc claims in android-app.md that described the deleted
state machine as the implementation; leave high-level notification architecture
intact.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Each integration gets its own hostname with the format
{adjective}-{integration}.{subdomain}.rousecontext.com/mcp
so Claude can't confuse integrations that share a host.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rewrite README to lead with the project vision and current status.
Add design doc for secret URL prefix scheme that prevents bots from
waking devices without knowing a rotatable secret.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The embedded PNG data was truncated by 19 bytes, causing a broken
image. Regenerated from ic_launcher_96.svg.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All 86 Roborazzi screenshots (43 screen variants x light/dark) are now
up to date with the shared DesignSystem components and visual changes.
- Add AuditDetailScreen screenshots (loading + populated states)
- Add TestApplication for Robolectric to avoid Koin/WorkManager init
- Fix SettingUpVariant.FirstTime() call (now a data class, not object)
- Remove 30 stale screenshots from the old naming scheme
- Remove obsolete dashboard.html
- Update gallery index.html with new Audit Detail section (9 categories, 43 variants)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The vector drawable foreground was too complex (525 circle paths) and
didn't render correctly. Now uses rasterized PNGs at all density
buckets for both foreground and background adaptive icon layers.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Builds real Android Notification objects from production code and renders
them via a test-only NotificationCard composable that mimics the system
notification shade. Captures light and dark variants of all 18 notification
types across foreground, auth, session, error, security, and outreach
channels. Adds Compose and Roborazzi test dependencies to the notifications
module and integrates screenshots into the existing HTML notification catalog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Generate static HTML for each auth page state (waiting, approved,
denied, expired) and an iframe gallery at docs/auth-pages/index.html.
Tests verify content correctness and that generated variants don't
poll the network. Made buildAuthorizePage() internal for test access.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Navy background preserved, foreground sun pattern tinted:
gray (idle), green (connected), blue (active/session), red (auth/error),
orange (security), purple (outreach).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
HTML catalog styled as Android notification cards showing every
notification the app sends: foreground service (6 states), auth
requests, session activity, errors, security alerts, AI outreach.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests on the Pixel 3 XL via ADB: onboarding, tunnel, OAuth, tool calls,
integration setup, audit, notifications, UI screenshots, idle/reconnect.
Generates a test report at docs/device-test-report.md.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Device now gets its relay URL from BuildConfig at compile time, so
FCM payloads no longer need to carry relay_host or relay_port. Updated
all design docs to reflect the simplified payloads.
Added RealFcmClient to relay/src/fcm.rs with a configurable base_url
so the device test framework can point the relay at a fake FCM server
via the FCM_BASE_URL env var.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New task T-11 in Phase 3: self-cert verification + CT log monitoring.
Covers SelfCertVerifier, CtLogMonitor, SecurityCheckWorker, and
CertificateStore fingerprint additions. Depends on T-5 and T-7.
Renumbered: old T-11→T-12, T-12→T-13, T-13→T-14, T-14→T-15, T-15→T-16.
Updated branch names, test ID references, and phase description.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two complementary mechanisms for user-verifiable trust:
- Self-cert verification: app connects to its own subdomain and checks the
TLS leaf cert fingerprint against what it provisioned (handles renewal
window with dual-fingerprint acceptance)
- CT log monitoring via crt.sh: detects any cert issued for the subdomain
that the app didn't issue, defeating targeted MITM attacks
- CAA record requirement documented for production DNS zone
- Trust status UI component for Settings screen (verified/warning/alert)
- 9 new test scenarios (45-53) covering both monitoring mechanisms
Changes across 4 design docs:
- overall.md: new Security Monitoring section + test scenarios, renumbered
all subsequent scenarios (old 45-265 → 54-274)
- tunnel-client.md: CertificateStore additions, implementation details for
both self-check and CT monitoring, WorkManager scheduling
- android-app.md: trust status UI spec, alert behavior, new preferences
- relay.md: CAA record configuration for rousecontext.com DNS zone
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Renumbered test scenarios 103-189 (was 99-185 with duplicates at 99-102)
- 189 total test scenarios, sequential with no gaps or duplicates
- Added missing AuditListener Koin binding (RoomAuditListener) in app doc
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- 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>
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>
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>
- 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>
App doc showed creating a new McpSession per stream with a static list.
Updated to match overall.md: McpSession is a shared singleton taking
ProviderRegistry and TokenStore, with run() called per stream.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Addresses findings from thorough design review across all docs:
- Crypto: ECDSA P-256, SHA256withECDSA, Base64 DER for keys/signatures
- OAuth: device code TTL 10min, polling 5s, opaque tokens (no expiry)
- Cert renewal: two-stage (14 days proactive, 7 days relay-pushed warning)
- Expired certs rejected for mux — must renew via /renew endpoint first
- ACME: Let's Encrypt primary (50/week), rate limit handling with pending
queue, admin alerts, and device notification
- Subdomain rotation: once per 30 days, old invalidated, tokens revoked
- Max 8 concurrent streams per device (configurable)
- TunnelClient interface: added errors SharedFlow, TunnelError sealed class,
unified TunnelState enum with ACTIVE state
- FCM payload format specified (data-only, type/relay_host/relay_port)
- Disabled integration returns 404 + app notification
- 52 integration test scenarios covering all flows
- Cross-references between docs for mux wire format
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>