Repository navigation
fix(inertia): v3 prop resolution: once metadata, scroll wrapper/reset, partial paths, rescued props (#768–#773) - #798
Merged
Conversation
…, partial paths, rescued props (#768-#773) - Once props the client already holds stay announced in onceProps (#768); partial reloads resolve a requested once prop despite except-once (#769). - scroll() labels <prop>.data by default (wrapper=None for root) and reports X-Inertia-Reset in scrollProps.reset (#770). - Partial reloads emit merge/once metadata only for selected paths (#771) and honour dotted only/except paths inside plain dicts before loaders run (#772). - defer(..., rescue=True) logs a failing loader, omits it and lists it in rescuedProps (#773). - Plain JSON leaves/containers take a fast path: a 5k-message i18n + 500-row render drops from 10.8 ms to 8.6 ms. Claude-Session: https://claude.ai/code/session_01FXHA3ZJ5EgoJN4zXTAhBR2
…ta, merge duplicate tests Claude-Session: https://claude.ai/code/session_01FXHA3ZJ5EgoJN4zXTAhBR2
- matchPropsOn uses the merge path, so scroll match_on announces posts.data.id - always props and children of a resolved value keep merge/once labels on partial reloads - list fast path covers non-container leaves; clearer awaitable test case - docs: once/scroll/rescue/dotted-path semantics in module-authoring and the adapter spec Claude-Session: https://claude.ai/code/session_01FXHA3ZJ5EgoJN4zXTAhBR2
- wrapped list items resolve eagerly (no index drift); dict-nested optional/defer announced at dotted paths, noted in CHANGELOG - spec: rescue/wrapper params, rescuedProps, reset semantics, nested wrappers - _included docstring for the ancestors flag Claude-Session: https://claude.ai/code/session_01FXHA3ZJ5EgoJN4zXTAhBR2
- optional/defer inside an already-resolved value (list rows, loader results) resolve eagerly instead of vanishing on full visits - scroll over a resolved bare list merges at the prop root (wrapper applies to dict pages); restores the pre-existing bare-list expectations Claude-Session: https://claude.ai/code/session_01FXHA3ZJ5EgoJN4zXTAhBR2
- scroll docs: a bare list merges at the root automatically; wrapper=None roots a dict - drop constant arguments in the full-visit deferred branch Claude-Session: https://claude.ai/code/session_01FXHA3ZJ5EgoJN4zXTAhBR2
- except-once does not skip a once prop inside an already-resolved value (no index drift) - README scroll() signature order Claude-Session: https://claude.ai/code/session_01FXHA3ZJ5EgoJN4zXTAhBR2
…768-773 # Conflicts: # CHANGELOG.md
Deploying simple-module-python with
|
| Latest commit: |
05a87fb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1d55a13e.simple-module-python.pages.dev |
| Branch Preview URL: | https://fix-inertia-resolver-768-773.simple-module-python.pages.dev |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…768-773 # Conflicts: # CHANGELOG.md
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.
Makes
simple_module_inertia's prop resolver conform to the Inertia v3 protocol and the inertia-laravel 3.xPropsResolver(tracking #780).Closes #768
Closes #769
Closes #770
Closes #771
Closes #772
Closes #773
What changed
X-Inertia-Except-Once-Propson a full visit stays listed inonceProps. Before, the key was dropped, so the client lost the value on navigation.scroll(..., wrapper="data")labels<prop>.datafor merging, and a resolved bare list merges at the root.scrollProps.resetreflectsX-Inertia-Resetorreset=True.matchPropsOnuses the merge path (posts.data.id).only: ['auth.user']andexceptselect inside plain dict props before any loader runs. A loader's value is returned whole.defer(..., rescue=True)logs a failing loader, leaves it out ofpropsand lists it inrescuedProps.optional/defernested in a plain dict are announced at their dotted path. Inside a list item or a loader's returned value they resolve eagerly, because those positions have no stable path the client can fetch.Propwrapping. Rendering 5k i18n messages plus 500 rows went from 10.8 ms to 8.9 ms per render.docs/module-authoring.md, the adapter design spec andframework/inertia/README.mdare updated.Deliberate differences from Laravel
always()props, and children of a resolved value, keep their merge and once labels on a partial reload. The protocol table says merge metadata is sent "when resolved".Verification
make lint✓ ·make test-py(8 workers): 7324 passed, 43 skipped ✓ ·uv run pytest framework/inertia: 165 passed.rescue=True, as in Laravel.router.reload({only});errorsprop;Partial-Data: tokensreturned exactlytokens+errors, andPartial-Except: tokenslefttokensout.https://claude.ai/code/session_01FXHA3ZJ5EgoJN4zXTAhBR2