Skip to content

Instantly share code, notes, and snippets.

@megakevin
Created October 8, 2026 23:08
Show Gist options
  • Select an option

  • Save megakevin/ec17883e8df0f510a59a6e80aa337431 to your computer and use it in GitHub Desktop.

Select an option

Save megakevin/ec17883e8df0f510a59a6e80aa337431 to your computer and use it in GitHub Desktop.
Plan for a Vue 2 to 3 migration.

Frontend Migration Plan (Vue 2 → Vue 3)

A concrete, ordered, feature-by-feature plan for finishing the frontend migration. Follow it top to bottom. Every rule referenced here (§N) lives in MIGRATION_GUIDE.md — this plan says what to migrate and in what order; the guide says how.

How to use this plan

  • Work phase by phase, step by step, in order. Later steps assume earlier ones are done, because dependencies (models, store actions, leaf components) are migrated before the things that use them.
  • Each step has the same shape:
    • Goal — the user-visible outcome or the artifact produced.
    • Depends on — prerequisite steps.
    • Migrate — the old file(s) → new file(s), with the applicable guide rules.
    • Verify — how to confirm it works before moving on.
  • Check off boxes as you complete them. Do not start a step until its dependencies are checked.
  • There is no per-component unit test suite (§17), so each step's "Verify" means manual verification in a running app plus lint/format. Do not skip it — manual verification after each step is how this migration stays honest. End-to-end acceptance is covered by the existing system/feature specs described below, which become the final gate.

Standard verification loop

Run these two dev servers (separate terminals) and keep them running throughout:

bin/rails server
bin/vite dev

Then open http://localhost:3000/. After every step:

  1. Build/HMR is clean — no Vite compile errors, no red console errors on load.
  2. Lint/format is clean — the file passes ESLint and Prettier (§16).
  3. Feature check — perform the step's specific "Verify" actions.
  4. No regressions — the app shell still renders, navigation still works, and previously migrated features still behave.

Logged-in features (cart, account, orders, reorder) require a user. Users come from the inventory import (§ "No registration" in README). Have a known username/password from the seeded inventory data ready before starting Phase 4.

Existing system/feature specs (RSpec + Capybara)

A full suite of RSpec + Capybara system/feature specs already exists, written against the old Rails 5 + Vue 2 + Webpacker app, where they all pass. Because these specs drive the app through a real browser and assert on user-visible behavior (URLs, rendered text, form interactions) rather than Vue internals, they are framework-agnostic: once the Vue 3 frontend is complete, the expectation is that the old spec files can be copied over essentially as-is and pass unchanged.

The harness is already set up as pre-migration work: spec/support/capybara.rb registers a headless-Chrome driver (ported from the old codebase, adjusted for Rails 8 + selenium-webdriver 4.x), Chromium is available in the dev container, and a passing smoke spec (spec/features/home_spec.rb) visits / and asserts the shell renders. So bin/rspec already runs type: :feature + js: true specs against the app. The old feature specs themselves now live in old_codebase/spec/features/ and get copied into spec/features/ incrementally as each feature's phase completes (see the mapping below). The one remaining bit of harness wiring is database_cleaner, needed as soon as the first data-dependent spec is ported (Phase 3).

How to use them during the migration:

  • They are the definition of "done." The migration is complete when the ported suite passes green.
  • They validate behavior, not implementation. Preserve the old user-visible contract — the same routes/URLs (including the deep shop/reorder filter URLs, §9), the same on-screen text/labels, and the same form/interaction flows — so the specs keep matching. If a spec would need editing for reasons other than an intentional UX change, treat that as a signal the migration diverged.
  • Bring them over incrementally. Each spec file has a target phase (see the mapping below). At that phase, copy the file from old_codebase/spec/features/ into spec/features/, run it, and get it green before moving on — this catches regressions far earlier than waiting for Phase 12. Expect selectors that targeted Vue-2-only markup quirks to occasionally need a light touch; prefer fixing the new markup to match rather than weakening the spec.
  • Location: place them under the standard Rails path (e.g. spec/features/) so bin/rspec picks them up.

Spec-to-phase mapping. The old specs live in old_codebase/spec/features/. Copy each into spec/features/ at the phase noted, then run it with bin/rspec and get it green before moving on:

Old spec file Copy in & make green at Covers
authentication_spec.rb Phase 3 login page, invalid/valid credentials, log out
shop_catalog_spec.rb Phase 5 (product-detail scenario at Phase 7) shop browsing controls, search, sort, filter URLs, category filter, product detail
categories_spec.rb Phase 6 categories tree, drill-through into filtered shop
shopping_cart_spec.rb Phase 8 login-required message, cart items/summary, checkout threshold, placing an order, stale-stock/duplicate refresh
my_account_spec.rb Phase 9 order details, non-owner redirect, past-orders list, auth redirects

The first ported spec (authentication_spec.rb, Phase 3) creates data via factories, so wire up database_cleaner (truncation strategy for JS specs) before then — the browser thread won't see data created inside a transactional fixture (see the commented block in rails_helper.rb). This wiring is a one-time setup that all later specs then rely on.


Current state (already done — the proof-of-concept slice)

These are the reference implementation. Do not redo them; extend them.

  • Shell: App.vue, layouts/MainLayout.vue, components/AppTopBar.vue, components/AppFooter.vue, components/MainMenu.vue, components/SearchBar.vue, components/AppButton.vue.
  • Partial: components/CartPreview.vue (rendered, but store/cable/logout wiring is commented out).
  • Store: stores/AppStore.js (state fields only; getters/actions empty).
  • Router: router/index.js (only the home route).
  • Models: models/ApplicationRecord.js, models/Cart.js, models/Filters.js.
  • Views: views/HomeView.vue (placeholder markup only).

Phase 1 — Foundational infrastructure (non-visual)

Build the plumbing everything else depends on. None of this is a screen; verification is mostly "the app still boots and the store behaves in devtools/console."

1.1 Port the display filters

  • [✅] Goal: currency, humanDate, orDefault available as importable functions.
  • Depends on: none.
  • Migrate: filters/currency.js, filters/humanDate.js, filters/orDefault.js → app/frontend/filters/ (§6). Rewrite humanDate without moment (use Intl.DateTimeFormat/Date).
  • Verify: import each in a scratch spot (or a quick unit check in the console) and confirm currency(1.5) === '$1.50', orDefault(null, '-') === '-', and humanDate formats a date string.

1.2 Port the remaining Spraypaint models

  • [✅] Goal: every model the app uses exists under models/.
  • Depends on: none (ApplicationRecord already present).
  • Migrate: Product, ProductList, CartItem, Category, InventoryItem, InventoryInventoryItem, Order, PagePart, PageText → app/frontend/models/ (§8), verbatim, one class per file. You may port them all now, or lazily per feature — but porting now removes a recurring blocker.
  • Verify: in the browser console (or a temporary mounted hook), run a simple query against a known-good endpoint (e.g. InventoryItem.per(1).all()) and confirm it returns JSON:API data through /api/v1.

1.3 Adopt the mitt-vue event-bus convention

  • [✅] Goal: components can emit/listen to cross-component events; no EventBus.js.
  • Depends on: none.
  • Migrate: mitt-vue already provides a single shared emitter — no application.js wiring is needed (it is created at module scope on import). Adopt the convention (§10): emit with eventEmit(name, payload) (callable from anywhere, including Options-API methods); listen with useEventListener(name, handler) inside a minimal setup() hook, which auto-registers on mount and auto-removes on unmount (no manual teardown, no leaks). Keep the old event names.
  • Verify: emit an event from one component and confirm a useEventListener in another receives it.

1.4 Configure ActionCable (actioncable-vue)

  • [✅] Goal: this.$cable and the channels: {} option are available for later real-time features.
  • Depends on: none.
  • Migrate: install/configure ActionCableVue in entrypoints/application.js, porting the old connectionUrl/debug options (§11).
  • Verify: load the app; confirm a cable connection is established (network WS frame / no connection errors in console). No component needs to subscribe yet.

1.5 Build out the Pinia store: auth + cart + persistence

  • [✅] Goal: AppStore has the actions the rest of the app calls, with localStorage persistence.
  • Depends on: 1.2 (models).
  • Migrate: translate the old Vuex store (store/index.js) and the service logic it depended on into Pinia actions on stores/AppStore.js (§7). Fold UserApi, CartApi, and CartService behavior into actions calling Spraypaint models directly — do not recreate a services/ directory. Actions to provide (names may be adjusted, behavior must match):
    • init — hydrate jwt/currentUser from localStorage, then fetchCurrentUser.
    • setJwt, fetchCurrentUser, fetchCurrentCart, setBasketItem, commitOrder, logout (client + server session teardown).
    • Keep jwt/currentUser in sync with localStorage on change.
    • Also expose shopPageLastScrollPosition writes for the shop page (§7 state already has the field).
    • The two DOM utilities (DomHelper, ElementHeightCalculator) are not business logic; port them as small plain modules (e.g. under models/ or a tiny helper file) or inline them into the one component that needs them, rather than into the store.
  • Verify: call useAppStore().init() from App.vue's beforeCreate (replacing the console.log). With a valid seeded login present in localStorage, reload and confirm currentUser and basket populate in Vue devtools. With no token, confirm the store stays logged-out and does not throw.

Phase 2 — Finish the app shell

Complete the already-scaffolded shell so global chrome is fully functional.

2.1 Fix the App.vue layout leftover

  • [✅] Goal: App.vue renders cleanly with no dangling store references.
  • Depends on: 1.5.
  • Migrate: App.vue currently mapStates a layout field that no longer exists on AppStore. Either restore a layout concept in the store or remove the mapping and keep rendering <MainLayout /> directly. The old app switched between main/details layouts via <component :is>; the details layout (layouts/details.vue) is not yet migrated — defer it until a screen actually needs it and remove the leftover mapping for now.
  • Verify: no console warning about a missing layout state; shell renders.

2.2 Wire up CartPreview

  • [✅] Goal: the header cart preview shows live user/cart data and can log out.
  • Depends on: 1.5.
  • Migrate: un-comment and adapt CartPreview.vue. Replace the commented $store.dispatch('logout') with the Pinia logout action; compute amounts via the currency filter function (§6); leave the $notify blocks stubbed with a TODO pointing at Phase 11 (§14). Re-enable the CartChannel subscription (§11) so cart refreshes update the preview, using fetchCurrentCart.
  • Verify: logged in, the preview shows email, item/title counts, and amount; "Log Out" clears session and (per App.vue's jwt watcher) redirects to /. Logged out, it shows the "Log In" link.

2.3 Migrate ProductsStateRefresh (inventory real-time refresh)

  • [✅] Goal: inventory changes broadcast to components via the mitt bus.
  • Depends on: 1.2, 1.3, 1.4.
  • Migrate: ProductsStateRefreshComponent → components/ProductsStateRefresh.vue (§10, §11). Replace EventBus.$emit('refreshed', ...) / EventBus.$emit('inventory-item-refreshed-<id>', ...) with eventEmit(...) (§10); replace this.$console with console (§12); keep the InventoryChannel subscription. Re-add it to App.vue (it's currently commented out) once ready.
  • Verify: trigger an inventory refresh (via the inventory refresh path/console) and confirm the events fire (temporary listener/log). Full visual effect is validated later once catalog screens exist.

Phase 3 — Authentication

3.1 Log In screen

  • [✅] Goal: users can log in; successful login populates the store and cart.
  • Depends on: 1.5, 2.2.
  • Migrate: LogInPageComponent → views/LogInView.vue (§2). Drop the old userApi/domHelper route props (§9); call the store's setJwt/auth actions instead (§7). Add the /log-in route to router/index.js.
  • Verify: submit valid credentials → redirected/logged in, currentUser set, header updates to the logged-in state. Invalid credentials → error surfaced, no session created.
  • Acceptance spec: first wire up database_cleaner (truncation for JS specs; see the callout under "Existing system/feature specs" and the commented block in rails_helper.rb), then copy old_codebase/spec/features/authentication_spec.rb → spec/features/ and get it green (login page, invalid creds, valid login, and log out — the Log Out button comes from CartPreview, 2.2).

Phase 4 — Static content pages

These are simple and validate the content models end to end.

4.1 ContentPage shared component

  • [✅] Goal: a reusable content renderer backed by PagePart/PageText.
  • Depends on: 1.2.
  • Migrate: ContentPageComponent → components/ContentPage.vue (§3).
  • Verify: render it in isolation with a known page key; confirm content loads from /api/v1.

4.2 About screen

  • [✅] Goal: /about renders managed content.
  • Depends on: 4.1.
  • Migrate: AboutPageComponent → views/AboutView.vue; add the /about route.
  • Verify: navigate to /about (and via the ABOUT menu link); content renders.

4.3 Register screen

  • [✅] Goal: /register renders managed content.
  • Depends on: 4.1.
  • Migrate: RegistrationPageComponent → views/RegisterView.vue; add the /register route.
  • Verify: navigate to /register (visible in the menu when logged out); content renders.

Phase 5 — Catalog browsing (the big one)

Build the shop from the leaves up. Do the leaf/shared components first; each is independently verifiable by dropping it onto a scratch route or the home page before the full shop exists.

5.1 BackToTop

  • [✅] Depends on: none. Migrate: BackToTopComponent → components/BackToTop.vue; swap <v-icon> → <FontAwesomeIcon> (§5). Verify: appears on scroll, scrolls to top on click.

5.2 AuthorLink

  • [✅] Depends on: none. Migrate: AuthorLinkComponent → components/AuthorLink.vue. Verify: renders an author name/link from a prop.

5.3 AddToCart

  • [✅] Goal: add/adjust an item's quantity in the cart. Depends on: 1.5 (setBasketItem), 1.2. Migrate: AddToCartComponent → components/AddToCart.vue; replace mapGetters/$store with Pinia (§7); <v-icon> → <FontAwesomeIcon> (§5). Verify: logged in, changing quantity updates the cart and the header preview; logged out, it prompts to log in.

5.4 SellingItem

  • [✅] Goal: the catalog tile. Depends on: 5.3. Migrate: SellingItemComponent → components/SellingItem.vue; use currency/orDefault as functions (§6). Verify: shows cover, title, price, and an embedded working AddToCart.

5.5 ExpandablePane

  • [✅] Depends on: none. Migrate: ExpandablePaneComponent → components/ExpandablePane.vue; <v-icon> → <FontAwesomeIcon> (§5). Verify: expands/collapses on click.

5.6 Filter controls

  • [✅] Goal: price/quantity/date/category filter widgets. Depends on: 5.5, 1.2 (Category), models/Filters.js. Migrate, each dropping its Component suffix and swapping icons (§5):
    • SubCategoriesListComponent → components/SubCategoriesList.vue
    • CategoryListItemComponent → components/CategoryListItem.vue (uses SubCategoriesList)
    • CategoryFilterComponent → components/CategoryFilter.vue (uses CategoryListItem)
    • PriceFilterComponent → components/PriceFilter.vue (uses ExpandablePane)
    • QuantityFilterComponent → components/QuantityFilter.vue (uses ExpandablePane)
    • OrderDateFilterComponent → components/OrderDateFilter.vue (uses ExpandablePane)
  • Verify: each widget updates the Filters state / emitted values and toggles correctly.

5.7 SellingFilters + ShopSidebar

  • [✅] Goal: the assembled sidebar filter panel. Depends on: 5.6. Migrate: SellingFiltersComponent → components/SellingFilters.vue (uses the 5.6 widgets); <v-icon> → <FontAwesomeIcon> (§5). ShopSidebarComponent → components/ShopSidebar.vue (uses SellingFilters).
  • Verify: the sidebar renders all filters and updates the URL via Filters#toPath (§9).

5.8 ShopItems

  • [✅] Goal: the results grid with sidebar + pagination. Depends on: 5.4, 5.7, 5.1, Product, Filters. Migrate: ShopItemsComponent → components/ShopItems.vue; apply filters to the scope via Filters#applyToScope; port the DOM helper usage as a small util (§7 note). Verify: results render; filtering and "load more" pagination work.

5.9 Shop screen

  • [✅] Goal: /shop/... fully works, including deep filter URLs. Depends on: 5.8.
  • Migrate: ShopPageComponent → views/ShopView.vue; drop the domHelper route prop (§9). Add the /shop route and re-express the old inline path-regex for the filter segments in vue-router v4 syntax, kept in sync with models/Filters.js (§9). Port scrollBehavior's shop pagination special case (§9). Wire the SearchBar (already migrated) so search navigates here.
  • Verify: browse /shop; apply category/price/quantity filters and confirm the URL updates and is shareable/reloadable to the same result set; search from the header lands on filtered results; pagination preserves scroll behavior.
  • Acceptance spec: copy old_codebase/spec/features/shop_catalog_spec.rb → spec/features/ and get it green — except the visitor can open product detail via direct URL scenario, which needs ProductView (Phase 7); mark it pending/skip until then.

Phase 6 — Categories

6.1 Categories screen

  • [✅] Goal: /categories lists the category tree and drills into products. Depends on: 1.2 (Category), models/Filters.js, 5.x (links into shop). Migrate: CategoriesComponent → views/CategoriesView.vue; drop the categoryApi route prop (use the Category model directly, §9); port ElementHeightCalculator/DomHelper usage as small utils/component methods (§7 note); <v-icon> → <FontAwesomeIcon> (§5). Add the /categories route.
  • Verify: categories render as a tree; selecting one navigates into the correct filtered shop view.
  • Acceptance spec: copy old_codebase/spec/features/categories_spec.rb → spec/features/ and get it green (navigate to categories from the menu; root/sub categories drill through into the filtered shop).

Phase 7 — Product detail

7.1 Product description screen

  • [✅] Goal: /product/:product_id shows item details with add-to-cart. Depends on: 5.2, 5.3, 1.2.
  • Migrate: ProductDescriptionPageComponent → views/ProductView.vue (uses AuthorLink, AddToCart); use orDefault for the missing-image fallback (§6); move the co-located image-not-found*.jpg into assets/ and import them (§1, §4). Add the /product/:product_id route.
  • Verify: open an item from the shop grid; details, author, price, and cover render (with fallback image when missing); add-to-cart works.
  • Acceptance spec: the visitor can open product detail via direct URL scenario left pending in Phase 5 should now pass — run shop_catalog_spec.rb again and confirm the whole file is green.

Phase 8 — Cart

8.1 Cart screen

  • [✅] Goal: /cart reviews and edits the basket. Depends on: 5.2, 5.3, 1.5, 1.3. Migrate: CartPageComponent → views/CartView.vue; replace EventBus.$on('refreshed', ...) with useEventListener('refreshed', ...) in a setup() hook (auto-cleanup, §10); use currency/orDefault (§6); <v-icon> → <FontAwesomeIcon> (§5); leave $notify calls stubbed for Phase 11 (§14). Add the /cart route.
  • Verify: items list with correct quantities/prices/totals; editing quantities and removing items updates totals and the header preview; a live inventory refresh (Phase 2.3) updates the cart.
  • Acceptance spec: copy old_codebase/spec/features/shopping_cart_spec.rb → spec/features/ and get it green (login-required message, cart items/summary, checkout min-threshold enable/disable, placing an order, and the stale-stock/duplicate refresh scenarios — the latter exercise the CartChannel real-time path from 2.2/2.3).

Phase 9 — Account, orders, and reorder

9.1 Order summary/detail sub-components

  • [✅] Depends on: 1.2 (Order), 6 (filters where shared). Migrate: OrderItemComponent → components/OrderItem.vue (uses currency/humanDate, §6); OrderItemsListComponent → components/OrderItemsList.vue (uses OrderItem); OrderSummaryComponent → components/OrderSummary.vue. Verify: render each with a sample order.

9.2 Order screen

  • [✅] Goal: /my-account/order/:order_id shows a past order. Depends on: 9.1. Migrate: OrderPageComponent → views/OrderView.vue; drop the orderApi route prop (use Order directly, §9); replace mapGetters with Pinia (§7). Add the route.
  • Verify: open a known order; items, quantities, prices, and totals match.

9.3 Account sub-components

  • [✅] Depends on: 1.2, 1.5. Migrate: PastOrdersComponent → components/PastOrders.vue (uses currency/humanDate, §6); ChangePasswordComponent → components/ChangePassword.vue (Pinia auth, §7). Verify: past-orders list renders and links to order detail; password change round-trips against the API.

9.4 My Account screen

  • [✅] Goal: /my-account hub. Depends on: 9.2, 9.3. Migrate: MyAccountPageComponent → views/MyAccountView.vue; drop userApi/orderApi route props (§9); Pinia for user state (§7). Add the route.
  • Verify: logged in, the account page shows past orders + change-password; links work; logged out, it is not reachable (redirect per App.vue jwt watcher).
  • Acceptance spec: copy old_codebase/spec/features/my_account_spec.rb → spec/features/ and get it green (order details page from 9.2, non-owner redirect, past-orders list, and the unauthenticated redirects to home).

9.5 Reorder screen

  • [✅] Goal: /reorder/... re-order flow with its filters. Depends on: 5.4, 5.7, 5.1, 5.6 (order-date filter), 1.2. Migrate: the reorder-specific ReorderPageComponent/ShopItemsComponent → components/ReorderShopItems.vue (reuses SellingItem, ShopSidebar, BackToTop); ReorderPageComponent → views/ReorderView.vue; drop the domHelper route prop (§9); re-express the reorder filter path-regex in vue-router v4 syntax kept in sync with Filters (§9). Add the /reorder route.
  • Verify: logged in, /reorder lists previously ordered items; order-date/price/quantity filters work and are URL-encoded; adding to cart works. Menu shows REORDER only when logged in.

Phase 10 — Home page (with deferred carousels stubbed)

Home depends on the carousel widgets, which are deferred (§14). Do the non-carousel parts now; wire the carousels in Phase 11.

10.1 Home screen (initial)

  • [✅] Goal: replace the placeholder HomeView with the real home layout minus carousels.
  • Depends on: 5.4 (SellingItem), 5.1 (BackToTop).
  • Migrate: HomePageComponent → views/HomeView.vue; move co-located facebook.png/twitter.png into assets/ and import them (§1, §4); port asyncComputed blocks as-is (§13). Stub the HeroImage/ItemCarousel slots with a plain fallback (e.g. a simple grid of SellingItems) and a TODO pointing at Phase 11.1.
  • Verify: / renders the real home content; featured items appear (in the stubbed layout); social links and back-to-top work.

Phase 11 — Deferred integrations

Tackle the items with no clean Vue 3 drop-in, now that the app is otherwise complete (§14).

11.1 Carousel replacement

  • [✅] Goal: real carousels on home. Depends on: 10.1. Migrate: choose a Vue-3-compatible carousel or implement a minimal one; build components/HeroImage.vue (from HeroImageComponent, move hero1.png into assets/) and components/ItemCarousel.vue (from ItemCarouselComponent, wraps SellingItem). Preserve the responsive perPage behavior (§14). Replace the Phase 10.1 stubs.
  • Verify: home hero rotates; item carousel scrolls and is responsive at the old breakpoints.

11.2 Notifications replacement

  • [✅] Goal: user-facing toasts restored. Depends on: the screens that notify (2.2 CartPreview, 8.1 CartView). Migrate: adopt a Vue-3-compatible toast or a small custom implementation; replace the $notify stubs, preserving the warn/error/success styles already in App.vue's stylesheet (§14). Add the container to App.vue (replacing the commented <notifications />).
  • Verify: cart adjustment/duplicate scenarios (from the cable handler) surface the right toast type.

11.3 Breadcrumbs replacement

  • [✅] Goal: breadcrumb trail restored. Depends on: all views/routes with meta.breadcrumb.
  • Migrate: use vue-3-breadcrumbs and implement components/AppBreadcrumbs.vue (from AppBreadcrumbsComponent) for filter-aware crumbs (list/category names) against the Filters model; <v-icon> → <FontAwesomeIcon> (§5). Place it in the shell/layout (§14).
  • Verify: breadcrumbs render on shop/reorder/product/categories/account/order/cart and reflect active filters; each crumb navigates correctly.

11.4 Spraypaint listener cleanup decision

  • [✅] Decision: leave ApplicationRecord.sync off; do not reintroduce spraypaint-vue or an unlisten() teardown shim. Rationale: real-time updates use a refetch-and-reassign pattern (cart cable handler → AppStore.fetchCurrentCart() reassigns basket, read via mapState) plus mitt events + $forceUpdate() for inventory tiles — no long-lived cross-component instances of the same record are held, so Spraypaint's cross-instance sync is unnecessary. With sync off, nothing registers instance listeners, so there is no leak to unwind and no unlisten() lifecycle to manage (§8, §14). Revisit only if a future screen holds two independent instances of the same record and expects a mutation in one to reflect in the other without a refetch.

Phase 12 — Cleanup and final validation

12.1 Remove leftovers

  • [✅] Delete the remaining commented-out Vue 2 scaffolding in App.vue (logger/notifications/layout leftovers) once their replacements (or decisions) are in place (§12, §2.1).
  • [✅] Confirm there is no EventBus.js, no LoggerComponent, no polyfills, and no this.$console/this.$store references anywhere (§7, §10, §12, §13).
  • [✅] Confirm no vue-awesome, vue-breadcrumbs, vue-carousel, vue-notification, or spraypaint-vue imports remain, and drop the packages from package.json if fully unused (§5, §14).

12.2 Confirm the full system/feature suite is green (acceptance gate)

  • [✅] By now every feature spec has been copied into spec/features/ and made green at its phase (see the spec-to-phase mapping under "Existing system/feature specs"): authentication_spec (3), shop_catalog_spec (5/7), categories_spec (6), shopping_cart_spec (8), my_account_spec (9). Confirm none were left skipped or pending.
  • [✅] Run the whole suite together with bin/rspec (not just file-by-file) and get it all green — specs can interact through shared data, so a full run is the real gate. Any spec that needs editing beyond the one-time database_cleaner setup indicates the migration diverged from the old user-visible behavior — fix the frontend, not the spec, unless the change is an intentional UX decision.

12.3 Full regression pass

  • [✅] Walk every route logged out, then logged in: home, shop (+ deep filter URLs, search, pagination), categories, product detail, cart, my-account, order detail, reorder, about, register, log-in.
  • [✅] Exercise the real-time paths (inventory refresh, cart refresh) and confirm live updates + toasts.
  • [✅] Run the full app through ESLint + Prettier clean (§16).
  • [✅] Sanity-check the production build: bin/vite build succeeds with no errors.

12.4 Update documentation

  • [✅] Update README/AGENTS if any frontend conventions or commands changed as a result of the migration.
  • [✅] Record any newly discovered conventions back into MIGRATION_GUIDE.md.

Dependency map (quick reference)

Phase 1 (filters, models, mitt, actioncable, store) ─┐
                                                     ├─► everything
Phase 2 shell (App.vue, CartPreview, ProductsStateRefresh)
Phase 3 auth (LogInView)
Phase 4 content (ContentPage → About, Register)
Phase 5 catalog:
   BackToTop, AuthorLink
   AddToCart ─► SellingItem
   ExpandablePane ─► Price/Quantity/OrderDate filters
   SubCategoriesList ─► CategoryListItem ─► CategoryFilter
   (all filters) ─► SellingFilters ─► ShopSidebar
   SellingItem + ShopSidebar + BackToTop ─► ShopItems ─► ShopView
Phase 6 CategoriesView ──(links into)──► ShopView
Phase 7 ProductView (AuthorLink, AddToCart)
Phase 8 CartView (AuthorLink, AddToCart, mitt)
Phase 9 OrderItem ─► OrderItemsList ─► OrderView
        PastOrders, ChangePassword ─► MyAccountView
        ReorderShopItems ─► ReorderView
Phase 10 HomeView (SellingItem, BackToTop; carousels stubbed)
Phase 11 deferred: carousels ─► HomeView; notifications; breadcrumbs; spraypaint sync
Phase 12 cleanup + full regression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment