Context
The dashboard maintains its own read-only SQLite layer in internal/store/reader.go (~300 LoC) that reimplements query logic already present in the ar SDK's store package. This was necessary because the SDK only exposes a read-write store, but it means:
- SDK improvements (e.g.
ByAction in Stats) must be manually ported
- Query behavior can drift between the SDK and dashboard
- Bug fixes in the SDK store don't flow through
A request for a read-only store interface has been filed upstream: agent-receipts/ar#45
What needs to change
Once the ar SDK ships a read-only store entry point:
- Replace
internal/store/reader.go with the SDK's read-only store
- Remove duplicated types (
ReceiptRow, ChainSummary, Stats, Filter) in favor of SDK types
- Keep any dashboard-specific presentation logic (e.g.
ReceiptRow as a list-view projection) as a thin adapter if needed
- Update tests to use the SDK store directly instead of the custom reader
- Verify read-only enforcement still holds
Blocked on
Context
The dashboard maintains its own read-only SQLite layer in
internal/store/reader.go(~300 LoC) that reimplements query logic already present in the ar SDK'sstorepackage. This was necessary because the SDK only exposes a read-write store, but it means:ByActioninStats) must be manually portedA request for a read-only store interface has been filed upstream: agent-receipts/ar#45
What needs to change
Once the ar SDK ships a read-only store entry point:
internal/store/reader.gowith the SDK's read-only storeReceiptRow,ChainSummary,Stats,Filter) in favor of SDK typesReceiptRowas a list-view projection) as a thin adapter if neededBlocked on