fix(gui): allow the onboarding card to be reopened after dismissal - #13123
Open
WhoamiI00 wants to merge 1 commit into
Open
fix(gui): allow the onboarding card to be reopened after dismissal#13123WhoamiI00 wants to merge 1 commit into
WhoamiI00 wants to merge 1 commit into
Conversation
Closing the onboarding card writes `hasDismissedOnboardingCard` to localStorage, but nothing ever clears it. The redux `onboardingCard.show` flag is not persisted (the `ui` slice only persists tool/rule settings), so the existing "Quickstart" row in Help re-showed the card for the current session only - after a reload the localStorage flag suppressed it again, leaving no way to bring the card back. `open` now clears the flag, mirroring `close` which sets it. Every call site of `open` is an explicit request to show the card, so clearing the dismissal there is safe. The Quickstart row now goes through `open` instead of dispatching `setOnboardingCard` directly, so it benefits from the same handling; `activeTab: undefined` was already equivalent to API_KEY, which the card defaults to. Fixes continuedev#12582
Contributor
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #12582 — once the onboarding card is closed, there is no way to get it back.
closewriteshasDismissedOnboardingCard: trueto localStorage, but nothing in the codebase ever clears it. The reduxonboardingCard.showflag isn't persisted (theuislice only persiststoolSettings,toolGroupSettings,ruleSettingsandreasoningSettings), so the existing Help → Quickstart row re-showed the card for the current session only — after a webview reload,showwas recomputed from localStorage and the card was suppressed again:The only escape was opening webview devtools and running
localStorage.removeItem("hasDismissedOnboardingCard").Change:
opennow clears the flag, mirroringclosewhich sets it. Every call site ofopen(Layout.tsxsetupLocalConfig/setupApiKey, the new-user auto-open, and the Quickstart row) is an explicit request to show the card, so clearing the dismissal there is safe.The Quickstart row now calls
onboardingCard.open()instead of dispatchingsetOnboardingCarddirectly, so it goes through that same path. This is behaviour-preserving: it previously passedactiveTab: undefined, and the card already defaults toAPI_KEYwhenactiveTabis unset (OnboardingCard.tsx).Scope note
This intentionally leaves one case alone: a user whose
onboardingStatusis"Completed"is still suppressed after a reload by the first half of the condition above. Quickstart re-shows the card for that session, which seems like the intended behaviour for someone who has finished onboarding — happy to widen this if you'd preferopento reset the status too.Checklist
Screen recording or screenshot
Not included — this is a state-persistence fix with no visual change to the card itself. It reproduces as follows:
config.modelsByRole.chat.length > 0).On
mainthe card is gone again at step 4 with no way to restore it; with this change it persists.Tests
Added
gui/src/components/OnboardingCard/hooks/useOnboardingCard.test.tsx(4 cases):closepersists the dismissal and hides the cardopenclears the persisted dismissal — regression test for Unable to reopen the account/settings bar after closing it #12582Both regression cases fail on
main(expected true to be false,expected 'false' to be 'true') and pass with this change. Fullguisuite: 38 files / 376 tests passing;tsc --noEmitand Prettier clean.