Three pieces, one PR:
1. `.claude/rules/ux-changes.md` — auto-loaded rule listing change categories
that require explicit user approval before implementation, plus a
decision-log entry. Filing an issue with a ranked recommendation is
explicitly NOT approval.
2. `docs/ux-decisions.md` — append-only log of UX flow decisions. Seeded
with the #389 cert-provisioning-at-Continue decision, retroactively
approved (was originally landed unilaterally; this rule + log exist
so that cannot recur).
3. `docs/internal/flows/index.html` — onboarding flow page composed of
existing roborazzi screenshots, wired together with action labels +
error-branch screens (Rate limited, Failed). Linked into the existing
internal dashboard as a new Flows tab.
The motivating incident: #389 moved cert provisioning from "first
integration add" to "right after Continue, before Home". That is a real
UX timing change that an agent picked unilaterally based on a ranked
recommendation in the issue body. The user spotted the change after the
fact ("immediately after the notifications screen its showing
registering, before any integrations are set up") and asked for a
structural check that survives across Claude sessions, not just a memory
entry.
Auditted every production log site in Kotlin and Rust against the
sensitivity list in #379. Two real leaks found and fixed; a logging
policy is documented and a CI grep gate catches known-bad patterns in
future PRs.
Scrubbed:
- `OnboardingViewModel`: was logging 20-char prefixes of the Firebase
ID token and the FCM token. Both are bearer credentials and `logcat`
is reachable via adb / `READ_LOGS` on older Android, so even prefixes
are sensitive. Replaced with length-only summaries.
- `relay/src/main.rs` connection handler: the "Routing decision" log
used `?decision` (Debug format) on `RouteDecision`, which includes
the `integration_secret` string on `DevicePassthrough`. That secret
is the bearer credential an AI client presents in the SNI label to
route to a specific integration -- logging it defeats the point.
Added a `route_decision_log` helper that renders the variant plus the
subdomain (public routing identity) without the secret.
Everything else on the priority list (McpRouting, RoomTokenStore,
CertRenewalScheduler/Worker, AcmeClient, TunnelClientImpl, MuxDemux,
FcmReceiver, relay main/tls/ws) was already scrub-clean: they log
state transitions, counts, durations, error types, and the relay's
operational subdomain -- never tokens, bodies, tool-call arguments,
cert material, or secrets.
Regression protection:
- CI grep gate in `.github/workflows/ci.yml` fails the build if known
bad patterns (`Log.<level>(... "$token"` etc., `args: $...`) appear
in Kotlin production sources.
- `docs/internal/logging.md` documents what we log, what we don't,
and how to add new log lines safely.
Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
* Tighten variant 7 time right-edge (4dp end padding)
The user felt the pill in variant 7 looked like it had extra padding
to its right. The cause is optical: the pill has 8dp internal
horizontal padding, so its inner text ends ~9dp left of its outer
border. The time text below had no end padding, so its last glyph
sat at the row's full right-inset edge — making the time read as
"further right" than the pill's text.
Adding 4dp of end padding to the time pulls its glyph inward to
partially match the pill's internal right inset, bringing the two
text right-edges closer optically.
Only variant 7's time is touched; production ToolCallRow and
ListRow are unchanged.
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
* Fix#366: Land variant 7 in production ToolCallRow and drop preview scaffolding
Ships the winning audit-row design (variant 7 from the #343 preview review,
tuned in #363 / #365) into the production audit history screen, wiring the
real `AuditEntry.clientLabel` added in #344 through the ViewModel and
rendering it as a right-aligned client pill on row 1 with the call time
stacked directly below. Rows whose `clientLabel` is null (predate the
schema v3 -> v4 migration) omit the pill entirely rather than render a
placeholder that would collide with the real `Unknown (#N)` labels the
[UnknownClientLabeler] produces (#345).
Extracts `ClientPill` as a shared composable in `ui/components/` so the
pill is now part of the app's real design language — not a preview helper.
Deletes the preview scaffolding (`AuditRowVariants.kt`,
`AuditRowVariantsScreenshotTest.kt`, `AuditRowCatalogHtmlWriter.kt`, the
`app/screenshots/audit-row-variants/` directory, and
`docs/internal/audit-row-variants/index.html`), removes the corresponding
tab from the unified internal dashboard (#348) and drops the matching
copy step from `pages.yml`.
Regenerates the four audit-screen Roborazzi goldens
(`34_audit_history_populated_*`, `36_audit_history_filtered_*`,
`36a_audit_history_show_all_mcp_messages_*`) with representative
clientLabel values (short, long, null, and `Unknown (#1)`) so the pill
behaviour is visible across all three length classes.
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
* Fix#347: Client-subject notification copy + deep-link taps + Manage action
Rewrite per-tool-call and session-summary notification copy per the locked
#342 design, wire up notification tap deep-links, and add a Manage action
button.
Per-tool-call notifications now read "${clientLabel} used ${humanized(toolName)}"
with the integration display name as body and the call timestamp rendered
natively via setWhen(). Session-summary notifications partition by client
label and emit one notification per client titled "${clientLabel} used
${count} ${tool|tools}" with up to 3 unique humanized tool names in the
body (Oxford comma, "and N more" past the cap).
Tap deep-links route to the audit-history screen — scrolled to the
specific call (per-tool-call) or filtered to the session time window
(summary) — and a single Manage action button points at the integration
manage page (or home, when a summary's calls span multiple integrations).
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
* Update integration tests for per-client summary notification ids
#347 changed SessionSummaryNotifier from a single-id summary to one
notification per client, keyed by the clientLabel hash. The existing
:app:integrationTest fixtures still asserted against the legacy
SessionSummaryNotifier.NOTIFICATION_ID constant, so they failed in CI.
Updated each affected test to compute the expected id via
SessionSummaryNotifier.idForClient(<clientLabel>) and dropped the
now-unused NOTIFICATION_ID companion constant. The InMemoryTokenStore
resolves clientName=null to the clientId, so for tests that pass
clientName=null the expected label is their clientId string (e.g.
"race-test", "multi-test", "runtime-mode-switch"). ToolCallHappyPathTest
passes clientName = "Test Client" explicitly.
Also retargeted the MultiToolSessionTest title-string assertion from the
old "{count} calls across {N} integrations" copy to the new
"{clientLabel} used {count} tools" title shape.
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
* Move summary notification id bucket below per-call range
The previous summary id bucket (6000..15999) overlapped with
PerToolCallNotifier.BASE_ID = 7000, so any clientLabel whose hash
.mod(10000) landed in 1000..9999 produced an id that collided with
per-call notifications. RuntimeNotificationModeSwitchTest failed in CI
because its clientLabel "runtime-mode-switch" hashes to
idForClient(...) = 7465, which the test's "id >= PerToolCallNotifier.BASE_ID"
probe flagged as a per-call notification during phase 1 (SUMMARY mode).
Narrow the bucket to 4000..4999 so summary ids stay clear of the per-call
range. Collisions inside the 1000-entry bucket remain acceptable for the
expected <100-clients-on-a-device cardinality.
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
* Add audit row variant 7 (pill top-right, time below)
Extends the #343 design-review catalog with a seventh client-label
placement option: the client pill sits alone at the top-right of row 1
and the timestamp right-aligns on row 2 directly beneath it. Unlike
variant 3, which packs the pill and time together on row 1, this layout
keeps the pill prominent without crowding the time next to it.
Preview-only; production `ToolCallRow` and `AuditEntry` are unchanged.
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
New docs/internal/index.html embeds the four design-review catalogs
(notifications, app UI, OAuth auth pages, audit row variants) behind
client-side tabs. Tab state is mirrored in the URL hash so deep-links
and reloads land on the expected tab. Iframes lazy-load on first
activation.
Extends .github/workflows/pages.yml:
- Broadens the paths trigger to cover docs/screenshots/**,
docs/auth-pages/**, and all of app/screenshots/** (not just the
audit-row-variants subdir).
- Copies docs/internal/ into _site/internal/ first so the landing
and its sibling audit-row-variants catalog are in place, then the
per-catalog copies overlay notifications/, app/, and auth/ without
clobbering the landing's index.html.
- Adds copy steps for the app UI gallery (HTML to /internal/app/,
PNGs to /app/screenshots/ to match the HTML's ../../app/screenshots
references) and the OAuth auth-pages catalog (/internal/auth/).
Simulated locally by reproducing the pages.yml copy sequence and
serving via python3 http.server: all four tabs fetch 200, sampled
image and child-HTML URLs resolve.
Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
Produces six candidate layouts for the audit history's ToolCallRow so the
client-label placement decision (#342) can be approved against actual
screenshots. Each variant renders three client-label length classes
(short, long, unknown) in both light and dark theme, publishing the
catalog to rousecontext.com/internal/audit-row-variants/ via the existing
Pages workflow.
- New `AuditRowVariants.kt` preview composables for:
1. Third row, full-width client label
2. Second-row prefix (`Claude . 142ms . {args...}`)
3. Right-aligned pill between tool name and time
4. Leading colored initial chip
5. Session-grouped header (client shown once per session)
6. Variant 1 + Variant 5 combined
- Roborazzi screenshot test writes to
`app/screenshots/audit-row-variants/` and emits the catalog HTML to
`docs/internal/audit-row-variants/index.html` via a `@ClassRule` mirror
of `NotificationCatalogHtmlWriter` from #335.
- Pages workflow path trigger extended to include `docs/internal/**` and
`app/screenshots/audit-row-variants/**`; new copy step serves the
catalog and its screenshots under `/internal/audit-row-variants/`.
Production `ToolCallRow` at `AuditHistoryScreen.kt:413` is not modified;
`AuditEntry.clientLabel` is not introduced. Both are deferred to the
follow-up that implements the chosen variant after design review.
Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>