rouse-context/core
Jason Monk 491caaed91 Fix #91: Live-update authorized clients and recent activity in IntegrationManage
The IntegrationManage screen previously read tokens and audit entries via
one-shot calls inside a non-reactive refreshTrigger pipeline, so newly
approved clients and freshly logged tool calls did not appear until the
user left and re-entered the screen.

Make both sources reactive:
- Add `TokenStore.tokensFlow(integrationId)` for a live token list. Room
  implementation uses a new `@Query` Flow on `TokenDao`; the in-memory
  implementation tracks a change tick and re-emits on mutations.
- Add `TokenDao.observeByIntegration`, a Room Flow query that emits on
  every token-table change.
- Rewrite `IntegrationManageViewModel` to `combine` the tokens flow, the
  existing `AuditDao.observeByDateRange` flow, and `IntegrationStateStore
  .observeChanges`, so any of them triggers a recompute.
- Drop the now-redundant `refreshTrigger`; `refresh()` remains as a no-op
  for API compatibility.

Tests:
- New `IntegrationManageViewModelTest` asserts authorized-clients and
  recent-activity both update after the respective flow emits.
- Existing `IntegrationUrlTest` updated to stub the new flows.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 11:31:16 -04:00
..
bridge Fix #8: Reimplement ClientPassthroughTest 2026-04-11 11:42:59 -04:00
mcp Fix #91: Live-update authorized clients and recent activity in IntegrationManage 2026-04-13 11:31:16 -04:00
tunnel Fix #83: Wire CtLogMonitor into SecurityCheckWorker 2026-04-12 22:13:58 -04:00