# What's new

Changes to the POS Apps SDK (`@pancake-pos/ui-extensions`, `@pancake-pos/ui`, `@pancake-pos/app-cli`, `@pancake-pos/eslint-plugin`, `create-pos-app`). The packages are released together under one version number.

- **Deployed apps need nothing:** POS serves the runtime, so fixes and new elements take effect right away. Everything in `api_version` `2026-01` is additive and does not break existing code.
- **Projects in progress should update** to get the new types, code rules, docs and MCP examples. The CLI tells you when a new version is out ([Updating the SDK](/developers/apps/en/sdk#updating-the-sdk)):

```bash
npm i @pancake-pos/ui@latest @pancake-pos/ui-extensions@latest
npm i -D @pancake-pos/app-cli@latest @pancake-pos/eslint-plugin@latest
```

If you use the MCP server, restart it after updating.

## 2026.1.13

- `pos.api` can call the Open API address catalog: `/geo/provinces`, `/geo/districts`, `/geo/communes` (they used to fail with `invalid_path`). Iframe pages need a rebuild with this SDK.

## 2026.1.12

- Iframe pages: while a `PosModal` or `PosDrawer` is open, POS dims its title row, menu and top bar around the iframe like a POS modal; clicking the dimmed area or pressing Esc closes the top-most one. For antd's `Modal`, `Drawer` or another library, use `usePosBackdrop(open, onClose)`. See [Modals and drawers over the whole POS](/developers/apps/en/page-ui#modals-and-drawers-over-the-whole-pos).
- Runtime API: `pos.page.setBackdrop(on)` and the `backdrop-dismiss` event for iframe pages.
- New `page/` rule (warning): antd's `Modal`, `Drawer` and `Modal.confirm` only cover the iframe; use `PosModal`/`PosDrawer`, `pos.ui.modal`/`drawer` or `pos.ui.confirm`.
- `PosModal` no longer focuses its close button and `PosDrawer` no longer draws a focus ring around the screen, like POS modals.
- Deployed iframe pages need a rebuild with this SDK to get the dimming (`@pancake-pos/ui` is bundled into the app).

## 2026.1.11

**Iframe page UI**

- `@pancake-pos/ui` has React components for all 36 `pos-*` elements (`PosPage`, `PosSection`, `PosStat`, `PosTable`…) with the Worker UI names, properties and `{ detail }` events. POS draws Worker UI with these components too, so iframe pages match Worker UI pages pixel for pixel. See [Iframe page UI](/developers/apps/en/page-ui).
- `PosProvider` loads the bundled Inter font, removes the white card around the iframe so the page sits on the gray POS background, and puts the `PosPage` `heading`, `description` and buttons on the POS title row. A page that paints its own full-page white background keeps the old look with `<PosProvider frame="card">`. Apps deployed with an older SDK do not change.
- Color, type and spacing tokens: `tokens`, `@pancake-pos/ui/tokens.css`, `tailwind.css` (Tailwind 4), `tailwind-preset` (Tailwind 3), `fonts.css`. antd strings in Lao.

**Runtime API**

- `pos.ui.modal`, `pos.ui.drawer`: open an iframe page of the app in a modal/drawer over the whole POS from a block, an action or a page; the page inside gets `pos.data.presentation` and closes with a result through `pos.close(result)`.
- `pos.page.setHeader` (heading, description, up to 5 buttons on the title row; `header-action` event) and `pos.page.setFrame` for iframe pages.
- `connect({ optional: true })`, `isEmbedded()`, `PosProvider standalone`, `usePosOptional()`: self-hosted pages that also open outside POS.

**Checks and examples**

- New `page/` rules (warnings): other UI libraries, colors outside the POS palette, hand-formatted money, an entry file without `PosProvider`. `pos-app check` reports `<link>`, `@import` and `@font-face` pointing outside the bundle (the CSP blocks them at run time).
- The `create-pos-app` iframe page uses `PosPage`, `PosFilterBar`, `PosTable`. `get_example` adds `iframe-report` and `self-hosted`.

## 2026.1.10

- `pos-app login` connects through the browser: the POS **Connect CLI** page picks several shops at once, no token to copy. `login --token` still works for CI. Existing projects need to [update the SDK](/developers/apps/en/sdk#updating-the-sdk) first: the older CLI has no browser login and ignores `deploy --all`.
- One app, many shops: `deploy --all` or repeated `--shop`, `versions` lists each shop, new `shops` and `use` commands, `logout --shop`.
- The MCP server is not tied to one shop: new `list_shops` tool; `deploy` takes `shops` or `all`; `get_errors` gathers errors from every shop; `list_shop_meta` and `sample_context` take `shop`.

## 2026.1.9

- The CLI tells you about a newer SDK: `npm run check`, `build`, `deploy` and `dev` print the update command; `--json` results and the MCP tools (`check_app`, `deploy`, `get_errors`) carry an `update` field so AI tools can offer the update. Turn it off with `POS_APP_NO_UPDATE_CHECK=1`.
- Rule `pos-app/valid-elements`: an unknown element, property or event that looks like no known name now suggests updating the SDK (usually code written from newer docs).
- This What's new page.

## 2026.1.8

**Components**

- New: [`pos-switch`](/developers/apps/en/components#pos-switch), [`pos-radio-group`](/developers/apps/en/components#pos-radio-group), [`pos-time-picker`](/developers/apps/en/components#pos-time-picker), [`pos-file-input`](/developers/apps/en/components#pos-file-input) (POS reads CSV/Excel into a table for the app).
- [`pos-table`](/developers/apps/en/components#pos-table): `rows` take Open API records as they are and a column `key` is a path (`customer.name`, `items.0.sku`); an "Actions" column with `rowActions` and `onRowAction`; `copyable` columns.
- `pos-select`: search through the API with `onSearch` and `loading`. `pos-date-picker`: `time` to pick a time as well.
- `pos-modal`: `width` (520, 720, 1000 px). The footer of `pos-modal` and `pos-drawer` also takes `pos-menu-button` and `pos-link`.

**API** ([runtime-api](/developers/apps/en/runtime-api))

- `pos.api.paginate` loads many pages in parallel within the rate limit; `pos.api.get(path, { cache })` keeps catalogs in memory.
- `pos.download({ sheet })`: POS builds an `.xlsx` or `.csv` file from columns and rows.
- `pos.navigate({ resource: 'order', id })` opens an order in a new tab. `pos.format` formats numbers, money and dates like POS. `pos.clipboard.copy`.

**Runtime and tools**

- A value that breaks the schema (wrong type, misplaced element, text too long) no longer stops the extension: POS drops the bad part and writes it to the error log.
- Development mode writes "Standard screens" warnings (`standard_screen`) to the error log, read with `get_errors`.
- MCP tool `get_example`: complete sample apps (report, list with a detail drawer, file import, order form block, print template, hook).

## 2026.1.7

- Elements for report and list screens: `pos-stat`, `pos-date-range`, `pos-menu-button`, `pos-description-list`, `pos-timeline`, `pos-progress`, `pos-empty`, `pos-drawer`.
- `pos-table`: column `format` badge, link, percent, `tones`, `subtitle`, `sortable`, `fixed`, `ellipsis`; `sort`, `summary`, `selectable`, `selected`; events `onSortChange`, `onSelectionChange`, `onCellClick`.
- `pos-chart`: combined bars and lines, horizontal bars, percent. `pos-button`: `icon`, `tooltip`.
- `pos.download` saves a file the app made.
- Rule `pos-app/standard-screen` (warning) following [Standard screens](/developers/apps/en/components#standard-screens); the `create-pos-app` template has a sample report page.
- MCP tools `search_api` and `get_api` look up Open API endpoints.
- Fix: development mode could not load data when POS called the API through `pos.pancake.vn`.

## 2026.1.6

- Docs and the template run the CLI through `npm run …` or `npx @pancake-pos/app-cli …` (the `pos-app` package on npm is not Pancake's).

## 2026.1.5

- Customer targets: `customer.details.action`, `customer.index.action`, `customer.index.selection-action`, `customer.index.column`.

## 2026.1.4

- Worker UI pages (`app.page` with `render: "worker"`) and page elements: `pos-page`, `pos-tabs`, `pos-filter-bar`, `pos-chart`.
- List columns (`<resource>.index.column`), app print templates (`<resource>.print-action`), the customer profile block (`customer.details.block`).
