Add shopper favorites (session state + header quick list)#21
Add shopper favorites (session state + header quick list)#21mattfromcursor wants to merge 1 commit into
Conversation
Co-authored-by: mattfromcursor <mattfromcursor@users.noreply.github.com>
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cf51688. Configure here.
| class="favorites-heart-button" | ||
| aria-label="@(IsLoggedIn ? (isFavorited ? "Remove from favorites" : "Save to favorites") : "Log in to save favorites")" | ||
| title="@(IsLoggedIn ? (isFavorited ? "Remove from favorites" : "Save to favorites") : "Log in to save favorites")" | ||
| @onclick="ToggleFavoriteAsync"> |
There was a problem hiding this comment.
Static components use click handlers
High Severity
CatalogListItemWithFavorites and FavoritesMenu wire @onclick handlers but neither component declares an interactive render mode, while catalog and layout pages render statically. In Blazor Web Apps, static SSR does not dispatch those events, so catalog hearts, the header favorites control, and signed-out login redirects from the catalog will not run.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit cf51688. Configure here.
| } | ||
|
|
||
| _cachedFavorites = null; | ||
| await NotifyChangeSubscribersAsync(); |
There was a problem hiding this comment.
Favorites vanish after navigation
High Severity
FavoritesState keeps product IDs only in scoped in-memory fields, with no session or backend persistence. Product links in the catalog and favorites dropdown set data-enhance-nav="false", forcing full page loads and new DI scopes, so favorites added on one page are empty on the next—contrary to the E2E flow that favorites from the catalog and then opens the item from the header list.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit cf51688. Configure here.


What changed
FavoritesStatewith keyed toggle semantics and change notifications.FavoritesMenutoHeaderBar(top-right icon + compact click-to-open dropdown).CatalogListItem).playwright.config.tsto disable NuGet audit and enableESHOP_USE_HTTP_ENDPOINTSfor AppHost during E2E runs.Testing
dotnet restore eShop.Web.slnf -p:NuGetAudit=falsedotnet build eShop.Web.slnf -p:NuGetAudit=false -p:LibraryRestore=Falsedotnet test --project tests/Ordering.UnitTests/Ordering.UnitTests.csproj -p:NuGetAudit=falseNotes
baseURLduring this run, so the new Playwright flows were not executed to completion in this environment.