Skip to content

feat: implement scheduled Q&A sessions, risk disclosure gate, and portfolio benchmark comparison, share image card - #1466

Merged
Chucks1093 merged 1 commit into
accesslayerorg:devfrom
parkerwinner:fix/issues-1453-1458-1460
Nov 23, 2026
Merged

Chucks1093 merged 1 commit into
accesslayerorg:devfrom
parkerwinner:fix/issues-1453-1458-1460

Conversation

@parkerwinner

Copy link
Copy Markdown
Contributor

Build scheduled holder Q&A sessions with question submission and voting:

  • Add useQaSession(id, wallet) hook with 15-second polling during live sessions
  • Session status (upcoming / live / ended) derived from startTime + durationMinutes so the UI always shows an accurate countdown without a separate server call
  • AskQuestion mutation enforces 200-character limit and one open question per holder to prevent flooding; throws descriptive errors surfaced to the UI
  • Vote mutation enforces one vote per holder per question using per-wallet vote sets stored in localStorage with backend sync path ready
  • Answer mutation is creator-only by convention; marks question answered and moves it to the answered tab returned as a separate sorted list
  • Non-holders can read questions and vote count but ask/vote actions are disabled when the wallet does not meet the session holderRequirement

Add risk disclosure acknowledgement gate before first trade:

  • Add useRiskAcknowledgement(wallet) hook storing acknowledgement with version and timestamp per wallet in localStorage with backend sync path ready
  • CURRENT_DISCLOSURE_VERSION constant makes it trivial to bump the version and force re-acceptance across all connected wallets on next load
  • needsAcceptance boolean gates trading actions: components check this before allowing buy/sell operations and render RiskDisclosureModal when true
  • isCurrentVersionAccepted distinguishes first-time users from users who accepted an older version, so a new version prompts acceptance again
  • acceptedVersion and acceptedAt exposed for the settings page disclosure section
  • Hook is wallet-scoped so each address gets its own independent acceptance record

Add portfolio performance comparison against benchmark baskets:

  • Add useBenchmarks(range, wallet) hook returning three indexed benchmark series: equal-weight market basket, top-10-by-volume basket, and XLM hold
  • All series normalised to 100 at the start of the selected range (7D/30D/90D/All) so direct visual comparison is meaningful regardless of absolute price levels
  • Portfolio series derived from usePortfolioHistory and normalised to same baseline
  • Time-weighted return approach: portfolio history values already account for deposits and withdrawals so raw PnL figures are not distorted by cash flows
  • Summary object provides totalReturn, per-benchmark diff, and best/worst key derived from priceChange24h for the summary cards rendered on the portfolio page
  • Changing the range regenerates date arrays and re-normalises all series in one useMemo pass so chart and summary cards stay in sync without extra fetches

Closes #1453
Closes #1458
Closes #1460
Closes #1461

…tfolio benchmark comparison (accesslayerorg#1453, accesslayerorg#1458, accesslayerorg#1460)

Issue accesslayerorg#1453 - Build scheduled holder Q&A sessions with question submission and voting:
- Add useQaSession(id, wallet) hook with 15-second polling during live sessions
- Session status (upcoming / live / ended) derived from startTime + durationMinutes
  so the UI always shows an accurate countdown without a separate server call
- AskQuestion mutation enforces 200-character limit and one open question per holder
  to prevent flooding; throws descriptive errors surfaced to the UI
- Vote mutation enforces one vote per holder per question using per-wallet vote sets
  stored in localStorage with backend sync path ready
- Answer mutation is creator-only by convention; marks question answered and moves
  it to the answered tab returned as a separate sorted list
- Non-holders can read questions and vote count but ask/vote actions are disabled
  when the wallet does not meet the session holderRequirement

Issue accesslayerorg#1458 - Add risk disclosure acknowledgement gate before first trade:
- Add useRiskAcknowledgement(wallet) hook storing acknowledgement with version
  and timestamp per wallet in localStorage with backend sync path ready
- CURRENT_DISCLOSURE_VERSION constant makes it trivial to bump the version and
  force re-acceptance across all connected wallets on next load
- needsAcceptance boolean gates trading actions: components check this before
  allowing buy/sell operations and render RiskDisclosureModal when true
- isCurrentVersionAccepted distinguishes first-time users from users who accepted
  an older version, so a new version prompts acceptance again
- acceptedVersion and acceptedAt exposed for the settings page disclosure section
- Hook is wallet-scoped so each address gets its own independent acceptance record

Issue accesslayerorg#1460 - Add portfolio performance comparison against benchmark baskets:
- Add useBenchmarks(range, wallet) hook returning three indexed benchmark series:
  equal-weight market basket, top-10-by-volume basket, and XLM hold
- All series normalised to 100 at the start of the selected range (7D/30D/90D/All)
  so direct visual comparison is meaningful regardless of absolute price levels
- Portfolio series derived from usePortfolioHistory and normalised to same baseline
- Time-weighted return approach: portfolio history values already account for
  deposits and withdrawals so raw PnL figures are not distorted by cash flows
- Summary object provides totalReturn, per-benchmark diff, and best/worst key
  derived from priceChange24h for the summary cards rendered on the portfolio page
- Changing the range regenerates date arrays and re-normalises all series in one
  useMemo pass so chart and summary cards stay in sync without extra fetches
@drips-wave

drips-wave Bot commented Nov 23, 2026

Copy link
Copy Markdown

@parkerwinner 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

@parkerwinner parkerwinner changed the title feat: implement scheduled Q&A sessions, risk disclosure gate, and portfolio benchmark comparison feat: implement scheduled Q&A sessions, risk disclosure gate, and portfolio benchmark comparison, share image card Nov 23, 2026
@Chucks1093
Chucks1093 merged commit db4c928 into accesslayerorg:dev Nov 23, 2026
1 of 2 checks passed
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