You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(frontend): RI exchange reshape empty state can show a stale RI count #1135
loadRIExchange (frontend/src/riexchange.ts:100-146) starts loadConvertibleRIs, loadReshapeRecommendations and loadExchangeHistory in parallel.
renderRecommendations (~:1325) builds the "All N convertible RIs meet your utilization threshold" copy from currentRIs.length.
If the recommendations response arrives first and is empty, the copy uses the previous currentRIs (or none). Nothing re-renders it once loadConvertibleRIs updates currentRIs.
This race exists on every loadRIExchange call, including the initial page load. #285 (PR #1126) makes the post-exchange refresh go through loadRIExchange, so it is also reachable after an exchange.
Proposed fix
After the AWS Promise.all in loadRIExchange (same generation), re-render the reshape empty state when the recommendations load succeeded and returned no rows. Keep an error message from a failed recommendations load. Add a jest test that resolves recommendations before RIs and asserts the final count.
Activity