Skip to content

Replace custom store with SDK read-only store once available #14

@ojongerius

Description

@ojongerius

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:

  1. Replace internal/store/reader.go with the SDK's read-only store
  2. Remove duplicated types (ReceiptRow, ChainSummary, Stats, Filter) in favor of SDK types
  3. Keep any dashboard-specific presentation logic (e.g. ReceiptRow as a list-view projection) as a thin adapter if needed
  4. Update tests to use the SDK store directly instead of the custom reader
  5. Verify read-only enforcement still holds

Blocked on

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendGo server or store changesblockedWaiting on an external dependencyenhancementNew feature or requestsdk-alignmentUse or integrate with ar SDK capabilities — do not reimplement

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions