The review form now submits through Turbo (data-turbo="true"; Drive
stays off) and storeReview answers with Turbo Streams instead of a
redirect with flashed data:
- success: the new review is prepended to the list (same Blade partial
as the existing ones), the empty message is removed, the stars/count
under the title and the tab label are updated (count and average from
the DB, which is what the index builds them from), the form is removed
and the thank-you goes into a live region and gets focus
- validation error: 422 + a stream that replaces the form with inline
errors (aria-invalid/aria-describedby) and the entered values, focus on
the first invalid field
Nothing on the product page reads the session any more: no
session('reviewSubmitted'), old() or $errors, and
mergeJustSubmittedReview and the justSubmittedReview flash are gone.
searchableSync() stays.
Without JS it's a plain POST that redirects back to ?tab=reviews,
without inline errors or the thank-you, and the new review shows once
Meilisearch catches up. The ?tab=reviews query parameter is noted in
the controller as a variant to handle once product pages are cached.
New: product/partials/review, product/partials/rating-summary,
product/streams/review-stored|review-invalid, and a small
focus-on-connect Stimulus controller that only appears on streamed
markup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A <script type="speculationrules"> in the layout prerenders same-origin
links with eagerness "moderate" (hover or press). Excluded:
- cart, checkout, account, login, logout, wishlist, contact and the
future /islands, plus the admin (/boboko) and /stoic
- rel~=nofollow and [data-no-prerender]
- listing controls that load into a Turbo Frame (sort, filters,
pagination): links inside a <turbo-frame> or pointing at one, unless
they break out with data-turbo-frame="_top" like the product cards
Contact is excluded too, though the task didn't list it: it's a session
page with hCaptcha.
GA4 and a consent banner aren't in this repo, so no page-view delay on
document.prerendering is needed yet. Add one when they're added.
Watch production FPM after this deploy: until pages are cached, every
prerender is a full PHP render, and there are only 8 FPM workers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@view-transition { navigation: auto } inside prefers-reduced-motion:
no-preference, so page changes cross-fade in supporting browsers and
stay instant for visitors who ask for less motion. Turbo Frame listing
updates aren't document navigations and are unaffected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both links are now the same for every visitor, so the header can be
cached:
- Account always goes to route('account'); the auth middleware sends
guests to login, and after login they land back on the account page
(url.intended) instead of home.
- Wishlist always goes to route('wishlist'); WishlistController::guest
already redirects logged-in users to account.wishlist.
- One neutral label, storefront.nav.account, on desktop and mobile.
header.blade.php no longer calls auth().
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- x-wishlist-button gets data-wishlist-product on its form root; the
server-rendered aria-pressed stays for now.
- Both header account links (desktop and mobile menu) share
[data-account-link].
- The CSRF meta tag gets id="csrf-token".
No visible change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The badge is absolute inside the fixed-size cart button, so showing it
or growing from 1 to 2 digits doesn't move the header. Adds #cart-badge
as a Turbo Stream target and records the rule that no island may change
the size of its container. cart-count-controller is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>