Skip to content

Expose TTL keeper actions in the frontend (renew-lease button + keeper status) #4

Description

@gbengaeben

Category: Frontend UX | Priority: Medium | Dependencies: none | Out of scope: moving the keeper into the frontend (stays backend); notifications (own issue)

Description & Context: SDK helpers bumpStreamTtl/bumpContractTtl exist but nothing calls them from the UI. Judges can't see the TTL story, and users have no fallback if the backend keeper is down.

Acceptance Criteria / DoD:

  • New getRemainingTtl(streamId) in frontend/src/lib/contracts/stream-core.ts (reads the stream entry's liveUntilLedgerSeq via RPC getLedgerEntries, converts to an estimated days-remaining)
  • Stream card shows a "Renew lease" button, disabled unless remaining TTL < 30 days, calling bumpStreamTtl; result surfaced via decodeSorobanError
  • Dashboard footer shows last keeper pass from GET {BACKEND_URL}/status: ok/degraded + lastPass.ts, refreshed on an interval; degraded renders a warning banner
  • tsc -b clean; reuses the error-decoder unit tests from the frontend-testing issue

How to verify: Against Testnet: create a stream, lower the TTL threshold via env, confirm the button appears and a bump tx lands; stop the keeper and confirm the degraded banner within one refresh interval.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendFrontend (React/Vite/TS)uxUser experience

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions