mirror of
https://github.com/Monkopedia/rouse-context.git
synced 2026-11-30 12:02:15 +00:00
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> |
||
|---|---|---|
| .. | ||
| bridge | ||
| mcp | ||
| tunnel | ||