Skip to content

Add missing @rendermode InteractiveServer to /inventory (#273) - #274

Merged
Monster0506 merged 1 commit into
mainfrom
fix/inventory-page-missing-rendermode
Sep 20, 2026
Merged

Monster0506 merged 1 commit into
mainfrom
fix/inventory-page-missing-rendermode

Conversation

@Monster0506

Copy link
Copy Markdown
Member

Summary

Found this while doing more thorough browser-driven (Puppeteer) testing of the earlier fixes in this batch. Features/PhysicalAssets/Inventory.razor was the only routable page in the app with no @rendermode InteractiveServer directive - every other feature page has it. Without it, /inventory renders as static SSR only, so none of the embedded InventoryList component'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/blur DOM 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

  • Added @rendermode InteractiveServer to Inventory.razor.

Verification

  • dotnet test — all 221 tests pass (no test covers this class of bug either way, see above).
  • Verified live with Puppeteer against the real running app:
    • Before: typed name+category, waited, polled the Add button's disabled property for 2.7s — stayed true the whole time.
    • After: same script — disabled flips to false right after blur, clicking Add creates the item, AI valuation runs, and the total updates (Total value: $350.00).

Closes #273.

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.
@Monster0506
Monster0506 merged commit 3356ef8 into main Sep 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inventory page is completely non-interactive when visited directly (missing @rendermode)

1 participant