Skip to content

OB-049: Expose source health and market-data freshness #701

Closed

Description

@IbrahimIjai

Priority: P1 · Size: M · Area: market-data · Depends on: OB-005, OB-042

Scope: Track connection health, last message, last valid revision, and provider
timestamps separately. Derive fresh/stale/reconnecting/unavailable states without
treating a quiet but healthy market as a disconnection.

Acceptance criteria:

  • Heartbeats and source timestamps drive the agreed staleness policy, including clock-skew handling.
  • Tests distinguish no trades, dead transport, malformed updates, and a lagging provider; stale depth cannot seed an actionable quote.

Season context

Build a standard order book trading experience for SO4 on Stellar: a compact watchlist and market header, a large chart, an adjacent order book/recent-trades panel, a right-hand order ticket, and account tables below. Preserve SO4's brand and shared design tokens. Keep verified perpetuals capabilities; do not add Pro mode, EVM wallet connection, new margin modes, TWAP, or spot/perps transfers solely to imitate the reference layout.

An order book layout does not establish an executable order book. Matching, resting depth, partial fills, signing, and settlement need verified sources; account orders, oracle prices, pool liquidity, and illustrative data are not substitutes for executable depth. Preserve geometry during loading and live updates. Motion should clarify state changes, with reduced-motion, focus, touch, and interruption behavior included.

Extend the existing custom @workspace/ui/components/toast implementation; do not install Sonner or a second toaster. Use TanStack Query for scoped caching, targeted refresh, and explicit indexer catch-up after confirmed transactions.

Common completion rules

  • Follow AGENTS.md, including reproduction and regression
    coverage for bug fixes, the full ordered commit gate, and integration checks for
    web/indexer changes. Do not weaken checks. Dependency/build changes require the
    clean-room verification specified there.
  • Use existing components and named design tokens from
    packages/ui. Token changes include the corresponding
    DESIGN.md documentation. No parallel theme or toast system.
  • Use explicit MSW handlers for network tests. Include relevant success, empty,
    stale, and failure behavior; keep timers and streams deterministic. Visual work
    includes desktop/mobile and reduced-motion review, with relevant theme coverage.
  • Include a user-visible changelog entry when required by the repository's
    entry format. Documentation changes
    follow apps/docs/CONTRIBUTING.md.
  • Distinguish wallet approval, submission, ledger confirmation, order acceptance,
    execution/partial fill, and indexer catch-up. A transaction confirmation must
    never falsely imply that a resting order has filled.
  • Use targeted invalidation after confirmed changes, and explicitly handle
    inactive queries when their views next open. Invalidating an active query marks
    it stale and triggers background refetch; it does not prove an indexer has
    caught up. See TanStack Query invalidation.
  • Cache freshness and retention are separate choices. Define them by data class,
    rather than treating a long staleTime as a real-time strategy. See
    TanStack Query defaults.
  • Measure speed on the baseline device/network profile in OB-010. Initial field
    targets are p75 LCP ≤ 2.5 s, INP ≤ 200 ms, and CLS ≤ 0.1, reported separately
    for landing and trading and for mobile/desktop. Lab results are diagnostics,
    not a substitute for field percentiles. See Web Vitals.

Priority key: P0 = prerequisite/correctness; P1 = core experience; P2 = later polish. Size: S/M/L describes relative scope, not a delivery-time promise.

Activity

  1. thegeneraldeborah-dev commented on Sep 26, 2026

    @thegeneraldeborah-dev

    @thegeneraldeborah-dev has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hello, I’ve gone through the issue and understand the expected outcome. I’d be glad to work on this task and deliver an implementation that meets the requirements.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @thegeneraldeborah-dev to this issue.

  2. Yungmon22 commented on Sep 26, 2026

    @Yungmon22

    @Yungmon22 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hi maintainer, I have reviewed the issue requirements and consulted the relevant documentation. I am confident I can deliver an effective solution for this task. I would welcome the opportunity to discuss my proposed approach beforehand, should that be useful before I begin.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Yungmon22 to this issue.

  3. chief197 commented on Sep 26, 2026

    @chief197

    @chief197 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hello boss, kindly assign me

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @chief197 to this issue.

  4. precious-akpan commented on Sep 26, 2026

    @precious-akpan
    Contributor

    @precious-akpan has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hello team, I want to resolve this issue.

    Thanks!

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @precious-akpan to this issue.

  5. drips-wave commented on Sep 26, 2026

    @drips-wave

    Congratulations, @precious-akpan! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.

    🧑‍💻 @precious-akpan: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  6. grantfox-oss commented on Sep 27, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @precious-akpan's PR #818 was approved and merged by @IbrahimIjai.

    🏆 @precious-akpan: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (799 total points). Track your full progress on GrantFox.

    👏 Great work, @precious-akpan! Keep contributing to SO4-Markets.

  7. drips-wave commented on Sep 27, 2026

    @drips-wave

    This issue has been completed by @precious-akpan as part of the Stellar Wave Program's 9th Wave 🥳

    😎 @precious-akpan: You earned 200 Points for completing this issue! After the current Wave ends, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

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

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions