fix(showcase): stop passing a non-existent org column when seeding the phone demo user#3408
Merged
Merged
Conversation
…e phone demo user The approval demo's `ensurePhoneDemoUser` inserted `sys_user` with an `organization_id` key. `sys_user` has no such field — not in the object definition (25 fields, none org/tenant) and not physically (26 columns, no `organization_id`); org membership lives on `sys_member`. The key is not dropped on the way down: it reaches SQL as a real column and the insert dies with `table sys_user has no column named organization_id`. The insert is wrapped in a best-effort try/catch, so this surfaced only as a warn line and an ERROR in the boot log — and the demo user was **never** provisioned on any boot, leaving the phone surfaces (#3358 §6 "Phone sign-in surfaces": All Users list, record detail) empty with nothing to look at. Also drop the dead `admin.organization_id` read in `run`: the same missing field made it permanently `undefined`, so only the `sys_member` fallback ever ran. Resolve from `sys_member` directly and correct the comment, which claimed the column existed but was null. Verified on a wiped dev DB: boot log goes from 1 ERROR to 0, and `sys_user` now holds `usr_showcase_phone_demo` / `Mei Phone (demo)` / `+8613800138000`. Approval fixtures unaffected (2 pending requests + 3 admin positions still stamped with the org). `tsc --noEmit` passes. Follow-up to #3364; found while collecting evidence for #3358 §1. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jul 22, 2026
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.
The bug
ensurePhoneDemoUser(from #3364) insertedsys_userwith anorganization_idkey.sys_userhas no such field — not in the object definition (25 fields, none org/tenant), and not physically (26 columns, noorganization_id). Org membership lives onsys_member.The key is not silently dropped on the way down — it reaches SQL as a real column:
Because the insert sits in a best-effort
try/catch, this only ever showed up as a warn line plus an ERROR in the boot log. The consequence was invisible but total: the phone demo user was never provisioned on any boot, so #3358 §6 "Phone sign-in surfaces" (All Users list, record detail) had nothing to show.The fix
organization_idkey from thesys_userinsert (and the now-unused param).admin.organization_idread inrun— the same missing field made it permanentlyundefined, so only thesys_memberfallback ever ran. Resolve fromsys_memberdirectly, and fix the comment that claimed the column existed but was null.Verified
On a wiped dev DB:
sys_usernow holdsusr_showcase_phone_demo·Mei Phone (demo)·+8613800138000finance/legal/manager), all stamped with the orgtsc --noEmit✓Follow-up to #3364. Found while collecting per-item evidence for #3358 §1.
@objectstack/example-showcaseis private → no changeset.🤖 Generated with Claude Code