Found while browser-verifying #2927 (PR #2930). Pre-existing and unrelated to that change — filed rather than left buried, per AGENTS.md #10.
Symptom
A hard load of any console route logs React's duplicate-key error, four times:
Encountered two children with the same key, `%s`. Keys should be unique so that
components maintain their identity across updates. Non-unique keys may cause
children to be duplicated and/or omitted — the behavior is unsupported and
could change in a future version.
This is an error, not a warning, and React is explicit that the resulting behaviour is unsupported: siblings sharing a key can be duplicated or omitted, and state can attach to the wrong sibling.
Repro
- Backend on any port (
pnpm --filter @objectstack/example-showcase dev -- --fresh -p <port> in framework).
DEV_PROXY_TARGET=http://localhost:<port> pnpm --filter @object-ui/console dev.
- Sign in, hard-load
/system/approvals, read the browser console.
What has already been ruled out
- Not from
ApprovalsInboxPage. It reproduces identically with that file swapped back to its main version, and both of its filter dropdowns (processOptions / objectOptions, the only index-free .map keys on the page) are Set-deduped by construction.
- Not from a route re-mount. Hooking
console.error and then SPA-navigating away from and back to /system/approvals produces zero warnings. It fires only on the initial full page load, which points at the app-shell bootstrap (nav / sidebar / topbar rendering before data settles) rather than at any one page.
Suggested next step
Hook console.error before React mounts (e.g. at the top of main.tsx behind a dev flag) so the owner component name in the error's trailing argument is captured, rather than truncated as it is in devtools. That should name the offending .map directly.
Refs #2927, #2930.
Found while browser-verifying #2927 (PR #2930). Pre-existing and unrelated to that change — filed rather than left buried, per AGENTS.md #10.
Symptom
A hard load of any console route logs React's duplicate-key error, four times:
This is an
error, not a warning, and React is explicit that the resulting behaviour is unsupported: siblings sharing a key can be duplicated or omitted, and state can attach to the wrong sibling.Repro
pnpm --filter @objectstack/example-showcase dev -- --fresh -p <port>inframework).DEV_PROXY_TARGET=http://localhost:<port> pnpm --filter @object-ui/console dev./system/approvals, read the browser console.What has already been ruled out
ApprovalsInboxPage. It reproduces identically with that file swapped back to itsmainversion, and both of its filter dropdowns (processOptions/objectOptions, the only index-free.mapkeys on the page) areSet-deduped by construction.console.errorand then SPA-navigating away from and back to/system/approvalsproduces zero warnings. It fires only on the initial full page load, which points at the app-shell bootstrap (nav / sidebar / topbar rendering before data settles) rather than at any one page.Suggested next step
Hook
console.errorbefore React mounts (e.g. at the top ofmain.tsxbehind a dev flag) so the owner component name in the error's trailing argument is captured, rather than truncated as it is in devtools. That should name the offending.mapdirectly.Refs #2927, #2930.