Add missing @rendermode InteractiveServer to /inventory (#273) - #274
Merged
Merged
Conversation
Inventory.razor was the only routable page in the app without @rendermode InteractiveServer, so visiting /inventory directly served it as static-only SSR with no interactive circuit. Every @onclick/@Bind handler in the embedded InventoryList (Add, Remove, inline edit, expand item detail, revalue) was dead: native DOM change/blur events fired fine, but nothing reached the server, so the "Add" button's disabled state (bound to _newName) never updated no matter what was typed. Found via real end-to-end browser testing (Puppeteer) rather than the existing bUnit test, which invokes the change handler programmatically and so never exercises real event dispatch/interactivity wiring - it passed throughout and gave no signal that this was broken. Verified fix: after adding the render mode, the same Puppeteer script (real typing + real blur/click, no direct method invocation) is able to type a name/category, has the Add button become enabled, click it, and see the item appear with an AI-estimated value and updated total.
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.
Summary
Found this while doing more thorough browser-driven (Puppeteer) testing of the earlier fixes in this batch.
Features/PhysicalAssets/Inventory.razorwas the only routable page in the app with no@rendermode InteractiveServerdirective - every other feature page has it. Without it,/inventoryrenders as static SSR only, so none of the embeddedInventoryListcomponent's interactivity (Add, Remove, inline edit, expand detail, revalue) actually works when the page is visited directly.How I found it
A real Puppeteer script (real typing + real blur via Tab/click, not a direct method call) typed a name and category into the Add Item fields and the "Add" button never became enabled. Instrumenting the page confirmed the native
change/blurDOM events did fire correctly - the browser side was fine - but nothing reached the server, since the page had no interactive circuit at all. Notably,InventoryListTests.cs(bUnit) didn't catch this: it drives the component with.Change(...), which invokes the compiled handler directly and bypasses real event dispatch/interactivity wiring entirely, so it gives no signal about whether the page is actually interactive.Changes
@rendermode InteractiveServertoInventory.razor.Verification
dotnet test— all 221 tests pass (no test covers this class of bug either way, see above).disabledproperty for 2.7s — stayedtruethe whole time.disabledflips tofalseright after blur, clicking Add creates the item, AI valuation runs, and the total updates (Total value: $350.00).Closes #273.