← All tests

Categories — appear without reload (n7 refresh fix) STAGING

Next-Phase n7 (Narong review). Verified on demo.staging 6/6 + staging smoke 5/5.

Narong's review: "Some Refreshing Issues." The Categories admin initialized its list state from the server prop once and never re-synced — so after "Use default categories" (or a plain "Add"), the action ran and router.refresh() re-fetched, but the list stayed empty until a manual page reload. Fix: the same prop-sync useEffect the registers admin got in the 07-15 register-instant fix — re-sync the list from the server prop on every change, while preserving any unsaved rename draft. One file, no migration. (The n7 confirmation dialog Narong also asked for shipped earlier; this closes the remaining half.)

Empty state → the default-categories prompt

Empty categories prompt
A tenant with no categories sees "Start with default categories?" with a confirm step before populating.

Populate → 9 categories appear WITHOUT a reload

Categories populated without reload
After confirming, the 9 standard coffee-shop categories fill the list immediately — no manual refresh. Previously the list stayed empty until F5. The test never calls page.reload().

Add a single category → also appears instantly

Single category added instantly
Typing a name + Add now shows the new category in the list right away (same prop-sync path).

Checks (demo.staging, Pro — through the deployed Worker, no page reload)

Empty state shows the default-categories promptpass
Populate defaults → categories appear WITHOUT reloadpass
Add a single category → appears WITHOUT reloadpass
DB confirms categories persistedpass
Staging smoke5/5

nix-cafe dev cb3efecstaging 88d5f48 (Worker nix-cafe-staging 75cc8f5d). 1 file, no migration. Parked on staging for the scheduled prod promote.