Skip to content

fix/feat: pagination, telemetry, oracle staleness tests, and hero overflow fix - #1072

Merged
leojay-net merged 1 commit into
leojay-net:mainfrom
Nanle-code:fix/issues-586-1005-1019-1022
Jun 29, 2026
Merged

fix/feat: pagination, telemetry, oracle staleness tests, and hero overflow fix#1072
leojay-net merged 1 commit into
leojay-net:mainfrom
Nanle-code:fix/issues-586-1005-1019-1022

Conversation

@Nanle-code

Copy link
Copy Markdown
Contributor

Closes #586
Closes #1005
Closes #1019
Closes #1022

Changes

#1022 fix(frontend): LandingPage hero overflow at 320px

Hero text now wraps gracefully at all viewport widths from 320px upward.

  • Replaced fixed text-5xl/text-7xl with responsive text-3xl sm:text-5xl md:text-7xl
  • Added w-full px-4 and break-words to the hero container and heading
  • Changed section overflow-hidden to overflow-x-hidden

#1005 feat(frontend): infinite scroll pagination for ChatHistorySidebar

  • Initial load capped at 20 sessions
  • IntersectionObserver sentinel at the bottom of the list auto-triggers
    the next page when scrolled into view
  • Spinner shown while loading; fallback "Load more" button rendered if
    no more sessions are intersecting

#1019 test(contract): oracle staleness threshold tests

  • Added TimestampedPrice struct to oracle.rs with is_fresh(current_ledger, max_age_ledgers)
  • New test_oracle_staleness.rs module with 8 tests covering:
    • Price within freshness window → accepted
    • Price one ledger before window end → accepted
    • Price one ledger past window end → rejected
    • Very old price → rejected
    • Exact boundary (age == max_age) → accepted (fence-post)
    • One past exact boundary → rejected
    • Zero-threshold fence-post
    • Clock-skew saturation guard (recorded_at > current_ledger)

#586 feat(frontend): telemetry tracking in useBridgeStats

  • Dispatches a bridge_stats_telemetry CustomEvent on: mount, unmount,
    fetch success, fetch error, and manual refresh
  • Hook now exposes fetchCount and lastFetchedAt
  • 9 unit tests in useBridgeStats.test.ts verify all telemetry events
    and fetch behaviours with no regressions to existing UI consumers

Testing

  • Frontend unit tests: pnpm test:unit (vitest, jsdom)
  • Rust tests: cargo test -p stellar-contracts — zero new errors introduced
    (91 pre-existing failures in unrelated test.rs exist on main unchanged)

leojay-net#1022

leojay-net#586 feat(frontend): add telemetry tracking to useBridgeStats.ts
- Dispatch CustomEvent 'bridge_stats_telemetry' on mount, unmount,
  fetch success, fetch error, and manual refresh
- Expose fetchCount and lastFetchedAt from the hook
- Add unit tests verifying all telemetry events and fetch behaviours

leojay-net#1005 feat(frontend): add pagination to ChatHistorySidebar
- Initial load capped at 20 sessions (down from 60)
- IntersectionObserver sentinel at bottom of list triggers next page
- Spinner shown while loading; fallback 'Load more' button for
  browsers without IntersectionObserver
- Removed old scroll-snapshot logic superseded by sentinel

leojay-net#1019 test(contract): add oracle staleness threshold tests
- Add TimestampedPrice struct to oracle.rs with is_fresh() helper
- New test module test_oracle_staleness.rs covering:
  - Price well within freshness window accepted
  - Price one ledger before window end accepted
  - Price one ledger past window end rejected
  - Very old price rejected
  - Exact boundary (age == max_age) accepted
  - One past exact boundary rejected
  - Zero threshold fence-post
  - Saturation guard for clock-skew edge case

leojay-net#1022 fix(frontend): hero section overflow on 320px viewport
- Add w-full and px-4 to hero content container
- Replace fixed text-5xl/text-7xl with responsive text-3xl/sm:5xl/md:7xl
- Add break-words to heading to prevent overflow clip
- Change section overflow-hidden to overflow-x-hidden to preserve
  vertical scroll
@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@Nanle-code Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@leojay-net
leojay-net merged commit 040f40c into leojay-net:main Jun 29, 2026
3 of 6 checks passed
leojay-net added a commit that referenced this pull request Jul 25, 2026
fix/feat: pagination, telemetry, oracle staleness tests, and hero overflow fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants