Skip to content

Conversation

@kevinbluer
Copy link
Member

@kevinbluer kevinbluer commented Dec 5, 2025

Description

  • Ensure the claim button is visible on the market details screen in hybrid (wherein a market has both active and resolved outcomes)

Changelog

CHANGELOG entry: null

Related issues

Fixes: PRED-321

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

image

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@kevinbluer kevinbluer requested a review from a team as a code owner December 5, 2025 19:58
@metamaskbot metamaskbot added the team-predict Predict team label Dec 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePredictions
  • Risk Level: medium
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

The change modifies the condition for showing the claim button in PredictMarketDetails.tsx. The original condition market?.status === PredictMarketStatus.CLOSED && hasPositivePnl is changed to !isClaimablePositionsLoading && hasPositivePnl. This removes the market status check and instead relies on whether claimable positions have finished loading.

This is a targeted change to the Predictions feature's claim button visibility logic. The SmokePredictions tag covers the relevant tests including:

  • predict-claim-positions.spec.ts - directly tests the claim flow and button visibility
  • predict-cash-out.spec.ts - tests position cash out functionality
  • predict-open-position.spec.ts - tests opening positions

Other Predict-related tests under SmokePredictions will ensure the overall feature works correctly with this change. No other test tags are needed since this change is isolated to the Predictions feature.

View GitHub Actions results

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.82%. Comparing base (e85bc15) to head (2374c26).
⚠️ Report is 39 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23733      +/-   ##
==========================================
+ Coverage   78.80%   78.82%   +0.01%     
==========================================
  Files        4033     4043      +10     
  Lines      105201   105471     +270     
  Branches    21157    21220      +63     
==========================================
+ Hits        82903    83136     +233     
- Misses      16516    16535      +19     
- Partials     5782     5800      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 5, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
E Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link
Contributor

@caieu caieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kevinbluer kevinbluer added the skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. label Dec 5, 2025
@kevinbluer kevinbluer enabled auto-merge December 5, 2025 20:50
@kevinbluer kevinbluer added this pull request to the merge queue Dec 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size-XS skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-predict Predict team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants