# UI + SDK package fixes (lastVisitedOrg, worker-manifest organizationModel)

## Why this note exists

`@elevasis/ui` and `@elevasis/sdk` were republished with two backward-compatible fixes:

- `@elevasis/ui`: `OrganizationProvider` now persists org preference as `lastVisitedOrg` (matching the `/api/users/me` schema), removing the noisy 400 on organization switching.
- `@elevasis/sdk`: the worker manifest now includes `organizationModel`, so platform deployment persistence receives your tenant Organization Model snapshot.

The SDK change requires a deploy, not just an install, to take effect on your active platform deployment.

## Applies to

All template-derived projects that consume `@elevasis/ui` and `@elevasis/sdk` and run an `operations/` resources bundle on the Elevasis platform.

## Required actions

1. Pull and install so the new baselines land:
   - `@elevasis/ui` baseline bump in `ui/package.json`
   - `@elevasis/sdk` baseline bump in `operations/package.json`
2. `pnpm -C ui install && pnpm -C operations install` (or a project-root install) to update lockfiles.
3. Redeploy your operations bundle so the worker manifest publishes your Organization Model to the active deployment:
   - dev: `pnpm -C operations deploy`
   - prod: `pnpm -C operations deploy:prod`
4. Redeploy the UI (your host, e.g. Vercel) so the `lastVisitedOrg` fix ships to the browser.

No source merges are required; both changes are internal to the published packages.

## Verification

- `pnpm -C ui check-types && pnpm -C ui build`
- `pnpm -C operations check && pnpm -C operations check-types`
- After deploy, confirm the active deployment persists an Organization Model snapshot (Lead Gen / list surfaces resolve the tenant model rather than erroring), and that organization switching no longer emits a 400 against `/api/users/me`.

## Not handled by /git-sync

`/git-sync` pulls the new baselines and surfaces this note, but it does NOT install dependencies, deploy your operations bundle, or redeploy your UI. Run the install + deploy steps above yourself; the worker-manifest fix only takes effect on your active deployment after an operations redeploy.
