Skip to content

Upgrade panel to Inertia.js v3#2575

Merged
glennjacobs merged 1 commit into
2.xfrom
feat/inertia-v3
Jul 21, 2026
Merged

Upgrade panel to Inertia.js v3#2575
glennjacobs merged 1 commit into
2.xfrom
feat/inertia-v3

Conversation

@glennjacobs

Copy link
Copy Markdown
Contributor

Summary

Upgrades the Inertia panel to Inertia.js v3 and adopts the v3 features that fit the panel's architecture.

  • inertiajs/inertia-laravel ^2.0^3.0 (v3.1.1)
  • @inertiajs/vue3 ^2^3 (3.6.1) — drops axios/qs/lodash-es from the bundle

Breaking changes handled

  • <title inertia><title data-inertia> in the root view.
  • Layout type tightened in pageResolver.ts (narrow Component | undefined).
  • Config restructure inertia.testing.page_pathsinertia.pages.paths in the panel test case + add-on fixtures.

v3 features adopted (best-fit)

  • Deferred props — Customer Edit orderChart (heaviest query) loads in a follow-up request behind a <Deferred> skeleton; chart tests moved to loadDeferredProps.
  • Optimistic updates + rollback — MediaManager reorder patches the media page prop optimistically (opt-in optimistic-key) and auto-reverts on failure (previously no rollback).
  • Prefetch — hover-prefetch on main + settings nav links.
  • PollingusePoll live-refreshes the Activity Log every 15s (auto-pauses on hidden tab).

Deliberately not adopted

  • <Form> refactor — v3's <Form> is uncontrolled (serializes native named DOM inputs); the panel's inputs are controlled Vue components (Combobox/TagsInput/RichTextEditor render no serializable native control). useForm is retained — it is not deprecated in v3 and is the correct tool here.
  • useHttp — a precognitive form hook, not a request client; the draft layer's 409/422 domain-error mapping (lib/http) stays.
  • Infinite scroll / merge-props — numbered pagination is the better fit for admin index tables.

Verification

Pint · PHPStan · panel PHP (682 passed) · vitest (210 passed) · type-check · panel build · example add-on build — all green.

🤖 Generated with Claude Code

Bump inertiajs/inertia-laravel ^2.0 -> ^3.0 (v3.1.1) and @inertiajs/vue3
^2 -> ^3 (3.6.1) for the panel, and adopt v3 features where they fit.

Breaking changes handled:
- <title inertia> -> <title data-inertia> in the root view.
- Layout type tightened in pageResolver (narrow Component|undefined).
- Config restructure inertia.testing.page_paths -> inertia.pages.paths in
  the panel test cases and add-on fixtures.

v3 features adopted:
- Deferred props: the Customer Edit orderChart (heaviest query) now loads
  in a follow-up request with a <Deferred> skeleton fallback; chart tests
  use loadDeferredProps.
- Optimistic updates: MediaManager reorder patches the media page prop
  optimistically (opt-in optimistic-key) and rolls back on failure.
- Prefetch: hover-prefetch on main and settings navigation links.
- Polling: usePoll live-refreshes the Activity Log every 15s.

useForm is retained (fully v3-supported); v3's uncontrolled <Form> is
incompatible with the panel's controlled/custom inputs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-project-automation github-project-automation Bot moved this to Todo in Roadmap Jul 21, 2026
@glennjacobs
glennjacobs merged commit c3937fb into 2.x Jul 21, 2026
23 checks passed
@glennjacobs
glennjacobs deleted the feat/inertia-v3 branch July 21, 2026 19:28
@github-project-automation github-project-automation Bot moved this from Todo to Done in Roadmap Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant