Skip to content

fix: Ensure model selection checkmark persists across navigation#35

Open
spenceriam wants to merge 1 commit intomainfrom
fix/bug-26-model-selection-checkmark
Open

fix: Ensure model selection checkmark persists across navigation#35
spenceriam wants to merge 1 commit intomainfrom
fix/bug-26-model-selection-checkmark

Conversation

@spenceriam
Copy link
Owner

@spenceriam spenceriam commented Nov 3, 2025

Summary

Fixes issue where the green checkmark for AI model selection would disappear when navigating back to the model selection screen.

Changes Made

  • Added useEffect to set modelLoadStatus to 'success' when hasModel is true
  • This ensures the green checkmark persists when navigating back to model selection
  • Fix maintains the checkmark indicator across navigation state changes

Testing

  • Selected a model and navigated through workflow steps
  • Returned to model selection screen - checkmark remains visible
  • Checkmark persists correctly even after page refresh (when model is stored in session)

Fixes #26


Note

Set modelLoadStatus to success via a new effect when hasModel is true, keeping the model selection checkmark persistent.

Written by Cursor Bugbot for commit 18af2bc. This will update automatically on new commits. Configure here.

- Add useEffect to set modelLoadStatus to 'success' when hasModel is true
- This ensures the green checkmark persists when navigating back to model selection
- Fixes issue where selected model didn't show checkmark after returning to model screen

Fixes #26
@vercel
Copy link

vercel bot commented Nov 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
open-spec Ready Ready Preview Comment Nov 3, 2025 1:35am

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

if (hasModel && modelLoadStatus !== 'success') {
setModelLoadStatus('success')
}
}, [hasModel, modelLoadStatus])
Copy link

Choose a reason for hiding this comment

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

Bug: Effect Hook Forcing False Positives on Loading Status

The new useEffect unconditionally sets modelLoadStatus to 'success' whenever hasModel is true, which overrides 'loading' and 'error' states emitted by ModelSelector (via onLoadingChange and onError). This can mask failures and prematurely clear loading indicators, showing a green checkmark even when model loading fails or is in progress.

Fix in Cursor Fix in Web

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: AI model screen doesn't always stage green check mark if AI model is already selected

1 participant