Repository navigation
Fix FreeOS → openXYOS pack so assets show in the signed-in tenant - #47
Merged
Merged
Conversation
Ingest was writing to tenant 1 (or ORDER BY id LIMIT 1) while the embed login demo@demo.com uses tenant 2, so pack succeeded but Employees/Talent lists stayed empty. Target the active UI tenant, remap list-visible statuses, show landed counts, refresh the employees preview, and skip illegal active→market loop promotions. Co-authored-by: XYAI Labs <haoboy8@gmail.com>
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
Pack/ingest was succeeding (
remote_applied: true, landed counts in the mirror receipt) while the embedded openXYOS UI showed nothing. The smoking gun on the user PC: ingest wrote employees/talent/skills/plugins to tenant 1 (雄元科技/admin@example.com, never logged in), but the embed login isdemo@demo.com→ tenant 2 (openXYOS 本地租户). List APIs filter byreq.user.tenant_id, so the business-space pages stayed empty.This change:
last_login, elsedemo@demo.com, else the local/demo tenant slug) and writes ingest rows there. Requested tenant 1 is still mirrored for super_admin, but the signed-in tenant is primary.staff/probation/draft/recruited) to list-visible values (employees.employment_category=internal+status=active,talent.status=available).tenant_id=1when the FreeOS config tenant is not a digit; it now asks/api/freeos/health|sessionforui_tenant_id./employees.activeemployees (cannot move active → market). Skip illegal/already-reached edges instead.Target branch
develop(feature / fix — default)main(requested for this fix)Type of change
Test plan
uv run pytest tests/unit/test_openxyos_apply.py tests/unit/test_org_loop.py tests/unit/test_lifecycle.py tests/unit/test_org_notes.py tests/unit/test_asset_loop.py tests/unit/test_org_module.py tests/unit/i18n/test_catalog.py tests/e2e/test_org_growth_loop.py -q— 50 passedcd modules/openxyos && npm run test:freeos-ingest— ingest withtenant_id=1whiledemo@demo.comlast_login is tenant 2;/api/employees?category=internal,/api/talent,/api/skills,/api/pluginsreturn the rowscd dashboard && npx vitest run src/pages/Organization/index.test.tsx— pack receipt + preview/employeesuv run mypy --stricton touched org_os / org_module modules — cleancd dashboard && npx tsc --noEmitandcd modules/openxyos && npx tsc --noEmit— cleanmake alllocally (not run in this environment; CI should cover it)Checklist
CHANGELOG.mddocs/asset-loop.md)Coordination
#46 is still open (active→market 500). This PR includes that fix so the Organization OS management path is complete. After merge, #46 can close as duplicate.