Tally UI

Changelog

Released changes to the @tallyui packages, newest first, grouped by version and then by package.

4.1.0

@tallyui/database

Patch Changes

  • @tallyui/core@4.1.0

@tallyui/primitives

Patch Changes

  • 26573b4: PortalHost keys each portal by name, so a closing dialog no longer remounts a dialog opened while it animates out.

@tallyui/components

Minor Changes

  • 32852af: OrdersList takes onReopen and onResume. With onReopen, a sale the store refused with coupon_invalid or total_mismatch shows "Reopen" in Needs attention. When the coupons can't be carried exactly, it also offers "Reopen without the coupon: (amount) to collect". It never drops the coupons on its own. A reopened row reads "Reopened as a parked sale." and shows Resume when onResume is passed. Without either prop nothing changes.

    Refusals with these two codes now have their own sentences. In the tender ledger and pane, a held leg shows no Cancel payment, Remove payment or terminal reference. A held leg is money taken before the sale was reopened, or money the store or a closed register's closure already holds.

Patch Changes

  • 52dda13: A closing line keypad no longer swallows the click meant for the next one.

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@4.1.0

@tallyui/pos

Patch Changes

  • @tallyui/core@4.1.0

@tallyui/connector-woocommerce

Patch Changes

  • @tallyui/core@4.1.0

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@4.1.0

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@4.1.0

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@4.1.0

4.0.1

@tallyui/database

Patch Changes

  • @tallyui/core@4.0.1

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@4.0.1

@tallyui/pos

Patch Changes

  • af47cbc: A reopened refused sale keeps the payments it already took when the cashier tenders the rest.
    • @tallyui/core@4.0.1

@tallyui/connector-woocommerce

Patch Changes

  • @tallyui/core@4.0.1

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@4.0.1

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@4.0.1

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@4.0.1

4.0.0

@tallyui/core

Major Changes

  • c83dcda: 4.0.0: the till's customer-display API takes a device key. This is a breaking change for apps that implement DisplaySignalling or call createTillPairing or createTillDisplayService.

    Migration:

    • DisplaySignalling's nine till methods take TillDevice { deviceId, deviceKey } in place of deviceId. Implement the new registerDevice, and handle the device_refused refusal.
    • createTillPairing and createTillDisplayService take device (from createTillDevice) in place of deviceId.
    • Store the device key next to the device id, and never replicate it. An existing till registers on first use and keeps its paired displays.

Minor Changes

  • fae1b1a: @tallyui/core adds MoneyFormatProvider, useFormatMoney and useCurrencySymbol. @tallyui/pos's CurrencyProvider renders the provider, and every @tallyui/components money amount and money-input symbol now reads the store's money format when one is provided. Without a provider, nothing changes. discountLabel takes an optional formatter as its third argument.

  • 028c0e3: ProductCategory takes an optional imageUrl, the category's picture for browse tiles.

  • 3942708: fnv1a32(text, { pad }): the 32-bit FNV-1a hash the platform apps use for database names, as lowercase hex (inventory C22).

  • 81198d2: formatMoney(money, locale, format) takes an optional store money format (MoneyFormat: currency position, thousand and decimal separators, decimals, symbol), as WooCommerce stores set them; without one it reads exactly as before, through Intl. @tallyui/pos's CurrencyProvider now formats through it, and its CurrencyFormat type is MoneyFormat.

  • fed2ec4: order.create version 10: a payment may carry methodId, the payment method's own id (shape-checked: 1–64, no NUL; refused below 10). New wireMethodOf and legMethodId helpers.

  • 1f40158: ratePpmFromPercent is exported from @tallyui/core and @tallyui/core/server (moved from @tallyui/pos, which still re-exports it), so servers can convert rate percentages without vendoring pos.

  • bc9a686: reopenPayloadErrors and updatePayloadErrors accept a baseRevision of up to 128 characters (ADR-090); a store revision is an opaque token, and WooCommerce's is 71. Ids stay at 64.

  • c9403ce: @tallyui/core/server now ships a CommonJS build beside the ESM one, so CommonJS backend plugins can require('@tallyui/core/server'). The ./server export map gains a require condition (dist/server/index.cjs, types dist/server/index.d.cts); import resolves exactly as before. The main entry and ./rxdb stay ESM-only.

  • b6e936c: Breaking for DisplaySignalling implementers

    • The nine till methods take TillDevice { deviceId, deviceKey } in place of deviceId, and registerDevice and the device_refused refusal are new.
    • createTillPairing and createTillDisplayService take device (from createTillDevice) in place of deviceId.
    • Migration: a plugin adds the register route and checks the key on every till route; an app stores the key next to the device id (never replicated); an existing till registers on first use and keeps its paired displays.

    A till now proves itself to the store with a key the store issued, so knowing a till's device id is no longer enough to act as that till on its customer displays.

  • d034d9f: A store can report the lines whose figures it computed differently with the new line_figures_mismatch warning, which parseCommandResult and knownWarnings accept. moneyDivergence(order) gives a sale's differing order figures and line ids, and the orders list counts the differing lines.

  • 82ec063: ServerCapabilities.pluginContract carries /tally/v1/info's top-level pluginContract. The Medusa connector's listOrders sends register filters and 1-6 digit searches (display numbers) through the MedusaPOS plugin's GET /tally/v1/orders at plugin contract 3, reading the rows from the admin API so every order maps the same way; medusaOrderFilters(capabilities) gives the filter fields a store honours (#1114).

  • e48cac6: minorToMajor is exported from the @tallyui/core root and minorUnitDigits from @tallyui/core/server, so each money converter has one name everywhere. currencyDecimals, moneyToMajor and @tallyui/pos's minorToDecimal are deprecated in their favour; nothing is removed.

  • ccb28e1: normalizeMoneyText(text, format?) reads a typed amount in the store's separators, and useMoneyFormat() returns the nearest MoneyFormatProvider's format (#672).

  • 1821a2c: order.create version 11: version 10 plus the customer's billing / shipping on a sale with no taxAddress, as informational fields. SUPPORTED_ORDER_CREATE_VERSIONS and the version types gain 11; precheckCommand accepts untaxed addresses at 11 and still refuses them at 9 and 10.

  • 74191f9: @tallyui/core: order.create version 12 is 11 plus customer.taxIds, a catalogue line's sku and order meta, as informational fields, with their shape and bound checks in precheckCommand and the ORDER_TAX_IDS_MAX, ORDER_TAX_ID_TYPE_MAX, ORDER_TAX_ID_VALUE_MAX, ORDER_META_MAX, ORDER_META_KEY_MAX and ORDER_LINE_SKU_MAX constants (ADR-092).

    @tallyui/pos: the till sends a sale's tax ids, meta and edited catalogue SKU at order.create 12 (INFORMATIONAL_EXTRAS_ORDER_CREATE_VERSION, now ORDER_CREATE_MAX_VERSION) only when the store's cap allows it, and pos_orders goes to schema 18 (identity migration, one-way like 17) to store them and attentionHandledFor. markAttentionHandled(orders, orderId) marks a refused or warned order handled, and needsAttention leaves it out until a requeue gives it a new command id.

  • 0eb7640: order.create version 9 (#790): OrderCreateCoupon.lines (OrderCreateCouponLine) carries each coupon's share of each line. SUPPORTED_ORDER_CREATE_VERSIONS adds 9, precheckCommand, payloadShapeErrors and payloadBoundErrors check it (docs/contract/order-create-v9.md), and version 9 needs no taxAddress.

  • f5a739f: order.reopen version 1 (ADR-090), an online command that reopens a store order for editing. @tallyui/core adds the envelope, payload and result types, reopenPayloadErrors (the strict shape check), the order.reopen type in validateBatch, an optional orderReopen list in precheckCommand, the reopen result in parseCommandResult, the refusal codes (payment_in_motion, order_state, revision_conflict, forbidden), SUPPORTED_ORDER_REOPEN_VERSIONS and the orderReopen capability from /tally/v1/info. Nothing sends it yet.

  • 3b25108: order.update v1 (ADR-090): the contract for sending a reopened sale's whole new state. Types, a payload shape check (updatePayloadErrors), store ids on kept lines, fees and shipping (storeLineId) and on payments (paymentId), precheck, the orderUpdate capability and SUPPORTED_ORDER_UPDATE_VERSIONS. Nothing sends it yet.

  • 7a6075b: @tallyui/core adds the ProductTerm type and an optional getTerms product trait, so a connector can report a product's terms (facet values, tags, brands) each in its group; without it a product has no terms. @tallyui/pos adds productTerms, listTermGroups (each group and term once, sorted by name like listCategories) and hasTerm.

  • 2cb63cb: ServerCapabilities.receiptEmail: parseInfoCapabilities reads /tally/v1/info's receiptEmail: { v: n } (a safe integer above 0); a malformed value is left out with one warning.

  • 6e191c9: New exports the platform apps copied before: deriveSessionFigures and deriveVariance on @tallyui/core's browser-safe main entry; tenderLabel and a new syncStatusQuiet predicate (true when SyncStatus would show only "Sales are up to date.") on @tallyui/components.

  • 2bdae98: Adds an optional, online closures connector surface (ADR-093): read the store's Z closures, append a recount and record a reprint. Correction and ApproverCredentials move to core (pos and the Woo connector re-export them); Correction gains late_refund, which deriveSettled counts on the refund side. The Woo connector implements it for WCPOS 2.0.

  • f51a692: A store order read now carries what a reopen needs to write the order back: the order's revision, an id on each fee, shipping line and payment record, and the recorded taxStatus on a fee or shipping line, a fee's taxClass and a shipping line's methodId. All new fields are optional. The WooCommerce connector fills them from the order resource and the WCPOS payment ledger.

    An order list page now leaves out an order the connector cannot read and counts it in unreadable, instead of failing the whole page. An order whose payment record the connector cannot read carries paymentRecordUnreadable.

  • 28ba50e: StoreTaxRate gains optional rules for a backend's override-rate conditions.

  • cc6f6cf: StoreSettings gains preventOverselling and StockLevel gains backorders (no | notify | yes). The WooCommerce connector reads the store's prevent_overselling and each product's and variation's backorders, which WCPOS v2's stock guard needs. The product schema goes to version 3, so a till resyncs its products once.

  • 23a6813: StoreSettings.moneyFormat carries the store's own money format (core's MoneyFormat). The WooCommerce connector fills it from WCPOS's store row (currency position, thousand and decimal separators, decimals) and WooCommerce's currency symbol, so CAD reads $; pass it to CurrencyProvider's format.

Patch Changes

  • e928f11: A display's check code is unique among its till's live pending pairings, and the in-memory reference server now rerolls only against that till.

  • ac46fa5: The DisplaySignalling docs now say the till's deviceId is a bearer secret on some backends (ADR-085, #753): an implementation never logs it, puts it in an error, a response or a display's view, or returns it to another device. The pairing and display service options say the same.

  • 61846d3: The tender pane offers every manual-capture payment method the host passes, records each as its wire method plus its own methodId, and labels ledger, takings and report rows with the method's title; takings and report rows key by kind and id (legMethodId), so two methods never merge. takingsByMethod returns an object with no prototype; read it with Object.hasOwn, not hasOwnProperty.

  • c9201a2: Internal tidy: precheckCommand builds its rejections through one helper, core uses OrderCreatePayload internally (the deprecated OrderCreatePayloadV3 alias stays exported), and the order.create version docs now list version 6. Behaviour unchanged.

  • a171cf5: precheckCommand refuses an order.create 9 payload that carries a customer address without taxAddress (#790).

    The order outbox treats an unsupported_version downgrade that would not go strictly lower, or would stay above the store's cap, as a terminal rejection instead of resending (#790).

@tallyui/database

Minor Changes

  • d1edf12: measureCollectionBytes(collection, options?) returns a collection's live document count and data size in bytes (UTF-8 JSON without RxDB metadata, not the bytes on disk), reading a page at a time; signal cancels it.
  • 8db2528: startSyncCadence now returns a SyncCadenceTicker: a SyncCadenceRunner that also exposes its last finished tick (lastTick$, lastTick(): the time, and ok or error), for WCPOS v2's "last check X ago" line. SyncCadenceRunner itself is unchanged, so existing fakes still type-check. A target may return a promise from reSync(); a rejection marks the tick as an error.
  • 7e19b89: resetCollection clears a pulled collection and downloads it again from the start, under a new replication generation. Read replicationGeneration(collection) and pass it as startReplication's generation on every later start.

Patch Changes

  • a1363ea: Internal tidy: the Vendure price fingerprint builds each variant's entry in one place, order history reuses its one tally-fields option, REQUIRED_MULTI_INSTANCE_BY_ENGINE keys on WEB_STORAGE_ENGINE, and stale planning and version comments are corrected. Behaviour unchanged.

@tallyui/primitives

Minor Changes

  • 6929703: On web, Escape now closes an open Select, DropdownMenu (an open sub menu first) and Combobox list through the same layer stack as Popover and Dialog, so one Escape closes only the topmost layer. Select and DropdownMenu Content now honour their onEscapeKeyDown prop, and Combobox Content gains it; call event.preventDefault() there to keep the list open. Native is unchanged.
  • 3dea768: On web, an open Popover.Content closes on Escape and on a pointerdown outside its content and trigger, and calls onEscapeKeyDown and onPointerDownOutside first (preventDefault() keeps it open). Only the topmost open popover or dialog reacts. With a Popover.Overlay mounted, an outside press is still the Overlay's to handle.

Patch Changes

  • 0b3edbb: Combobox's list opens under its input (or trigger), at least its width, inside a centred Dialog too.
  • 1455e76: A click on a Combobox input inside its trigger opens the list and leaves it open.
  • e19664f: Keep force-mounted popovers at their last position while closed and stop their dismissal listeners. Fade the cart line keypad in and out over 200 ms, stopping keyboard input as soon as it closes.
  • 2b00532: Floating content: each popover, select or menu gets its own position style, so opening one no longer moves another.
  • ce450d7: Select, DropdownMenu, HoverCard, Tooltip and ContextMenu inside a centred Dialog open against their trigger on web.
  • 290cf51: On web, a Popover opened from inside a centred Dialog is placed against its trigger.
  • f1748d1: On web, floating content (Popover, Select, DropdownMenu, Tooltip, HoverCard, ContextMenu) is positioned beside its trigger inside the window instead of rendering in the page flow.
  • 968782d: Select: the open list is now at least as wide as its trigger, as in WCPOS v2.

@tallyui/components

Minor Changes

  • 23eb0e4: AccordionContent's className now goes to the inner padded view (default pb-4 pt-0) instead of the outer collapsible container, as in WCPOS v2. This changes what the prop means: a class that used to style the outer container (a border or overflow-*, say) now styles the padded view inside the fold, and a padding class now replaces pb-4 pt-0. No in-repo caller passed className.
  • 3c4b81b: AccordionTrigger draws WCPOS v2's 18px down chevron, on the right by default or before the label with chevronPosition="left", and takes headerClassName for the outer header (merged after flex). The chevron turns 180° and dims to 0.8 opacity over 250ms as the item opens and back over 200ms as it closes; AccordionContent folds open and shut over 200ms on v2's ease, and stays mounted until the fold ends. Under reduced motion both are instant, and forceMount content does not fold.
  • dff924f: AddedToCartToast: v2's one 'added to cart' toast that updates in place and counts a burst of adds.
  • cb3f141: AddressEditor edits an order's billing and shipping as WCPOS v2's address rows: an add button until an address is present, then a summary row with Edit and Remove, and shipping Same as billing until the cashier uses a different address.
  • 83eebf9: AddressFields edits a CustomerAddress's parts (country and state pickers when the app passes them, Email on request, an emptied part removed), and ShippingAddressFields shows shipping as Same as billing until the cashier uses a different address.
  • 8f03c07: BarcodeScanningSettings takes an optional test prop: WCPOS v2's Barcode Scanning Test verdict (scan or typing, Apply suggestions, Shift and trailing Enter notes) for an analysis from analyzeScanTrace.
  • b9fece2: New BarcodeScanningSettings, a port of the Scanning section of WCPOS v2's Settings › Barcode scanning: the scan threshold, minimum length, prefix and suffix, reported through onChange as they change.
  • 4319b3c: Cart: fees and shipping are rows in the cart's Qty / Item / Price / Total columns (the entered amount under Price, the display amount under Total), after the lines, as in WCPOS v2.
  • e9b3851: Cart: a fee or shipping row's Total opens WCPOS v2's line strip, a solid Edit and Remove under the row. Edit opens the charge form on that charge and applies with updateFee / updateShipping; Remove removes it. Replaces the Remove button under each charge row.
  • 0d649c7: Cart takes chargeTaxSwitch={false} to hide the Amount Includes Tax switch on fees and shipping, so a new charge takes the store's tax mode.
  • abf76a8: New CartColumnsForm, v2's Cart Settings › Columns. It has Show switches, nested Split, SKU and On Sale switches, Move up/down, and an optional Restore Default Settings button. It emits a CartColumnSettings value for Cart's columns.
  • 1c5d2f7: The cart's columns setting gains v2's column order, the price.onSale switch for the struck regular price, a read-only regularPrice column, a translated Split link and SKU head, and the newly exported CartColumnId type.
  • 64d2391: Cart takes orderDiscountChips (default true): pass false to leave out the applied order discounts' chips under the lines when the app draws them itself, e.g. as a removable Discount row in afterSubtotal.
  • dea8966: Cart takes an optional picker for WCPOS v2's split-by-item bill: the cart turns read-only and each unpaid line shows this payment's − n of unpaid + stepper with what the picked units add. CartColumnHeads and CartLine take an optional picking, which heads the quantity column "This payment" and widens it for the stepper; Cart sets it while picker is on.
  • 3b2f99a: Cart's lineCommit="close" now gives the price popover WCPOS v2's write-on-close keypad too: Done, Escape discards, and any other close writes the typed price through the same price path and onPriceChange. A price refused on such a close shows under its line until that line's next price write. LinePopover takes onCloseRefused, called with the refusal when a commit="close" write on a close other than Done is refused.
  • c34fc71: CartTotal's tax rows keep the rate's own label and carry WCPOS v2's tag beside it: "Including tax" when taxInclusive is true, "Excluding tax" when it is false, and no tag when it is absent. The old incl. label prefix is gone. Each tax row has the test id cart-total-tax-<index>.
  • 24f2f88: CartTotal takes fees and shipping and shows a Fees and a Shipping row between Discount and the tax rows when each is not 0, and Cart passes the order's fee and shipping lines, so the cart's totals add up to its total, as in WCPOS v2.
  • ae1b243: CashierSheet gains v2's drawer door: the opt-in drawer prop (CashierSheetDrawer) draws "In the drawer" under "Your sales today" with the app's figure, the opener line and the register verbs, and calls drawer.onOpen when pressed.
  • 530744b: CashierSheet gains v2's "Hand the till to" and hold notices: the opt-in handTo prop (CashierSheetHandTo, CashierSheetCashier) lists the other cashiers with their open carts and calls handTo.onHandTo(id) when a row is pressed; paying shows "Finish the payment first" and holds the rows; awaitingStore shows the "Awaiting store" notice.
  • bef8aeb: CashierSheet gains v2's Store and Register rows: the opt-in store and register props (CashierSheetPlace) draw the name with a "Switch" verb that calls onSwitch so the app opens its own picker, and a heldReason line under the row that holds Switch.
  • cb8d977: New CashierSheet: WCPOS v2's cashier sheet on the right edge, with the header (avatar, name and the store · register · "since" line), "Your sales today" and Sign out. It displays what the app passes and calls the app back; Sign out never closes the sheet itself, so the app can ask through SwitchConfirm first.
  • dedcdd3: Catalogue: optional inStockKeepsBackorder keeps backorder products in the grid while the In Stock pill is on (default off, unchanged).
  • 0bdf81c: Catalogue takes rowsSlot (a ReactNode, default none): WCPOS v2's rows between the filter chips and the products (its ListColumn rows), for notices such as "Price check only until the register is open.". It renders under the header, above the grid, the table or the category tiles, with a 16 px gutter around and between the rows. Without it the catalogue renders as before.
  • 7134b8f: Catalogue takes searchAccessory (a ReactNode, default none), rendered at the end of the search row as WCPOS v2 puts the Product settings button beside its search; the Grid/Table ViewToggle (showViewToggle) moves from the status row into the search row, after the camera scan button, as in v2; an empty accessory (false, null, '') draws no row.
  • a4b08be: New CatalogueSettingsForm, v2's product settings: Tile Size (an Auto switch, then a 2 to 8 slider) and a Tile Fields switch per tile word, with an optional Restore Default Settings button; it emits gridColumns for the catalogue view state and a TileFields for Catalogue's tileFields.
  • de520e5: Catalogue: optional termPills shows a searchable single-select term pill per term group (e.g. per Vendure facet) and filters the grid by the picks.
  • 704a0d1: Catalogue takes optional tileFields (v2's Tile Fields), which hides or shows a grid tile's name, price, on-sale strike, SKU, barcode, categories and stock. ProductPrice takes optional showWas. Without them, tiles and prices render as before.
  • 803bbca: Catalogue: variationsStyle="drill" swaps the grid for a variable product's variant tiles (option chips, price, stock), with the product's tile first as Back, as v2's "Open in place".
  • 7be2853: ViewToggle takes variant: 'icon', WCPOS v2's single view-mode button: one press switches to the other view (testID view-toggle on the control and view-toggle-<next view> on the button, labels "Switch to grid view" / "Switch to table view"). Catalogue's search row now draws that form, and caps the search field at max-w-160 on wide windows (not phones: width < 768 or height < 480), as in v2's PageBar, with the row's controls at its right end.
  • fe3bd2a: With categoryBrowse="tiles", an open category's grid starts with the category itself as a back tile (CategoryTile gains back and accessibilityLabel), and a search typed inside a category leaves it and searches every product, as in WCPOS v2.
  • c5fd7f0: CategoryTile takes stacked and mark and falls back to the initial when its photo fails to load, and the Catalogue category browse root draws every tile as a stacked v2 poster with its folder or grid mark, hides empty categories, and ends with a "N categories · M products" footer.
  • 2c680ad: ChargeForm takes allowPercent (a currency-or-% unit toggle on fees) and pricesIncludeTax (an Amount Includes Tax switch on fees and shipping that starts at the store's tax mode, hidden on a percent fee, which is always of the cart in the store's mode), as WCPOS v2's Add Fee and Add Shipping do; Cart passes both and shows a percent fee's Price cell as its percent.
  • 1a77108: ChargeForm follows v2's charge rules: a blank name takes the kind's default (Fee, Shipping, Product), and a fee must be above zero, with v2's messages.
  • 1b2caa8: ComboboxContent takes WCPOS v2's size: 20rem wide (never narrower than its trigger) and at most 18.75rem tall. The new ComboboxList holds the items and scrolls past that, while an input above it stays in place.
  • a1e2b3f: CartFoot takes note?: { text, onPress } and Cart takes checkout.note, drawing WCPOS v2's note row above the Checkout button. It is hidden when the note is empty, quiet at rest, and on hover or focus washes and shows an edit glyph (always shown on a coarse pointer). It is 36 px high with a 44 px touch target, and pressing it calls onPress so the app opens its note editor.
  • 028c0e3: Catalogue takes categoryBrowse: 'chips' | 'tiles' (default 'chips'). With 'tiles' and showCategoryNav, the catalogue opens on WCPOS v2's browse root: All products, then each category as a CategoryTile poster with its product count and picture. A tile opens its products under a "Categories › name" breadcrumb whose first crumb goes back.
  • 8c87fd8: Adds ConfirmDialog: a title, an optional description, Cancel and a confirm button (destructive by default). It opens from a trigger, or is controlled with open and onOpenChange. Settings › Customer display's Forget dialog uses it.
  • 827e008: ConnectivityToast, WCPOS v2's 'Device went offline' / 'Website is unreachable' / 'Connection restored' toast for a connectivity change that holds 5 s.
  • 4341a30: CustomerDropdown pages: browse(page) and search(query, page) load the next 50 at the end of the list, as v2 (absent support: one page, as before).
  • 3f73c6f: CustomerDropdown: optional browse lists customers under Guest for an empty query, as v2 does (absent: unchanged).
  • d3f8db3: CustomerDropdown: Guest shows the person glyph on the chip, and optional onEditAddress/hasAddress add v2's address pin beside the chip (absent: no pin).
  • 924000d: CustomerDropdown: the customer chip opens a search dropdown anchored to it (Guest first, then results), as in WCPOS v2.
  • 6b173bb: DialogContent and AlertDialogContent: fade and scale in and out with WCPOS v2's dialog motion (150ms, scrim 150ms in / 200ms out); instant under reduced motion.
  • 25f8f86: ListRow gains size="sm" (the row height token, 44 at Regular) and selected, v2's current-row mark: the row is painted bg-muted with a primary bar on its left edge, selected={false} keeps the bar's room, and the state is announced as selected (checked on a radio or checkbox).
  • 8980084: ListRow: one flush row of a list as in WCPOS v2: a hairline under it, leading, body and trailing slots, the press and fine-pointer hover wash, the disabled dim, and a button role only when it has an action.
  • fae1b1a: @tallyui/core adds MoneyFormatProvider, useFormatMoney and useCurrencySymbol. @tallyui/pos's CurrencyProvider renders the provider, and every @tallyui/components money amount and money-input symbol now reads the store's money format when one is provided. Without a provider, nothing changes. discountLabel takes an optional formatter as its third argument.
  • 79e5c03: OrderNoteSheet, WCPOS v2's Order details note field; Cart's optional noteSheet opens it from the ⋮ menu and the note row and writes the sale's note (no change without the prop).
  • 358fa6a: OrderStatusBadge renders as StatusBadge, as in WCPOS v2: a coloured dot and a foreground text-sm word with no tinted pill behind it (the bg-*/15 wash, rounded corners and padding are gone). className still lands on the row, so an app that wants a background can pass one.
  • 64f30f9: RegisterBar draws its pill as WCPOS v2's warning dot and word, and its optional awaitingStore counts the sales still to send: 'Offline · N sales to send' offline, 'N sales awaiting store' online when no other pill shows.
  • 96e5b2c: RegisterCount's cash field is a large figure with the currency symbol in the field, as WCPOS v2's count. ClosureSheet leads with the cash variance as a large signed figure under "Variance · short/over/Exact", over Counted and Expected boxes; closure-counted-cash, closure-expected-cash and closure-variance-cash now hold the figure alone (e.g. "€63.30", "−€36.70"); other tenders are unchanged.
  • 502090c: RegisterPanel takes an optional openedBy: { name, avatar? } for the side sheet: the opener's name ends the header line in place of "Cashier", and WCPOS v2's "opened HH:MM by" line with the opener's avatar (or initials) sits under the drawer figure; without it nothing changes.
  • 5f8a7a7: Adds SalesCardPanel: the Sales room's Payments, Top products, Categories and Taxes cards open their figure in full in a right-hand panel, with a title, an optional scope line, a table with a total row, the order count and gross (and any missing cost) in the footer, Close, and Export CSV when onExportCsv is given. A SalesCards head that opens a panel is now 44 pt tall, dims on press and shows a chevron after its figure; without onOpenCard the cards are unchanged.
  • b050d25: DialogContent side="right": slides in and out with WCPOS v2's panel motion (250ms in, 200ms out, scrim fade); instant under reduced motion.
  • a6b7b9a: StatusBadge: a status as a coloured dot and a word, as in WCPOS v2. Variants default, ok, warning, bad, info, muted; size="caption" for a row's state line or a log level.
  • 0a9e866: ToneDisc: the round tone mark a state leads with, as in WCPOS v2: a wash and one glyph per tone (ok, warning, bad, info, muted), sizes sm 44, default 56 and lg 96, and an icon override. Adds the CheckIcon, AlertTriangleIcon, AlertCircleIcon and InfoCircleIcon glyphs. Needs @tallyui/theme with the tone tokens.
  • 10760f4: Nine Tabler nav icons from WCPOS v2's rail: CashRegisterIcon, GiftIcon, ReceiptIcon, DiscountIcon, UsersIcon, ChartLineIcon, ActivityHeartbeatIcon, SettingsIcon and MessageQuestionIcon.
  • 13f14a8: CustomerEditor adds or edits a customer: CustomerForm with its AddressEditor, an explicit Save and Cancel, and the store call, with Save online only.
  • a95ffbf: CustomerForm can take billing and shipping through AddressEditor, an optional Company field and an email error from the caller, and its field labels are translated.
  • 66ba608: CustomerPicker takes showAvatar to draw v2's initials on each result row, and withGuest to draw a Guest row above the results that picks null, as v2's customer select does. Both default to false.
  • db64a8f: New CustomersList: WCPOS v2's Customers screen search field and customer rows (avatar, name, email, city and country), with empty, no-results, loading and error states, drawn from props.
  • 687c1f0: Dialog: opt-in showClose/closeLabel on DialogContent and bordered on DialogFooter draw v2's corner close and footer divider; defaults unchanged.
  • fca7e93: DiscountForm: layout="dialog" gains v2's Quick discount / Coupon tabs when onApplyCoupon is passed. The Coupon tab picks one of the app's coupons (the new DiscountCoupon type) from a searchable list and applies it; a refusal shows inline and the dialog stays open. Without onApplyCoupon the dialog renders as before.
  • f9d9e6b: DiscountForm layout="dialog" (v2 Add Discount) and an optional title; the default rendering is unchanged.
  • 9a7a39f: DiscountForm: the Coupon tab gains v2's "New coupon" (+) button through onNewCoupon, disabled with a reason through newCouponDisabledReason.
  • ad3f7f6: The customer-display settings say when the store no longer recognises this till, instead of asking the cashier to sign in again.
  • 2aed43a: The drill (variationsStyle="drill") has a "Products › name" crumb above the variant tiles, and Escape on web goes back to the products.
  • 9546b46: With variationsStyle="drill", Catalogue draws a variable product's grid tile stacked, as WCPOS v2 does, and each variant tile shows how many of that variant the cart holds, counted from a cartLines line's new optional variantId.
  • 036b664: The order view says which of a sale's tax IDs, custom fields and edited SKUs a downgrade did not send to the store (extrasNotSent, ADR-092 condition 1).
  • 26377f6: ProductFilterBar: optional termGroups adds a searchable single-select term pill per group (e.g. per Vendure facet) after the built-in chips.
  • d034d9f: A store can report the lines whose figures it computed differently with the new line_figures_mismatch warning, which parseCommandResult and knownWarnings accept. moneyDivergence(order) gives a sale's differing order figures and line ids, and the orders list counts the differing lines.
  • 42e1517: LinePopover gains commit="close", WCPOS v2's grow keypad: a full-width Done in place of Apply and Cancel, and on a quantity a − / + stepper row that writes at once, with − turning into Remove at a shown quantity of 1 when onRemove is given. Escape closes without writing, and any other close writes what was typed. Cart opts its quantity popover into it with lineCommit="close" (with lineEditor="popover"), which drops the popover's Remove action in favour of Remove at 1; the price popover keeps Apply and Cancel. The default draws the popover as before.
  • ccb28e1: PriceForm, DiscountForm, RefundForm and CashTendered read typed money in the store's separators from MoneyFormatProvider. parsePrice and parseDiscount take an optional trailing format. Without a format, parsing is unchanged; extra decimal places are still refused, never rounded (#672).
  • b13aefe: product tiles show v2's press veil and the in-cart badge plays v2's count beat, still under reduced motion.
  • 5f465fa: Cart: lines, fees and shipping pulse green when added (lines also on a quantity change), and tint red and collapse when removed, as in WCPOS v2; nothing moves under reduced motion.
  • ed117af: MovementSheet's confirm button names the amount as v2 does ("Put €5.00 in" / "Take €5.00 out", "Put cash in" / "Take cash out" before a valid amount; no sale keeps "Record"), with v2's register.* string keys; RegisterPanel takes movementReasons to replace the reason chips per movement type.
  • d5bfbaa: MovementSheet: v2's reason chips fill the reason field; reasons replaces the defaults.
  • 52b67b4: Shell: NavRail and NavDrawer sit on WCPOS v2's sidebar wash, and the active item lifts to a white square (a tint in dark) with the selected ink. New theme tokens: sidebar, sidebar-foreground, sidebar-border, rail-accent, rail-selected, rail-selected-foreground. Apps with their own theme variants add these six to each variant.
  • d2e8b04: New Notice band (bad, warning, info) for form errors and attention lines, ported from WCPOS v2.
  • b084d5a: OpenSaleTabs shows how long a parked sale has waited, in hours and in the warning colour, once it has waited an hour; OpenSale gains parkedAt.
  • 563e970: OpenSaleTabs takes a className, merged onto the bar's root, so an app that places the tabs at the top of the cart can restyle it.
  • 2163425: OrderDetail: optional onReopen, onSync, onReceipt and reopenDisabled draw v2's pinned order footer; nothing changes when they are omitted.
  • 538a2cd: OrderDetail takes optional onRefund and onDelete: WCPOS v2's Delete and Refund buttons, drawn on the left of the actions row; Delete asks for confirmation first.
  • 14b1dd7: OrderStatusBadge follows WCPOS v2 on four points: 'refunded' now uses the muted tone shared with 'cancelled'; the muted tone's dot is bg-muted-foreground and its word stays in the foreground colour, so the Cancelled dot is visible; 'trash' (Trash) and 'checkout-draft' (Draft) join OrderStatus; and a status the badge does not know shows its raw string in the default (primary) tone instead of "Pending".
  • f82e8cc: OrderStatusBadge: adds WCPOS v2's 'on-hold' (On hold), 'failed' (Failed), 'pos-open' (POS open) and 'pos-partial' (POS partial) statuses with v2's tones. OrderDetail's money rows centre their amounts vertically.
  • c05ed6f: OrderSyncNotices is exported: the per-sale sync notices OrdersList shows (refusal, stuck since, late session, local warnings, note not sent, the store's warnings), with children at Retry's place, for an app's own order screen. OrdersList renders it and looks the same.
  • 0910c36: OrderDetail: optional discount (with coupon codes), shipping (with method), fees and per-rate tax rows, and a meta line under the header, in WCPOS v2's order view order. The hairline now sits above Total.
  • 61846d3: The tender pane offers every manual-capture payment method the host passes, records each as its wire method plus its own methodId, and labels ledger, takings and report rows with the method's title; takings and report rows key by kind and id (legMethodId), so two methods never merge. takingsByMethod returns an object with no prototype; read it with Object.hasOwn, not hasOwnProperty.
  • f6e680d: POSLayout: tabBar="bottom" draws v2's phone tab bar (Products / Cart with a count) and keeps both panes mounted.
  • 46d6dce: POSLayout takes renderCheckout, WCPOS v2's checkout column: when given, its result takes the products column's place and the browse slot unmounts. In the split layout the cart stays beside it (as the tender ledger); in the stacked layout it is the whole body, with no tabs. It is called with the layout in force, so the pane can draw its own ledger when the cart is not on screen.
  • e711ff6: POSLayout takes an optional columnKey: a new key fades the split checkout column in, as WCPOS v2 keys its column (e.g. tender to receipt).
  • d7435c8: Receipts and the orders list show what the store owes back on a reopened sale as Refund due (ReceiptData.refundDueMinor, refundDueOf); the receipt's change no longer includes it.
  • 999bccc: New PrinterForm: the add/edit printer form for PrintingSettings's onAdd and onEdit (network and Print Dialog printers), props only; the app saves the draft.
  • cd10735: PrintingSettings routes each receipt, report and closure template to a printer: new optional templates, routing and onRoutingChange props, with an Auto choice that shows the printer resolvePrinter picks. Without templates it renders as before.
  • 5085261: PrintingSettings takes optional onCopySetupReport and onOpenHelp: each printer's menu gets a "Copy setup report" item that calls the app's handler, and a "Having trouble?" link under the printer list calls onOpenHelp, as in WCPOS v2.
  • 257aafa: New PrintingSettings, a props-only port of the Printers section of WCPOS v2's Settings › Printing: the printer list with Test Print, Edit, Set Default and a confirmed Delete, the empty state, and Add Printer.
  • 1c368cf: ProductFilterBar: optional terms turns Category, Tag and Brand into v2's searchable picker pills; onTermPress still works.
  • 48b07c7: ProductTable takes optional isExpanded, onToggleExpand and renderExpanded: a variable product's thumbnail toggles a block under its row, as WCPOS v2's table. Catalogue opts in with tableRow.expand, drawing each variant as a row with its option chips, price, stock and a + that adds it as the list chooser does.
  • 13b6de6: ProductTable takes cartQuantity(doc), and draws WCPOS v2's in-cart count in the add column: once the cart holds the product, the primary count badge takes the +'s place, labelled "In cart: N", and pressing it adds another as the + does. A product with variants keeps its >. Catalogue's table view passes the counts it already reads from cartLines, as its grid tiles show them.
  • 4b605c3: ProductTable takes showThumbnail and showAddButton, and Catalogue takes tableRow: { thumbnail, addButton } for its table view, drawing WCPOS v2's product table row: the product's thumbnail leads the row (40 px, 56 px under a coarse pointer, an initial tile when there is no image) and a + labelled "Add to cart" ends it, or a > labelled "Variations" for a product with more than one variant. The button calls onSelect exactly as a row press does, once. Both default off. PlusIcon and ChevronRightIcon are new exports.
  • 9f3e83e: New productsScreenColumns and useProductsScreenColumns give ProductTable the read columns of WCPOS v2's Products screen: image, product with its variation count, stock with a Manage switch, stock status, categories and price.
  • 2964ecd: Receipt takes actions: a node that replaces Print receipt and New sale (never printed), or false for no buttons; newSale is then optional.
  • a51d4b2: ReceiptSheet takes an optional email prop (ReceiptSheetEmail) that draws WCPOS v2's receipt email form inside the sheet: "Email Receipt" opens an "Email Address" field prefilled from defaultAddress, an optional "Save email to the customer" switch, v2's offline notice with "Send when online", and an inline error. Send checks the address and calls onSend, which sends or queues in the app and returns a refusal to show or null to close the form. With email given, onEmail is not called; without it the sheet is unchanged.
  • deb2d16: ReceiptSheet: after email.onSend gives null, the sheet says 'Email sent', or 'Receipt email queued' when offline (v2's copy, through the components catalogue).
  • ac15b7a: Receipt takes an optional printed prop: its Print button then reads 'Print again', as ReceiptSheet does.
  • 6d922f9: ReceiptSheet takes optional printers, printerId, autoPrinterName and onPrinterChange, v2's printer switcher, with Auto first. Without printers the Printer row shows printerLabel as before.
  • 6b1eec0: ReceiptSheet draws v2's header close icon, footer top border and print icon; new PrinterIcon.
  • 462cd31: ReceiptSheet takes optional onDownloadPdf and downloadingPdf: WCPOS v2's Download PDF button, drawn between Email Receipt and Print only when onDownloadPdf is given.
  • 70ac42f: New ReceiptSheet, a props-only right-edge sheet that ports the layout of WCPOS v2's receipt print sheet: template choice, printer, the app's preview, and Close, Email Receipt and Print.
  • 30c0cbf: The refund due on a reopened sale now reaches the receipt templates, ESC/POS, the WCPOS template data and the customer display, never as change (ADR-090 gate 36).
  • 1234170: RegisterCount is keypad-first and folds the notes and coins tiles under "Count by notes and coins", closed by default. A new onPrint prop makes Close read "Close & print" and prints the Z report after the close lands.
  • bd6fa29: RegisterCount folds the non-cash tender inputs under an "Other tenders" toggle, closed by default and shown only when the session expects a non-cash tender, as in WCPOS v2.
  • 54c7d97: Reports: the period sales report counts a reopened sale's till money only, leaving out what the store already held, as takings do, and the Z report's breakdowns flag tax_includes_store_paid when its tax rates include tax on amounts paid earlier in the store (TAX_STORE_PAID_NOTE). The closure sheet shows that note when the flag is set.
  • 42ca292: SalesCards takes hide (and SalesRoom takes hideCards) to leave out cards a backend's report cannot fill; without it all six show as before.
  • 21ecf2b: The Sales room's Orders card shows Median and Largest, as v2 does.
  • 6e191c9: New exports the platform apps copied before: deriveSessionFigures and deriveVariance on @tallyui/core's browser-safe main entry; tenderLabel and a new syncStatusQuiet predicate (true when SyncStatus would show only "Sales are up to date.") on @tallyui/components.
  • 26f09ed: AppShell takes navFooter, drawn at the foot of the nav rail and the phone drawer (NavRail and NavDrawer take it as footer), for a line such as the app version; without it nothing changes.
  • d29c19c: Skeleton and skeletonCount (with SKELETON_MAX_ROWS), ported from WCPOS v2: a still, muted placeholder in the shape of what is loading, with row, tile and chip heights from the scale. Catalogue now draws skeleton tiles in the product tile's frame (grid view) or the table's header over skeleton rows (table view) while its first pull runs, instead of the "Loading products…" text; the text stays as the loading container's accessible label. ProductTable gains a loading prop: with no items, it draws its real header and one line placeholder per column cell instead of emptyState.
  • cf276f5: Tender and TenderPane take back={false} to hide the Back button, for a host that leaves the tender stage itself (WCPOS v2's phone checkout); the default still draws Back.
  • 8fbf880: The tender pane leads with the change due once the cash entered covers more than the total, with the tendered amount under it, as WCPOS v2 does.
  • 40cdd3b: TenderPane draws WCPOS v2's Full balance chip (tender-quick-balance) for a picked method that gives no change, such as Card terminal. It reads "Full balance" when the entry already equals the amount due, "Full balance {amount}" otherwise, and "Exact {amount}" while a split plan is active; pressing it only sets the entry. Cash keeps its Exact and quick-cash chips unchanged. New catalogue keys: pos_checkout.full_balance and pos_checkout.full_balance_label.
  • 9432192: Cart's tenderLedger shows the payments ledger (legs, Total, Paid, Remaining) under the cart totals during tender, as WCPOS v2's checkout cart; Tender and TenderPane take ledger={false} to leave it out of the pane.
  • 1219ecf: The tender pane draws its payment methods as WCPOS v2's tiles: an icon above the title, equal-width in rows of five, the picked one bordered.
  • 8a4e608: The tender pane has WCPOS v2's Split chip on its headline: Split the rest offers 2 to 6 equal ways, each payment is pre-typed with its share, and a method tile keeps the share that is due instead of the whole balance.
  • cf82d26: The tender pane leads like WCPOS v2's: a To pay (or Remaining) caption beside Split, the amount being entered as the large figure above the method tiles, and centred quick-cash chips.
  • d44f0d4: TenderPane, Tender and Cart's tenderLedger take an opt-in confirmVoid. With it, Cancel payment on a ledger leg first asks WCPOS v2's "Cancel this payment?", with the leg's amount ("Return {amount} cash to the customer" for cash, else "Void {amount} on {title}"), and sale.voidTender runs only on confirm; Cancel writes nothing. Default false: Cancel payment voids at once, as before.
  • e37578d: useTender: Cart's unit picker and Tender share one reducer; a part pick is refused at any other amount.
  • bcaef94: Catalogue's tileFields now also drives the drill's variant tiles (name and chips, price, SKU, barcode, stock) and the loading skeleton's tile height. Without tileFields they render as before.
  • ab8a86d: Add Shipping and Edit shipping offer No tax on a store that taxes shipping itself when shippingNoTax is set; the cart sets it at order.create 6 or later (#1115).

Patch Changes

  • 9975ed8: POSLayout, CheckoutLayout, SettingsLayout, LiveTabScreen and StoreSettingsChoiceScreen now draw the theme's background (bg-background); they used bg-bg, a class with no token, so they drew none.

  • 7082387: Cart: Remove in a fee or shipping row's line strip flies the row off to the left before the charge is removed, as in WCPOS v2. Reduced motion removes at once. A second press is ignored, and a refused removal brings the row back. A removed row keeps its place and state while it tints and collapses.

  • d0a064f: The cart's Qty head fits at phone width in every scale, and the cart heads read pos_cart.col_* from the components' catalogue.

  • 16e40a3: Show tendered cash and change for picked units on the customer display, count only the applied money as paid, and refuse picks above the balance less payments in motion.

  • 5119d20: Catalogue's category breadcrumb now splits the parent and the category with a chevron icon at wide widths, collapses to one "‹ Categories" control on a phone, wraps a long category name instead of cutting it off, and takes focus when a category is opened from its tile, with Escape going back to the tiles on web.

  • 6af01ae: ChargeForm's submit button reads "Add to Cart" when adding a charge and "Save" when editing one (was "Apply"), as WCPOS v2.

  • 69f335d: ChargeForm: visible, translatable Name and Amount labels; the amount shows the sale currency's symbol as an affix instead of a currency-code placeholder.

  • fac09c0: POSLayout fades the products/checkout column in over 200 ms in the split layout (WCPOS v2 CROSSFADE).

  • 03998b5: CustomerDropdown clears a next page's error once a retry of that page loads.

  • 091d09a: Internal: one reduced-motion hook in components; InCartBadge behaviour is unchanged.

  • e5a6a60: OrdersList explains a sale recorded after its register closed.

  • 76f0747: Rename the filter's PaymentMethodKind to core's PaymentKind and the selector's PaymentMethod to PaymentSelectorMethod, keeping the old names as deprecated aliases.

  • 0c678ba: Receipt shows a line row that has no matching cart discount under its own label.

  • bfb1ad0: Show the unsendable-update message and Retry for pending reopened sales. Tell cashiers to reopen again after a reopen-required or revision-conflict rejection, and offer Retry only when the outbox can requeue the order. The unsendable-update message now tells the cashier what to do.

  • 2c76884: Under a coarse pointer the category chips, tabs, Grid/Table toggle, register bar menu button and camera scan button get a hit area of at least 44 px (v2's MinTargetBand), with each control drawn at its size as before.

  • 612a181: CustomerPicker selects nothing when a customer create resolves after the picker has unmounted (the host closed it mid-create).

  • adbd169: DialogContent side="left" now draws a sheet on the left edge that slides in from the left, as v2's order sheet does; it was drawn as a centred dialog, which also fixes OrderNoteSheet.

  • b6e936c: Breaking for DisplaySignalling implementers

    • The nine till methods take TillDevice { deviceId, deviceKey } in place of deviceId, and registerDevice and the device_refused refusal are new.
    • createTillPairing and createTillDisplayService take device (from createTillDevice) in place of deviceId.
    • Migration: a plugin adds the register route and checks the key on every till route; an app stores the key next to the device id (never replicated); an existing till registers on first use and keeps its paired displays.

    A till now proves itself to the store with a key the store issued, so knowing a till's device id is no longer enough to act as that till on its customer displays.

  • 64e8323: @tallyui/pos now exports tillLegsTheStoreRefuses, the ids of the till legs a reopened sale may not keep once the store's own locked legs cover its total, the same rule finalizeOrder refuses at completion (ADR-090 gate 36c).

    The tender pane disables Complete on a reopened sale whose store payments already cover it while till money sits on the sale, says "The store already holds this sale's payment. Remove the {amount} taken here to finish.", and offers a Remove payment control on each such leg. Its refund-due line now reads from its own pos_checkout.refund_due key.

  • e19664f: Keep force-mounted popovers at their last position while closed and stop their dismissal listeners. Fade the cart line keypad in and out over 200 ms, stopping keyboard input as soon as it closes.

  • 1376e2d: MovementSheet disables Put/Take for an amount with more decimal places than the currency has, or too large to record, with a hint, instead of failing after the tap.

  • de8c530: OpenSaleTabs: ← and → step between the open-sale tabs on the web (v2 cart/tabs.tsx).

  • 1bddd27: OrderStatusBadge: accepts Medusa's 'canceled' as well as 'cancelled', and shows both as "Cancelled", the spelling WCPOS v2 shows.

  • f833598: ProductGrid takes an optional footerSlot, rendered after the last tile inside the list.

  • 95d84b4: ProductTable's loading skeleton rows are now drawn at the height they are counted at (48 px, or the thumbnail plus 13 px), so they fill the table body.

  • cb10230: ReceiptSheet draws its close X and footer divider with Dialog's showClose and bordered; the close X now sits in the sheet's top-right corner.

  • 50fac41: RegisterCount takes an optional failureText, shown when closing the register or going back to selling fails.

  • 7b30c77: RegisterCount takes a note with the close, and ClosureSheet shows it, as v2 does.

  • a25f4f5: MovementSheet, OpenRegisterCard and RegisterCount read amounts in the store's money format. Their prefills and the count keypad write the store's decimal separator.

  • 2431d40: RegisterPanel's side presentation keeps the register-panel-sales-count, -amount and -movements testIDs.

  • ac96645: ChargeForm reads amounts in the store's money format. ChargeForm and CashTendered prefill with the store's decimal separator, so an edited prefill is never read as a thousands group.

  • 839a1ef: SettingsGroup draws no empty card when it has no children (Printers while loading).

  • dec6d41: SwitchConfirm: when signing out with the register still open, "Close register" is the primary button and "Sign out anyway" the outline one, as in WCPOS v2.

  • 940d899: Switch lays its thumb out in a row, so the thumb starts at the track's left edge and slides to its right edge, as in WCPOS v2.

  • 0a10a50: A tender plan records the payment ids on the order when it was set (TenderPlan.before, optional), and its legs are the captured legs not in that list. Voiding a payment taken before a split, or a pending one capturing later, no longer shifts the split's count or its shares. TenderPlan.from is deprecated and read only for a plan without before (#1133).

  • 17ef951: The tender pane shows a reopened order's refund due (its locked legs beyond the new total) as "Refund due", never as till change, and @tallyui/pos now exports lockedRefundDueMinor (ADR-090 gate 36).

  • cc7dbb2: set-split-units refuses a pick above 0 while a plan is set; close-split, set-plan, clear-plan, arm-custom and request-cancel clear the picked units; tender-started takes an optional units (the recorded leg's own) and freezes those, not the raw picks; TenderPane's Take attaches only the picks that stand on the order and passes them to tender-started. A host that owns tenderReducer can no longer record stale picks on a leg or in unitAllocations.

  • 72730f5: Taking a leg records the units picked for it, so a void frees them.

  • bba11e1: A payment leg records the units it paid for (Payment.units), and the tender pane rebuilds its unit allocations from the order's legs when it mounts again (#1133). addTender refuses units on a line that is not on the order, or more units than the line has unpaid.

  • 3456730: Internal tidy: the cart tabs use @tallyui/pos's isPartlyPaid instead of a copy, and the catalogue, stock badge and variations popover share one stock-status label table. Behaviour unchanged.

  • 18b0a2b: ToggleGroupItem shows the pressed style (bg-accent) on the selected item(s), as Toggle does.

  • 6d726e1: Warning words use the darker warning-text ink, as v2 does.

  • dbcbe24: On web, the disabled New coupon button's reason and each order row's hint now reach assistive technology through aria-describedby, since react-native-web drops accessibilityHint.

@tallyui/storage-sqlite

Patch Changes

  • a1363ea: Internal tidy: the Vendure price fingerprint builds each variant's entry in one place, order history reuses its one tally-fields option, REQUIRED_MULTI_INSTANCE_BY_ENGINE keys on WEB_STORAGE_ENGINE, and stale planning and version comments are corrected. Behaviour unchanged.

@tallyui/pos

Major Changes

  • c83dcda: 4.0.0: the till's customer-display API takes a device key. This is a breaking change for apps that implement DisplaySignalling or call createTillPairing or createTillDisplayService.

    Migration:

    • DisplaySignalling's nine till methods take TillDevice { deviceId, deviceKey } in place of deviceId. Implement the new registerDevice, and handle the device_refused refusal.
    • createTillPairing and createTillDisplayService take device (from createTillDevice) in place of deviceId.
    • Store the device key next to the device id, and never replicate it. An existing till registers on first use and keeps its paired displays.

Minor Changes

  • 4843172: analyzeScanTrace (v2's barcode Test panel verdict): a scan or not, the code, the gaps, and one-tap fixes as threshold/minChars/prefix patches; replayWedgeDetector also reports minAvgGapMs.

  • c91ae8c: app_settings keeps cart.columns (the Cart's columns, shows, display options and order; unknown columns, fields and ids are dropped) and cart.openOrdersPosition (top or bottom, default bottom), per device.

  • 16e40a3: Show tendered cash and change for picked units on the customer display, count only the applied money as paid, and refuse picks above the balance less payments in motion.

  • f6bf0ac: addTender takes tenderedMinor for a cash leg with picked units: the leg records the pick's money and keeps the amount handed over and the change.

  • 5c4c408: A fee can be a percentage of the cart (percent on addFee and updateFee). The builder recomputes it from the lines after coupons on every change; a finalized order stores and sends its fixed amount.

  • bd5b295: A fee or shipping charge takes an optional amountIncludesTax, so its amount can include tax, or exclude it, whatever the store's mode is; the order and its payload stay in the order's mode.

  • fd522b2: toCustomerInput and toCustomerPatch turn customer form values into what createCustomer and updateCustomer take, with WCPOS v2's rules: billing's name and email follow the customer's, a linked shipping is billing's copy, and an address is sent whole.

  • b6e936c: Breaking for DisplaySignalling implementers

    • The nine till methods take TillDevice { deviceId, deviceKey } in place of deviceId, and registerDevice and the device_refused refusal are new.
    • createTillPairing and createTillDisplayService take device (from createTillDevice) in place of deviceId.
    • Migration: a plugin adds the register route and checks the key on every till route; an app stores the key next to the device id (never replicated); an existing till registers on first use and keeps its paired displays.

    A till now proves itself to the store with a key the store issued, so knowing a till's device id is no longer enough to act as that till on its customer displays.

  • ad3f7f6: The customer-display settings say when the store no longer recognises this till, instead of asking the cashier to sign in again.

  • d4cd713: A parked or re-taxed sale keeps its split lines: restoreOrderDraft no longer merges equal lines. AddLineInput.separate adds a line that is never merged.

  • d0c69d6: openDrawerJob(profile, id) builds a cash-drawer kick job (kind 'drawer') for an ESC/POS printer, and canOpenDrawer(profile) says whether a printer can take one.

  • 1d13ca2: escpos() gains underline, invert, barcode (CODE128 and EAN13) and qrcode, with the new EscPosBarcodeOptions and EscPosQrOptions types. barcode and qrcode throw a RangeError before writing anything when a value cannot be encoded. Existing commands and encodeEscPos output are unchanged.

  • e4d9851: renderEscpos and encodeThermalTemplate print a thermal receipt template as ESC/POS bytes: styles, wrapped text and rows, rules, CODE128, EAN-13 and QR codes with a text fallback, feeds, cut and drawer, following WCPOS v2's renderer. Nothing uses them yet.

  • 036b664: The order view says which of a sale's tax IDs, custom fields and edited SKUs a downgrade did not send to the store (extrasNotSent, ADR-092 condition 1).

  • 64e8323: @tallyui/pos now exports tillLegsTheStoreRefuses, the ids of the till legs a reopened sale may not keep once the store's own locked legs cover its total, the same rule finalizeOrder refuses at completion (ADR-090 gate 36c).

    The tender pane disables Complete on a reopened sale whose store payments already cover it while till money sits on the sale, says "The store already holds this sale's payment. Remove the {amount} taken here to finish.", and offers a Remove payment control on each such leg. Its refund-due line now reads from its own pos_checkout.refund_due key.

  • d034d9f: A store can report the lines whose figures it computed differently with the new line_figures_mismatch warning, which parseCommandResult and knownWarnings accept. moneyDivergence(order) gives a sale's differing order figures and line ids, and the orders list counts the differing lines.

  • 250fd29: networkSinkFor(profile) prints to a network Epson printer over ePOS-Print or a Star printer over WebPRNT from the browser, through createEscPosTransport. createEpsonEposSink and createStarWebPrntSink build the sinks directly.

  • b084d5a: OpenSaleTabs shows how long a parked sale has waited, in hours and in the warning colour, once it has waited an hour; OpenSale gains parkedAt.

  • 1821a2c: The till sends a sale's untaxed customer addresses at order.create 11 (UNTAXED_ADDRESS_ORDER_CREATE_VERSION, now ORDER_CREATE_MAX_VERSION) when the store's cap is 11 or more and the sale meets 10's requirements; every other sale's version and bytes are unchanged, and below 11 the addresses are dropped, never an error. finalizeOrder stores the customer's non-empty addresses on every order. pos_orders goes to schema 17 (identity migration, one-way like 16): sentVersion and downgradedFrom may be 11.

  • 74191f9: @tallyui/core: order.create version 12 is 11 plus customer.taxIds, a catalogue line's sku and order meta, as informational fields, with their shape and bound checks in precheckCommand and the ORDER_TAX_IDS_MAX, ORDER_TAX_ID_TYPE_MAX, ORDER_TAX_ID_VALUE_MAX, ORDER_META_MAX, ORDER_META_KEY_MAX and ORDER_LINE_SKU_MAX constants (ADR-092).

    @tallyui/pos: the till sends a sale's tax ids, meta and edited catalogue SKU at order.create 12 (INFORMATIONAL_EXTRAS_ORDER_CREATE_VERSION, now ORDER_CREATE_MAX_VERSION) only when the store's cap allows it, and pos_orders goes to schema 18 (identity migration, one-way like 17) to store them and attentionHandledFor. markAttentionHandled(orders, orderId) marks a refused or warned order handled, and needsAttention leaves it out until a requeue gives it a new command id.

  • d5f08c7: order.create version 9 (#790, ADR-088): the order builder splits each store-priced coupon over its lines, finalizeOrder stores the split (PosOrderCoupon.lines, PosOrderCouponLine), and the till sends it as coupons[].lines when the server advertises 9. Below 9 every payload is byte for byte as before. pos_orders goes to schema version 13 (identity migration, one-way) and ORDER_CREATE_MAX_VERSION is 9.

  • 1f3eae7: The order outbox sends a reopened sale (a pos_orders row with storeOrderId) as order.update v1, never order.create (ADR-090 decision 4). New toOrderUpdateEnvelope; toOrderCreateEnvelope throws for such a row. OrderOutboxOptions.transport and useOrderOutbox's transport take OrderCreateEnvelope | OrderUpdateEnvelope. Nothing writes storeOrderId yet.

  • b153da4: OrderOutbox.discard(orderId) and useOrderOutbox().discard remove one rejected sale.

  • 383f99c: createClosureContext({ currency, store, … }) builds the ClosureContext for buildClosureDocument and buildXReportDocument. It has one money formatter (formatDecimalMoney, at the currency's minor-unit digits) and English defaults for every closure label (ENGLISH_CLOSURE_LABELS), so apps no longer assemble it by hand.

  • e5a6a60: reopenRefusedOrder takes closures; a carried sale whose closed session's closure counted it reopens after close and is re-sent with its original time and register, no session and countedInClosureOf. finalizeOrder refuses AFTER_CLOSE_PAYMENTS_CHANGED when such a sale's payment legs, fees, shipping or tax changed, or its total is not the legs' sum; useSale holds those legs. stampSession returns an order with countedInClosureOf unchanged, in no session.

  • 0f04e08: A store-priced coupon can be carried (refused at send, charged at its price) and is sent as line discounts, never as a coupon. pos_orders goes to schema 19. A carried sale parks and resumes with its figures, refuses coupon changes with COUPON_CARRIED, and refuses tender once edited with COUPON_CARRY_STALE. reopenRefusedOrder carries a refused sale's coupons at the amounts charged, refuses with coupon_carry_inexact and toCollectMinor when it cannot, and takes { withoutCoupons: true } as the explicit drop. Receipts show a carried coupon as a row on each line it priced, labelled coupon <code> not accepted at send. isCarriedCouponLabel tells whether a receipt row is a carried coupon's label. A refused coupon sale in a store whose prices include tax carries the exact amount each line was charged when one coupon priced the line, and a carried coupon's receipt rows add up when its lines are in both tax modes. { withoutCoupons: true } refuses carried_draft_exists when a carried draft is already parked. A plain reopenRefusedOrder no longer drops a coupon sale's coupons: pass capabilities (order.create 4 or later) for the carry, and { withoutCoupons: true } for the old drop.

  • 048fbcf: pos_orders goes to schema version 14 (identity migration, one-way, ADR-090 decision 5): a reopened sale's storeOrderId and baseRevision, a line's, fee's and shipping line's storeLineId, and a payment's storePaymentId. Nothing writes them yet, and order.create never sends them.

  • bc9a686: pos_orders goes to schema version 15 (identity migration, one-way, ADR-090): baseRevision may be 128 characters, and a sale may store refundDueMinor. Nothing writes refundDueMinor yet. The store-order rebuild accepts a revision of up to 128 characters, down from 255.

  • fed2ec4: pos_orders goes to schema 16 (identity migration, one-way): a payment may store methodId. addTender/setTender take an optional methodId, kept through finalize, parking and reopen. The outbox sends it only to a store whose order.create cap is 10 or more (then as version 10); below that every payload is unchanged. New takingsByMethod; reportOrderFromPosOrder keys a leg with a methodId by its kind and id (legMethodId; optional methodTitle labels it by its own id). Register rows and payloads are unchanged.

  • 602a062: The order outbox no longer sends a reopened sale whose order.update it cannot build. It keeps the row pending, holds that store order's later rows behind it, and shows it in Needs attention (UPDATE_UNSENDABLE). New isRequeueableOrder(order): requeue() no longer resends a reopened sale refused with reopen_required or revision_conflict.

  • d7435c8: Receipts and the orders list show what the store owes back on a reopened sale as Refund due (ReceiptData.refundDueMinor, refundDueOf); the receipt's change no longer includes it.

  • dff26e6: New reopenStoreOrder reopens a store order from the detail read the cashier opened. It refuses the order before anything is sent when:

    • its status is cancelled, failed or trash;
    • a product is gone from the till's catalogue;
    • it has been paid more than its total;
    • any W2 rebuild check fails.

    It also refuses an order this till already holds: pass useSale().holdsStoreOrder as openHere.

    Otherwise it sends order.reopen with that read's revision, reads the order again and builds the cart from the new read. The pre-check uses the sale's per-customer tax context (taxContextFor). When the answer is unknown, the result carries the envelope; pass it back as resend to retry with the same command id.

    New useSale().openStoreOrder loads the result into an empty sale. Locked store payments no longer stop closeSale or switchSale.

    isReopenOffered now also needs orderCreate 5 or more. A parked reopened order keeps the store's prices when it is resumed.

  • 4e9fd98: finalizeOrder completes a reopened store order (ADR-090): it writes the store ids, the base revision and the refund due, and the row is sent as order.update.

  • 58602f6: A sale's Order can carry the store order it reopens (storeOrder), the store's ids for the lines, fees and shipping it keeps (storeLineId), and the payments the store already holds (storePaymentId, locked). These ids survive resume, re-tax, charge edits and line splits. A locked payment is never removed, voided or replaced by a tender. With no store ids set, nothing changes.

  • e3afcfa: useBarcodeScanner takes an optional fieldPolicy. The default, 'reset', keeps today's rule (keys typed into an input or textarea are never scanned); 'ignore-editable' also leaves keys typed into a select or a contentEditable element alone.

  • 98a0b9a: The wedge detector and useBarcodeScanner take an optional gapRule. The default, 'folded', keeps v2's folded average; 'every' requires every gap in a burst to be under the threshold, so a slower key drops the burst and starts a new one.

  • bbe2e73: useBarcodeScanner takes fieldPolicy: 'hold-money': as 'ignore-editable', except that a money field (an input with inputmode="decimal") holds its keys until the run is known, so a scan never types into an amount and other runs go in at the caret as typing.

  • e826ec0: sendOrderReopen sends an online order.reopen v1 command, at most one per order in flight, and isReopenOffered says when Re-open is offered (ADR-090).

  • 17a248e: The tender reducer takes WCPOS v2 split V1 additively: thenWays on the fixed plan, entryMode with set-entry-mode, percentOfMinor, and pure tenderFigures. SplitTab is deprecated.

  • 8d6fa8b: useSale takes an optional tenderGate, awaited before a tender starts; a refusal stays on the cart and shows its message. Without it startTender is unchanged.

  • 5b1ac68: toOrderUpdateEnvelope builds at order.create version 5 or more, so a reopened sale never drops the store's fees and shipping; a store capped below 5 gets UnsupportedOrderVersionError(5, cap). It refuses a row without baseRevision or without figures, and it pairs kept items' store ids by client id rather than by position (ADR-090). toOrderCreateEnvelope is unchanged.

  • 9169717: app_settings gains print.autoPrintReceipt (default false) and print.templatePrinters (template id to printer profile id, default {}). They are device-local, with no schema change.

  • 7a6075b: @tallyui/core adds the ProductTerm type and an optional getTerms product trait, so a connector can report a product's terms (facet values, tags, brands) each in its group; without it a product has no terms. @tallyui/pos adds productTerms, listTermGroups (each group and term once, sorted by name like listCategories) and hasTerm.

  • 30c0cbf: The refund due on a reopened sale now reaches the receipt templates, ESC/POS, the WCPOS template data and the customer display, never as change (ADR-090 gate 36).

  • 6247788: register_sessions moves to schema version 2. Rows gain count_note, the cashier's note on the close count, which the migration sets to null on every older row; new sessions start with count_note: null. closeSession takes note, and the closure freezes a non-blank note as breakdowns.variance_note.

    Upgrade notes

    • Apps already open the collection with await addRegisterSessionCollection(db), which migrates a version-0 or version-1 collection and keeps the register document.
    • Storage is one-way. Once a till has opened this version, register_sessions is at schema version 2, and an older build shows no sessions until it is upgraded again. Never roll an app back across this version, and never open a second session while it hides the first.
  • 54c7d97: Reports: the period sales report counts a reopened sale's till money only, leaving out what the store already held, as takings do, and the Z report's breakdowns flag tax_includes_store_paid when its tax rates include tax on amounts paid earlier in the store (TAX_STORE_PAID_NOTE). The closure sheet shows that note when the flag is set.

  • ccb6a1e: New resolvePrinter, which picks the printer profile for a receipt template: the cashier's pick for this print, else the device's per-template override, else the first printer that fits the template by paper (the default printer first). Ported from WCPOS v2. Also templateColumns, the column counts a thermal template's paper fits.

  • 3b8de1b: A restored draft (resume, re-tax, a reopened store order) keeps every line, discount, fee, shipping and payment id and its createdAt, so a re-tax no longer renews ids and a store-priced coupon survives it. The builder's add and apply inputs, and OrderBuilderOptions, take an optional id / createdAt; a taken id throws.

  • b11a976: A parked draft with a captured or in-motion payment resumes with its parked coupon amounts; they re-price only once the payment is voided. restoreOrderDraft takes keepCoupons.

  • 25c2133: A resumed or re-taxed sale re-derives each class-taxed line's tax rates from the current tax context (LineItem.taxFromClass); lines added with given rates, drafts parked before this change and paid drafts keep theirs (restoreOrderDraft option keepTaxRates).

  • f1c118f: useSale refuses line and total changes while a till payment on the sale is captured, pending or authorized (SALE_HAS_PAYMENT); void the payment to change the sale.

  • 43b5e78: useSale takes a removal() before a remove and restore()s it, for an Undo on the removed-from-cart toast.

  • a4568f8: useSale().setMeta(key, value) sets one custom field on the sale in the cart (null removes it; a key starting with _ is refused). Fields park and resume with the draft, are stored on the order, and go to the store at order.create 12 when the server lists it.

  • 90d4b5f: On the receipt stage, useSale's add() now starts the next sale (as newSale() does, on the default customer) and adds the entry to it, so a tap or scan after payment begins the next sale as in WCPOS v2; if the new sale is refused, add() returns that refusal and adds nothing. Every line and total change on the receipt (setQuantity, addFee and the rest of the line-lock set) is now refused with the new exported SALE_FINISHED ("This sale is finished. Start a new sale to change it.") instead of SALE_HAS_PAYMENT. startTender() (with or without a tenderGate, including a gate that answers after the sale completed) and cancelTender() now refuse on the receipt with SALE_FINISHED, so a finished sale can no longer be moved back to tender and completed a second time.

  • fa7ba60: useSale().setAddresses(billing, shipping) changes the picked customer's addresses on the open sale, re-taxing it like setCustomer, in the cart only (ADDRESS_CHANGE_REFUSED otherwise). A reopened refused order keeps the addresses it was stored with.

  • 28351ff: useSale().setTaxIds(taxIds) sets the sale's tax ids in the cart (a guest sale and a sale past the cart refuse them); they park and resume with the draft, are stored on the order, and go to the store at order.create 12 when the server lists it. A tax id list the store could not take is refused when it is set (by setTaxIds or setCustomer) and before any tender, the country is upper-cased, and a reopened order keeps its tax ids.

  • b06d09c: useSale().updateLine(lineId, { name, sku, regularUnitPriceMinor }) edits a cart line; a line whose name or SKU differs no longer merges with a new scan of the same product, and an edited catalogue SKU goes to the store at order.create 12 when the server lists it.

  • 21ecf2b: salesFigures totals carry medianMinor and largestMinor (v2's Orders card figures).

  • c4075a9: splitUnitLines(order): each line's charged money for a unit split.

  • 3a9d3ec: Split a payment by units of a line: set-split-units picks units, tender-started with paymentId freezes them to that payment, and paidUnitsByLine / unpaidUnitsByLine / pickedUnitsMinor price the picks exactly. TenderState gains pickedUnits and unitAllocations.

  • 2bdae98: Adds an optional, online closures connector surface (ADR-093): read the store's Z closures, append a recount and record a reprint. Correction and ApproverCredentials move to core (pos and the Woo connector re-export them); Correction gains late_refund, which deriveSettled counts on the refund side. The Woo connector implements it for WCPOS 2.0.

  • 6b68595: addTender counts the units of a pending or authorized leg as taken, and the new heldUnitsByLine gives each line's units held by captured and in-motion legs (#1133).

  • 0a10a50: A tender plan records the payment ids on the order when it was set (TenderPlan.before, optional), and its legs are the captured legs not in that list. Voiding a payment taken before a split, or a pending one capturing later, no longer shifts the split's count or its shares. TenderPlan.from is deprecated and read only for a plan without before (#1133).

  • 17ef951: The tender pane shows a reopened order's refund due (its locked legs beyond the new total) as "Refund due", never as till change, and @tallyui/pos now exports lockedRefundDueMinor (ADR-090 gate 36).

  • a258b43: useSale: a tender start is seen by a setCustomer or setAddresses in the same tick, which now refuse as they do in tender. A re-tax while the tender gate runs now shows the new TENDER_SALE_CHANGED instead of dropping the Pay tap silently.

  • bba11e1: A payment leg records the units it paid for (Payment.units), and the tender pane rebuilds its unit allocations from the order's legs when it mounts again (#1133). addTender refuses units on a line that is not on the order, or more units than the line has unpaid.

  • c900357: Add TileFields, TILE_FIELDS, DEFAULT_TILE_FIELDS and normalizeTileFields, and a device-local catalogue.tileFields app setting that says which words a catalogue grid tile shows. The default is today's tile (name, price with its on-sale strike, stock status); no component reads it yet.

Patch Changes

  • 7b30c77: closeSession stores the count note trimmed.

  • fae1b1a: @tallyui/core adds MoneyFormatProvider, useFormatMoney and useCurrencySymbol. @tallyui/pos's CurrencyProvider renders the provider, and every @tallyui/components money amount and money-input symbol now reads the store's money format when one is provided. Without a provider, nothing changes. discountLabel takes an optional formatter as its third argument.

  • bfb1ad0: Show the unsendable-update message and Retry for pending reopened sales. Tell cashiers to reopen again after a reopen-required or revision-conflict rejection, and offer Retry only when the outbox can requeue the order. The unsendable-update message now tells the cashier what to do.

  • 81198d2: formatMoney(money, locale, format) takes an optional store money format (MoneyFormat: currency position, thousand and decimal separators, decimals, symbol), as WooCommerce stores set them; without one it reads exactly as before, through Intl. @tallyui/pos's CurrencyProvider now formats through it, and its CurrencyFormat type is MoneyFormat.

  • ac46fa5: The DisplaySignalling docs now say the till's deviceId is a bearer secret on some backends (ADR-085, #753): an implementation never logs it, puts it in an error, a response or a display's view, or returns it to another device. The pairing and display service options say the same.

  • 65030d5: The customer display counts only captured payments as paid; failed, voided, pending and authorized legs no longer show in Paid so far.

  • 2efd121: On the receipt, the finished sale also refuses tender, note and customer changes with SALE_FINISHED.

  • 2558765: selectClosureRows now counts a closure with no store_key as the scope's store, as renumbering already does (#665), so a keyless closure that was renumbered shows in this store's Z-report list. openSession without storeKey is deprecated: it warns once (not in production), and storeKey becomes required at the next major.

  • e48cac6: minorToMajor is exported from the @tallyui/core root and minorUnitDigits from @tallyui/core/server, so each money converter has one name everywhere. currencyDecimals, moneyToMajor and @tallyui/pos's minorToDecimal are deprecated in their favour; nothing is removed.

  • 61846d3: The tender pane offers every manual-capture payment method the host passes, records each as its wire method plus its own methodId, and labels ledger, takings and report rows with the method's title; takings and report rows key by kind and id (legMethodId), so two methods never merge. takingsByMethod returns an object with no prototype; read it with Object.hasOwn, not hasOwnProperty.

  • 86533d4: Deprecate the 16 customer-display tuning constants and keyboard-wedge helpers as internal; they leave the public entry at the next major.

  • 1f40158: ratePpmFromPercent now comes from @tallyui/core; the export and its behaviour are unchanged.

  • d641cdf: - reopenRefusedOrder refuses a row carrying a store order (store_order).

    • Locked store payments (storePaymentId) no longer count in register takings, drawer, method totals or the unsynced total.
  • e020d0e: A scanner prefix or suffix longer than one character (such as an AIM symbology id) is now stripped from the edges of a scanned code; before, only a single-character prefix or suffix was ever stripped.

  • 23af8bf: Reprints and Reports recompute the per-rate tax split of a WooCommerce sale with a converted line instead of trusting the stored one, which was wrong for sales finalized before the previous fix (ADR-065). Stored orders are not rewritten.

  • 47b5f78: At register contract 3 a register open, take-overs included, goes as version 3, which a store requiring manager approval needs (#1105).

  • 1f298cf: Register figures and closures keep a payment method id named like an Object.prototype member (__proto__, constructor) as an ordinary key, instead of dropping it or writing to Object.prototype.

  • 28fbf39: Register: a closure stored with no store_key counts as this store's when a refused closure number is renumbered (#665).

  • 49af156: useSale no longer moves a sale's total through its store-priced coupons while a till payment is captured or in motion: stale coupon prices are not priced again automatically then, and repriceCoupons() refuses with the same refusal as the other line and total changes (SALE_HAS_PAYMENT, SALE_FINISHED on the receipt, or SALE_SAVING). The coupons stay stale, so startTender() and complete() keep refusing with COUPONS_REPRICING until the payment is cancelled; then they are priced again. On the receipt, voidTender() and removeTender() now refuse with SALE_FINISHED and leave the finished sale's payments as they are. SALE_HAS_PAYMENT now reads "A payment was taken on this sale. Cancel the payment before changing the sale.", after the Cancel payment button, and setTenderStatus(id, 'failed') clears it once no payment is live.

  • 499bd46: An unedited catalogue SKU longer than 100 characters no longer reads as edited, so it no longer lifts a sale to order.create version 12.

  • 594a53b: Recording a tender keeps the split view open while units are picked, so the Split control matches the picks.

  • cc7dbb2: set-split-units refuses a pick above 0 while a plan is set; close-split, set-plan, clear-plan, arm-custom and request-cancel clear the picked units; tender-started takes an optional units (the recorded leg's own) and freezes those, not the raw picks; TenderPane's Take attaches only the picks that stand on the order and passes them to tender-started. A host that owns tenderReducer can no longer record stale picks on a leg or in unitAllocations.

  • 73a01d3: A voided leg in a split-by-items plan frees its lines again.

  • 1a544e7: Internal tidy: allocateOrderDiscount uses the shared largest-remainder routine, and the order builder applies line and order discounts through one helper. Behaviour and exports unchanged.

  • 9e8f104: Internal tidy: the customer-display modules share one system clock, one set of sale actions and one way to make a display call. Behaviour and exports unchanged.

  • 3ff125d: Internal tidy: the order and register outboxes share one retry-delay function and backoff defaults, and the order outbox validates an advertised order.create max in one place. Behaviour and exports unchanged.

  • c83bb01: Internal tidy: the register hook and writeClosure build payment ledger rows with one function, and the conflict take-over and abandon actions share one fresh read. Behaviour and exports unchanged.

  • 6a7f41b: Internal tidy: the WooCommerce coupon source and discount codes share one customer-id check. Behaviour and exports unchanged.

  • a1363ea: Internal tidy: the Vendure price fingerprint builds each variant's entry in one place, order history reuses its one tally-fields option, REQUIRED_MULTI_INSTANCE_BY_ENGINE keys on WEB_STORAGE_ENGINE, and stale planning and version comments are corrected. Behaviour unchanged.

  • a9111fc: order.create 12 drops a tax id or meta entry the store's shape check would refuse (an empty type, value or key, a _ key, a duplicate key, a country that is not two letters, or entries past the maximum) instead of sending it, so one bad extra never holds the sale.

  • a171cf5: precheckCommand refuses an order.create 9 payload that carries a customer address without taxAddress (#790).

    The order outbox treats an unsupported_version downgrade that would not go strictly lower, or would stay above the store's cap, as a terminal rejection instead of resending (#790).

  • 5c4711c: Fix: a WooCommerce-rounded sale with a line priced in the other tax mode recorded a per-rate tax split (taxByRate, sent to the store, and the Z report's per-rate figures) that differed from its printed receipt. The receipt, the recorded split, Reports and the Z report now share one rule.

  • 1d0e548: In WooCommerce mode, a fee line's tax rounds each rate, then sums, as the store totals it (#1131).

  • 099c8bc: In WooCommerce mode a shipping line marked none is untaxed, as the store saves it.

  • 70ead22: In WooCommerce mode, a shipping line's tax rounds each rate, then sums, as the store totals it (#1120).

@tallyui/theme

Minor Changes

  • 52b67b4: Shell: NavRail and NavDrawer sit on WCPOS v2's sidebar wash, and the active item lifts to a white square (a tint in dark) with the selected ink. New theme tokens: sidebar, sidebar-foreground, sidebar-border, rail-accent, rail-selected, rail-selected-foreground. Apps with their own theme variants add these six to each variant.
  • 3cec48d: Chart colour tokens from WCPOS v2, light and dark: c1–c5 and their aliases chart-1–chart-5 (classes such as bg-c1 and fill-chart-3). Each meets 3:1 on the card. No existing token changes.
  • 622196b: Tone tokens from WCPOS v2, light and dark: ok, ok-bg, warning-text, warning-bg, bad, bad-bg (classes such as bg-ok-bg and text-bad). ok equals success and bad equals destructive; the -bg tokens are the washes behind a tone's glyph or band. No existing token changes.

@tallyui/connector-woocommerce

Minor Changes

  • 2bdae98: Adds an optional, online closures connector surface (ADR-093): read the store's Z closures, append a recount and record a reprint. Correction and ApproverCredentials move to core (pos and the Woo connector re-export them); Correction gains late_refund, which deriveSettled counts on the refund side. The Woo connector implements it for WCPOS 2.0.

  • f51a692: A store order read now carries what a reopen needs to write the order back: the order's revision, an id on each fee, shipping line and payment record, and the recorded taxStatus on a fee or shipping line, a fee's taxClass and a shipping line's methodId. All new fields are optional. The WooCommerce connector fills them from the order resource and the WCPOS payment ledger.

    An order list page now leaves out an order the connector cannot read and counts it in unreadable, instead of failing the whole page. An order whose payment record the connector cannot read carries paymentRecordUnreadable.

  • 5b8ad63: A WooCommerce customer read by search, get, create or update now carries its billing and shipping address, mapped from the Woo address fields under CustomerAddress names. Empty and null fields are left out, an address with no field left is left out, and shipping never carries an email. An edit that saves a read customer's address back now sends the stored address instead of a blank one.

    A customer whose Woo billing holds only contact details (name, company, email, phone) now reads with a billing of those fields. A picked customer's address reaches a sale only on a store whose POS tax basis (tax_based_on) is billing or shipping and that takes order.create 8: there it sets the tax location and goes on the order. On a store taxed on its base address, nothing about the sale changes.

  • c5e8951: Product and variation documents keep WooCommerce's low_stock_amount; the product schema goes to version 4, so a till resyncs its products once.

  • 1d16b4f: Stock WCPOS 2.0.4+ stores (2.0 line) without the order_create_v5 flag take order.create 6 (fees, shipping, custom lines, coupons).

  • 099c8bc: Stock WCPOS 1.10.20+ stores with no capability flags take order.create 7 (fees, shipping, custom lines, coupons, notes); a none shipping line carries its tax status to the store.

  • cc6f6cf: StoreSettings gains preventOverselling and StockLevel gains backorders (no | notify | yes). The WooCommerce connector reads the store's prevent_overselling and each product's and variation's backorders, which WCPOS v2's stock guard needs. The product schema goes to version 3, so a till resyncs its products once.

  • 2de9dca: Send X-WCPOS-Protocol: 3, and pay WCPOS 2.0.x sales through the payment ledger: the order is pushed pending, then each payment is recorded (or a free sale closed) before the sale counts as applied. WCPOS 1.10.x and fork stores get the same push body as before. A ledger sale whose store total differs from the till's is refused before any payment is recorded, and a payment the store may have recorded is retried rather than reported unpaid.

  • b465d5f: Reads WCPOS 2.0's registers (listRegisters) and the store's variance threshold (registerApproval).

  • 33d9d27: Sends register sessions, movements and closures to WCPOS 2.0 (createWooRegisterTransport, wooApproveSession) and reads the store's register_sessions setting as register: 3.

  • 23a6813: StoreSettings.moneyFormat carries the store's own money format (core's MoneyFormat). The WooCommerce connector fills it from WCPOS's store row (currency position, thousand and decimal separators, decimals) and WooCommerce's currency symbol, so CAD reads $; pass it to CurrencyProvider's format.

Patch Changes

  • 1b9f3e0: Internal tidy: the WooCommerce order, customer and order-push code use WCPOS_UUID_META_KEY instead of spelling the meta key, and stale doc comments are corrected (the Woo coupon order.create version, Medusa's ignored maxPages advice, the errors Vendure's gql throws). Behaviour unchanged.
  • e69a10b: Internal tidy: the customer row read, the payment-ledger check and the stored-line lookup are each written once. Behaviour and exports unchanged.
  • 74b6cac: Internal tidy: the command transport resolves its capability options in one place. No behaviour change.
  • 5358713: Internal tidy: the store-settings and payment-method reads share one 401/403 refusal check. Errors are unchanged.
  • 2e98257: On a store whose prices exclude tax, a fee or shipping charge entered as including tax is sent at its 6-decimal net, so the store's tax and total equal the till's (before this, they could differ by 0.01 either way, depending on the rate).
  • 81c579a: The closures and registers readers ask for their own route before the store list, so a store without them gets the empty answer.
  • 3820381: Fix: a WooCommerce order read reports the payments the order actually holds. These are the captured rows of the WCPOS payment ledger, or, for an order without one, a single payment of the total only when the order is paid. An unpaid order no longer reads as fully paid.
  • 316f607: The product pull accepts WCPOS 2.0.x's bare-array /variations answer as well as 1.10.x's sync envelope.

@tallyui/connector-medusa

Minor Changes

  • 28ba50e: Store settings list every tax region's rates as allTaxRates, with rate rules. Display only; the cart's rate is unchanged.
  • 9dc9ce3: Order history for Medusa (ADR-081): createMedusaAdminUserConnector() now has listOrders, getOrders and orderFilters (status, customerId, dateRange), read from the admin API (GET /admin/orders). Money is converted exactly from Medusa's major-unit amounts, and a refunded order reads as sold, with its refunds beside it. New exports: createMedusaOrders, toMedusaStoreOrder, MEDUSA_ORDER_FILTERS.
  • 870f16a: At MedusaPOS plugin contract 4, the Medusa connector's listOrders sends allChannels=true on the plugin orders route, so register filters and display-number searches read every sales channel, like the admin list. Contract 3 is unchanged and stays scoped to the till's channel (#1125). MEDUSA_ALL_CHANNELS_PLUGIN_CONTRACT names the contract.
  • 82ec063: ServerCapabilities.pluginContract carries /tally/v1/info's top-level pluginContract. The Medusa connector's listOrders sends register filters and 1-6 digit searches (display numbers) through the MedusaPOS plugin's GET /tally/v1/orders at plugin contract 3, reading the rows from the admin API so every order maps the same way; medusaOrderFilters(capabilities) gives the filter fields a store honours (#1114).

Patch Changes

  • 1b9f3e0: Internal tidy: the WooCommerce order, customer and order-push code use WCPOS_UUID_META_KEY instead of spelling the meta key, and stale doc comments are corrected (the Woo coupon order.create version, Medusa's ignored maxPages advice, the errors Vendure's gql throws). Behaviour unchanged.
  • 568ee6c: Internal tidy: the Admin API reads in the product and variant feeds and the id, price and stock reconcilers share one GET helper, and the price fingerprint builds its base-price entries in one place. Behaviour unchanged.

@tallyui/connector-shopify

Minor Changes

  • 7c813a3: Add createShopifyConnector(), a factory like the other connectors' that builds a fresh connector per call. The static shopifyConnector is built by it and is deprecated; it is not removed.

@tallyui/connector-vendure

Minor Changes

  • 791429d: listVendureCustomers(context, options?) lists a page of the store's customers with Vendure's list options passed through, the store's total, each customer's createdAt and its default billing and shipping addresses.
  • ca32a01: Vendure products now carry their option groups: getVariants gives each variant's options keyed by group name (a cart line reads "Size: 32"), and the new getVariantOptions lists the groups and their values in the order the API returns them for the catalogue's option pickers. The products schema goes from version 2 to 3, so the products collection drops and resyncs once on upgrade (ADR-060 amendment 9); orders, register sessions and stock levels on the till are kept. Take the upgrade on a till while it is online, so the catalogue refills straight away.

Patch Changes

  • 1b9f3e0: Internal tidy: the WooCommerce order, customer and order-push code use WCPOS_UUID_META_KEY instead of spelling the meta key, and stale doc comments are corrected (the Woo coupon order.create version, Medusa's ignored maxPages advice, the errors Vendure's gql throws). Behaviour unchanged.
  • a1363ea: Internal tidy: the Vendure price fingerprint builds each variant's entry in one place, order history reuses its one tally-fields option, REQUIRED_MULTI_INSTANCE_BY_ENGINE keys on WEB_STORAGE_ENGINE, and stale planning and version comments are corrected. Behaviour unchanged.
  • 7d90f84: A Vendure variant whose options all name groups the product does not have now gives options: undefined, as a product with no option groups does, instead of {}.

3.20.1

@tallyui/database

Patch Changes

  • @tallyui/core@3.20.1

@tallyui/components

Patch Changes

  • @tallyui/pos@3.20.1
  • @tallyui/core@3.20.1
  • @tallyui/primitives@3.20.1
  • @tallyui/theme@3.20.1

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.20.1

@tallyui/pos

Patch Changes

  • @tallyui/core@3.20.1

@tallyui/connector-woocommerce

Patch Changes

  • 821fd07: On a tax-inclusive store, a line with a coupon now posts its net before the coupon, so WooCommerce applies the coupon once and stores the total the till charged (it applied it twice: FIVEOFF stored 7.25 against 12.25 charged).
    • @tallyui/core@3.20.1

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.20.1

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.20.1

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@3.20.1

3.20.0

@tallyui/core

Minor Changes

  • 749894f: StoreOrderPage gains an optional total, every order the query matches, and the WooCommerce connector fills it from X-WP-Total, for v2's "Showing N of M" (#769).
  • 5f3475b: StoreSettings gains taxClasses, each tax class's slug and display name, and the WooCommerce connector fills it from taxes/classes, so a renamed class shows its WooCommerce name (#770).

@tallyui/components

Minor Changes

  • e4fb919: CartFoot's Checkout is at least 56 px tall (min-h-14) and its ⋮ is 44 × 44 px (h-11 w-11), WCPOS v2's sizes (#766).
  • 8010117: Cart draws its totals and foot at WCPOS v2's inset (8 px in, 8 px apart), and CartPanel takes a footerClassName for its footer's wrapper (#765).
  • 845b12f: CartTotal and Cart take showTotal (default true) so a v2-style cart can leave out the Total row, and the Total row is font-semibold instead of font-bold, as WCPOS v2 (#781).
  • 378dcc6: ProductTable columns take align and hideHeader, heads are one line and 36 px tall, cells are padded px-3 py-1.5, and the default Price column is right-aligned, matching WCPOS v2's table (#768).
  • 0b34330: Dialog, AlertDialog and NavDrawer backdrops paint the new per-theme scrim token (light 28%, dark 50% of a near-black, as WCPOS v2) instead of bg-black/80 and bg-black/50 (#779).
  • 4244a8d: SearchInput is 44 px tall (h-11), WCPOS v2's search height, instead of sizing itself by padding (#767).
  • 7896999: Switch's off track paints bg-border and Slider's track bg-muted with a bg-card thumb, WCPOS v2's tones, instead of bg-input, bg-secondary and bg-background (#780).

@tallyui/pos

Minor Changes

  • 2879bfd: useStoreSettings's ready state gains refresh(), which re-reads the store's settings in place for v2's tax sync button, with refreshing and refreshError (#771).

Patch Changes

  • 6b16ac6: order.create v4+ sends the right tax-exclusive line discount for a tax-inclusive line that has a till discount and a store-priced coupon; 3.19.0 took the tax after the coupon (#786).

@tallyui/theme

Minor Changes

  • 0b34330: Dialog, AlertDialog and NavDrawer backdrops paint the new per-theme scrim token (light 28%, dark 50% of a near-black, as WCPOS v2) instead of bg-black/80 and bg-black/50 (#779).

@tallyui/connector-woocommerce

Minor Changes

  • 749894f: StoreOrderPage gains an optional total, every order the query matches, and the WooCommerce connector fills it from X-WP-Total, for v2's "Showing N of M" (#769).
  • 5f3475b: StoreSettings gains taxClasses, each tax class's slug and display name, and the WooCommerce connector fills it from taxes/classes, so a renamed class shows its WooCommerce name (#770).

3.19.0

@tallyui/core

Minor Changes

  • a3387fc: Customers carry an optional createdAt, and the optional connector method searchCustomersPage returns a page of a customer search with the store's total (CustomerPage); the WooCommerce connector fills both, from date_created_gmt and the X-WP-Total header (#680).

  • 1af7329: The second-device customer display's signalling seam (ADR-085 U2, #684, #705). TallyConnector.displaySignalling is an optional DisplaySignalling: a till side (mint a code, list pending claims with their check codes, confirm or decline, list and forget displays, a signal mailbox, the snapshot post) under a cashier session holding customer_display.pair (DISPLAY_PAIR_CAPABILITY), and a display side (claim, collect the token once, its own mailbox, the snapshot read) gated by the display's token. Every refusal is a DisplaySignallingError. ServerCapabilities.customerDisplay carries /tally/v1/info's display advertisement, read by parseDisplayAdvertisement with DEFAULT_ICE_SERVERS. rateLimitSource keys failed claims per source (IPv6 by /64). @tallyui/core/server adds createMemoryDisplaySignalling, an in-memory reference server, and displaySignallingContract, the shared suite each plugin's connector runs against its own routes through a DisplaySignallingHarness.

  • 434c143: order.create version 8 taxes a sale on the customer's address (#722, step 2). Version 8 is version 7 plus payload.taxAddress ('billing' or 'shipping', the address the till matched the rates against) and the customer's billing and shipping addresses. A till sends 8 only when a sale was taxed on one of the customer's addresses, and never downgrades such a sale: capped below 8, toOrderCreateEnvelope throws UnsupportedOrderVersionError(8, cap) and the outbox sends it at 8, never at a version whose server would tax it on the base. A sale taxed on the base sends the same bytes as before. The server precheck refuses taxAddress or customer addresses below 8, and 8 without taxAddress.

    @tallyui/pos: saleTaxContexts(settings, { orderCreateVersion }) re-matches rates by the customer's address only from order.create 8 (TAX_ADDRESS_ORDER_CREATE_VERSION); without the option, or below 8, every customer gets the store's context. finalizeOrder takes taxLocation and stores the tax address with the customer's addresses. useSale refuses a customer whose rates differ from the sale's once tender has begun (CUSTOMER_RETAX_REFUSED), telling the cashier to cancel the payment and change the customer in the cart, or start a new order. This is an interim: #759 re-taxes the sale on a customer change, as WCPOS v2 does. pos_orders moves to schema 12; its migration is the identity, and a schema-11 till opening a schema-12 store finds no orders.

    @tallyui/connector-woocommerce: wooStoreSettings fills taxRateTable whenever the store has a base address and advertises order.create 8 where it advertised 7. toWooOrderPayload sends a version-8 sale's tax address as WCPOS's _woocommerce_pos_tax_based_on meta, with the customer's billing and shipping addresses.

  • a15835f: ListOrdersQuery takes v2's order-history filters (#721): status, customerId, cashierId, registerId, paymentMethod, storeId, createdVia and dateRange (after and before as ISO 8601 UTC instants ending in Z). A connector lists the fields its listOrders honours in the new optional TallyConnector.orderFilters and maps each its own way; any other set field is refused with UnsupportedOrderFilterError (code: 'unsupported_order_filter', fields), which assertOrderFiltersSupported gives. Also exports OrderFilterField, ORDER_FILTER_FIELDS, orderFilterFields and assertOrderDateRange.

  • f819768: receiptTemplates() lists the store's renderable print templates; WooCommerce reads them from the WCPOS templates route and labels them with the wcpos data model.

  • 2e691f2: OrderBuilder.setCoupons takes a store-priced coupon context (StorePricedCouponContext): the store's per-line amounts come off the lines in any rounding mode, Order.coupons and display.coupons carry each code's share of the settlement totals, and couponPricesStale flags an order changed since the store priced it, which finalizeOrder refuses; couponPricingBasis gives what the prices depend on. parseInfoCapabilities reads coupons: true from /tally/v1/info (#709).

  • 3a6eb07: SyncContext takes an optional fetch, resolved per request and defaulting to globalThis.fetch, so a host can pass a wrapper such as meteredFetch to count requests. The WooCommerce connector sends every pull, reconcile, settings, payment-methods, receipt-templates and customers request through context.fetch when it is set.

  • 41aa864: WooCommerce's tax location, the pure pieces (#722). woocommerceTax.orderTaxLocation(base, taxBasedOn, order?) resolves the address an order is taxed by, as WC_Abstract_Order::get_tax_location() does: shipping falls back to billing and then to the shop base, billing to the shop base, and the order's _woocommerce_pos_tax_based_on (TAX_BASED_ON_META_KEY) overrides the store's basis when valid; normalizeTaxBasedOn turns anything else into base. StoreSettings gains three optional fields a connector fills: taxBasedOn, baseTaxAddress and taxRateTable (the unfiltered WooCommerce rate table). taxSettingsForLocation(settings, location) in @tallyui/pos re-derives taxRates and taxRatesPpm for an address from taxRateTable (a class's ppm includes compound rates; a class with no matching rate is 0), and returns the settings unchanged when there is no table. Nothing uses them yet.

@tallyui/database

Minor Changes

  • 98f7dfd: A local request_metrics collection keeps one row per hour, and persistRequestMetrics hydrates a request-metrics counter from it, writes the changed hours every 5 minutes and on stop(), and deletes the hours that fall out of the newest 48 (#683).
  • 3e33d02: Hourly request metrics ported from WCPOS v2: createRequestMetrics keeps the newest 48 hourly buckets of requests, bytes, durations, failures and server load, and meteredFetch wraps a fetch so each request is recorded.
  • 6adf1c5: Sync cadence presets (Eco, Balanced, Realtime, ported from WCPOS v2) and a device-local sync_cadence collection that holds the chosen profile, with readSyncCadence, syncCadence$, setSyncCadence and resetSyncCadence.
  • b3f790b: startSyncCadence is an opt-in runner that calls reSync() on its targets on a jittered timer set by the sync cadence profile, and startReplication takes an optional pullBatchSize that overrides the adapter's pull page size (#683).

@tallyui/primitives

Minor Changes

  • e857cf2: Tooltip.Trigger now opens the way the docs describe (#749): hovering opens it after Tooltip.Root's delayDuration (default 0, now read), leaving closes it, keyboard focus opens it and blur closes it; the focus a mouse press causes does not open it. A press no longer opens a tooltip, so a tooltip-wrapped button such as CameraScanButton stops showing its tooltip on press; a press still closes an open tooltip and then calls the trigger's onPress. The new openOnPress prop (default false) brings back press-to-toggle for a trigger that does nothing else; on touch, where there is no hover, the tooltip opens only with openOnPress. The trigger's own onHoverIn, onHoverOut, onFocus and onBlur are still called and onLongPress passes through untouched, a pending hover delay is cancelled by leaving, by a press and by unmounting, and a disabled trigger opens on none of these.

@tallyui/components

Minor Changes

  • d6c93e9: A camera barcode scanner (#720, v2's scan button and inline camera panel). Catalogue takes cameraScan (default false) and cameraScanner; with both it puts a CameraScanButton beside the search box that opens a CameraScannerPanel. The panel calls no pos hook: the app owns useCameraScan (inside its ScanHubProvider) and passes { onDetected: camera.offer, onOpen: camera.reset, scanCount: camera.scanCount }, so accepted decodes go to the scan hub as { source: { kind: 'camera' } } and the app's useBarcodeScanner receives them like device scans. The panel shows v2's status copy, a permission card for native apps, a flash on each scanCount change, and a resize handle with increment and decrement actions and a web pointer drag, reporting the height through onHeightChange. On the web, ScannerViewfinder streams getUserMedia into a <video> and decodes with the BarcodeDetector global when present, or with an injected decoder of the same detect shape; native apps pass their own viewfinder. @tallyui/pos adds useCameraScan (returning CameraScan: offer, reset, scanCount), the pure startDecodeLoop, nativeBarcodeDetector, cameraErrorStatus, detectorFormatToSymbology and their constants, and createScanSession takes continuous, under which a refused repeat restarts its cooldown, so an item resting in view is scanned once.

  • 44e9e5f: Cart takes columns, v2's Cart Settings › Columns (#695): each of Qty, Image, Item, SKU, Price and Total has a show switch, quantity.split adds a Split link under a quantity above 1, and name.sku puts the SKU under the name. The defaults keep today's cart (Qty, Item, Price folding as before, Total). CartColumnHeads and CartLine take the same columns, and CartLine takes sku, imageUrl and onSplit; cartColumnIds gives the visible columns. OrderBuilder.splitLine and useSale().splitLine turn a line of quantity N into N lines of 1, refusing a line with a fixed discount (SPLIT_FIXED_DISCOUNT). cartColumnIds and CartColumnSettings are exported from the @tallyui/components root.

  • 44faba9: An empty Cart now shows v2's empty state: a centred cart icon over one line, and no column heads, totals, Cash and Card terminal row or Checkout foot. A sale error on an empty cart shows under the line. The default line changed from "Scan or tap a product to start a sale." to v2's "Tap a product to start a sale"; emptyText and emptyIcon (null for none) replace them. A cart with only a fee or shipping row keeps its heads and foot and shows no empty line. Adds ShoppingCartIcon.

  • 259398e: In lineEditor="popover" mode the cart line is one row with Discount, Price and Remove in its popovers, and the price popover shows the regular price struck through; LinePopover takes actions and regularValue.

  • d6d37ba: ChargeForm takes kind to open on one kind without the kind row, for apps that host WCPOS v2's cart "+" menu.

  • f256a99: Add Calendar (single and range modes, min/max, a week start; a plain month grid with no new dependency) and the pure month helpers it uses, and DateRangeMenu, the Reports period menu with the date presets beside the calendar (WCPOS v2's date button). The Sales room's period control is now that menu, so a custom range can be picked; SalesFiltersBar takes an optional earliestDay. SalesFilters.preset widens from DatePreset to DatePreset | 'custom', so code that reads it must handle 'custom'. The separate sales-filter-dates text is gone: the menu's trigger shows the dates.

  • 062e6a2: The second-device customer display's two screens (ADR-085 U5, #684). CustomerDisplaySettings is the till's Settings › Customer display: it takes useTillPairing(pairing) and useTillDisplays(service) and lists the paired displays with their state (Connected, Connecting…, Waiting for the display, Offline), forgets one after an AlertDialog confirm, mints a code with its expiry, and shows each "wants to pair" claim with its check code and Confirm and Decline (#705). Every pairing and forget refusal, and the offline and paused statuses, show a line. CustomerDisplayPairing is the display device's screen: it takes useDisplayClient(client), enters the code and the display's name, shows the check code while the cashier confirms, then shows the sale through CustomerDisplayScreen with a small Offline notice when the store can't be reached. A forgotten display goes back to enter-code with its message.

  • 61c02b9: Add OrderFilterBar, WCPOS v2's row of order filter pills (Status, Payment Method, Customer, Cashier, Store / Created via, Register, Date range) with Clear all. It is presentational: the app passes the value, the connector's orderFilters and every option list, and a pill shows only when its field is supported. pos adds OrderFilterValue and orderFiltersQuery(value, timezone), which turns the bar's value into ListOrdersQuery filter fields, with the store-day range as UTC instants (before exclusive).

  • e2be8d1: RegisterPanel takes presentation="side", WCPOS v2's right-hand register sheet (#716): a header with the store, "open since", the session's age and the opener; the cash expected in large type "in the drawer"; Session sales with the sales count; the Paid in, Paid out and No sale tiles; the drawer ledger (Float, Cash sales, Cash refunds, Paid in, Paid out and No sale, each with its count, then Expected in the drawer); Other tenders; and a footer with Print X-report and Close register. Blind counting hides every figure. The new storeName, onPrintXReport and now props serve the side sheet; the default presentation="dialog" is unchanged. DialogContent takes side="right". deriveDrawerTerms gives deriveExpected's figures term by term with row counts and session sales, and useRegisterSession returns them as terms.

  • 1c44032: SelectTrigger now draws a down chevron at its right by default, the v2 way (#717). An app that passes its own chevron as a child must either remove it or pass chevron={false}, or it will show two. Avatar takes tone ('muted', the default and today's look, or 'primary', v2's light initials on a solid primary circle) (#718). CustomerSelect takes showAvatar (off by default) to draw an initials avatar before each row and the selected summary, and avatarTone (default 'primary') (#714). Adds ChevronDownIcon and avatarInitials.

  • aea612a: Switch takes size="sm", a 20 px track (h-5 w-9) with a 16 px thumb for dense settings rows (#758); the default size renders exactly as before.

  • 23ee429: The sale shows how its tax was worked out. @tallyui/pos adds taxDerivation(settings, location), a pure function that explains the sale's tax rates: the "tax based on" setting, the address it used (and any fallback, such as shipping to billing), and each tax class with its effective rate (compound rates included) and the rates that matched, with the reason for each match (postcode, city, state, country or anywhere). When nothing matches, it says why: the order has no address, or the store has no rate for this country or address. SaleTaxLocation types the sale's taxLocation.

    @tallyui/components adds TaxBasedOn, the "Tax based on" trigger and popover that shows that derivation in three steps (setting, address, rates), with optional "Change in Settings › Tax" and "View all tax rates" links. It also adds TaxCalculationSettings, the Settings › Tax "Calculation" group with a "Calculate tax based on" select and read-only rows for prices entered with tax, the shipping tax class and rounding at subtotal, which are set in WooCommerce.

  • 4fef712: Catalogue takes variationsStyle, v2's Product settings › Variations (#719). The default 'list' keeps the variant list chooser; 'popover' opens a grid tile's popover for a product with option groups, where the cashier picks one value per group (values no variant allows are dimmed), sees the matched variant's stock, and presses "Add to Cart: {price}". A full match never adds on its own, and the popover closes after Add. A product without option groups, and the table view, keep the list chooser. Adds VariationPicker to @tallyui/components, and variantFits, matchVariant, disabledOptions and OptionPicks to @tallyui/pos.

Patch Changes

  • 9dda986: CartNoteInput now calls the sale note "Customer note", since WooCommerce sends it as customer_note and it prints on the customer's emails and receipts. The default link reads "Add customer note" (was "Add note") and the default placeholder is "Customer note" (was "Order note..."). A new label prop names the note for the link, the placeholder and the input's accessibility label. Apps passing their own placeholder keep it. Orders now labels the note "Customer note: …" (was "Note: …"), and the line under a note the store could not take reads "The customer note couldn't be sent to the store." on the receipt and in Orders.
  • ceec37c: DialogTitle keeps its leading-none when a caller passes a text size such as text-base, and hands the merged class to Text children; a caller's own leading-* still wins.
  • 9f8d06f: Lighter control borders and a card fill, matching WCPOS v2 (#756). In the light theme --color-input is now #d1d5db (was #848a94), so inputs, selects, toggles and outline buttons get a light grey border that still stands out more than --color-border; the dark theme's value is unchanged. The outline variant of Button and IconButton, and SelectTrigger, now fill with bg-card instead of bg-background, so they read as white controls on a white card in the light theme and as card-coloured controls in the dark theme. Input, Textarea and the Combobox trigger fill with bg-card too, so every bordered control matches.

@tallyui/pos

Minor Changes

  • d6c93e9: A camera barcode scanner (#720, v2's scan button and inline camera panel). Catalogue takes cameraScan (default false) and cameraScanner; with both it puts a CameraScanButton beside the search box that opens a CameraScannerPanel. The panel calls no pos hook: the app owns useCameraScan (inside its ScanHubProvider) and passes { onDetected: camera.offer, onOpen: camera.reset, scanCount: camera.scanCount }, so accepted decodes go to the scan hub as { source: { kind: 'camera' } } and the app's useBarcodeScanner receives them like device scans. The panel shows v2's status copy, a permission card for native apps, a flash on each scanCount change, and a resize handle with increment and decrement actions and a web pointer drag, reporting the height through onHeightChange. On the web, ScannerViewfinder streams getUserMedia into a <video> and decodes with the BarcodeDetector global when present, or with an injected decoder of the same detect shape; native apps pass their own viewfinder. @tallyui/pos adds useCameraScan (returning CameraScan: offer, reset, scanCount), the pure startDecodeLoop, nativeBarcodeDetector, cameraErrorStatus, detectorFormatToSymbology and their constants, and createScanSession takes continuous, under which a refused repeat restarts its cooldown, so an item resting in view is scanned once.

  • 44e9e5f: Cart takes columns, v2's Cart Settings › Columns (#695): each of Qty, Image, Item, SKU, Price and Total has a show switch, quantity.split adds a Split link under a quantity above 1, and name.sku puts the SKU under the name. The defaults keep today's cart (Qty, Item, Price folding as before, Total). CartColumnHeads and CartLine take the same columns, and CartLine takes sku, imageUrl and onSplit; cartColumnIds gives the visible columns. OrderBuilder.splitLine and useSale().splitLine turn a line of quantity N into N lines of 1, refusing a line with a fixed discount (SPLIT_FIXED_DISCOUNT). cartColumnIds and CartColumnSettings are exported from the @tallyui/components root.

  • fab0922: The second-device customer display's client (ADR-085 U5a, #684, #705), exported from the package root. createDisplayClient claims a pairing code, shows the check code while the till's cashier confirms, then collects and keeps the display's token through an injected DisplayTokenStore. Once paired it drains its signalling inbox, answers each offer from its till with a createDisplayPeerLink, says display.hello until the matching display.config arrives, and shows what the till sends. While no link is open it reads the snapshot fallback when the advertisement turns it on, applying a body only when its seq is not lower than the last one applied. A refused token clears the stored token and the screen and goes back to enter-code with forgotten; a network or server failure only marks the display offline. useDisplayClient gives its phase and state to React.

  • b05db01: The second-device customer display's WebRTC transport (ADR-085 U3, #684), exported from the package root. createTillPeerLink (the offerer) and createDisplayPeerLink (the answerer) give a PeerLink: a DisplayTransport over one ordered data channel labelled DISPLAY_CHANNEL, carrying the display envelopes unchanged, with a state of connecting, open or closed and onStateChange. Signalling goes through an injected SignalPort, and the connection comes from an injected PeerFactory (the browser's RTCPeerConnection by default). ICE candidates that arrive before the remote description are queued and applied after it, in order; a malformed or unexpected signal is ignored; a failed step, a failed connection or a closed channel closes the link for good.

  • 6a4529b: createHidScanner reads barcodes from a scanner in USB HID Point-of-Sale mode (usage page 0x8C) through WebHID as a framework-agnostic controller, saving a scanner profile on connect and silently reopening the first granted device that matches a saved profile (#682).

  • 434c143: order.create version 8 taxes a sale on the customer's address (#722, step 2). Version 8 is version 7 plus payload.taxAddress ('billing' or 'shipping', the address the till matched the rates against) and the customer's billing and shipping addresses. A till sends 8 only when a sale was taxed on one of the customer's addresses, and never downgrades such a sale: capped below 8, toOrderCreateEnvelope throws UnsupportedOrderVersionError(8, cap) and the outbox sends it at 8, never at a version whose server would tax it on the base. A sale taxed on the base sends the same bytes as before. The server precheck refuses taxAddress or customer addresses below 8, and 8 without taxAddress.

    @tallyui/pos: saleTaxContexts(settings, { orderCreateVersion }) re-matches rates by the customer's address only from order.create 8 (TAX_ADDRESS_ORDER_CREATE_VERSION); without the option, or below 8, every customer gets the store's context. finalizeOrder takes taxLocation and stores the tax address with the customer's addresses. useSale refuses a customer whose rates differ from the sale's once tender has begun (CUSTOMER_RETAX_REFUSED), telling the cashier to cancel the payment and change the customer in the cart, or start a new order. This is an interim: #759 re-taxes the sale on a customer change, as WCPOS v2 does. pos_orders moves to schema 12; its migration is the identity, and a schema-11 till opening a schema-12 store finds no orders.

    @tallyui/connector-woocommerce: wooStoreSettings fills taxRateTable whenever the store has a base address and advertises order.create 8 where it advertised 7. toWooOrderPayload sends a version-8 sale's tax address as WCPOS's _woocommerce_pos_tax_based_on meta, with the customer's billing and shipping addresses.

  • 61c02b9: Add OrderFilterBar, WCPOS v2's row of order filter pills (Status, Payment Method, Customer, Cashier, Store / Created via, Register, Date range) with Clear all. It is presentational: the app passes the value, the connector's orderFilters and every option list, and a pill shows only when its field is supported. pos adds OrderFilterValue and orderFiltersQuery(value, timezone), which turns the bar's value into ListOrdersQuery filter fields, with the store-day range as UTC instants (before exclusive).

  • 94040f9: methodForProvider and methodDrivers pair the store's payment methods with registered payment drivers, as WCPOS v2's app does.

  • e2be8d1: RegisterPanel takes presentation="side", WCPOS v2's right-hand register sheet (#716): a header with the store, "open since", the session's age and the opener; the cash expected in large type "in the drawer"; Session sales with the sales count; the Paid in, Paid out and No sale tiles; the drawer ledger (Float, Cash sales, Cash refunds, Paid in, Paid out and No sale, each with its count, then Expected in the drawer); Other tenders; and a footer with Print X-report and Close register. Blind counting hides every figure. The new storeName, onPrintXReport and now props serve the side sheet; the default presentation="dialog" is unchanged. DialogContent takes side="right". deriveDrawerTerms gives deriveExpected's figures term by term with row counts and session sales, and useRegisterSession returns them as terms.

  • edeadc3: createSaleDisplayPublisher and useSaleDisplay send the live sale to a customer-display DisplayLink, with derivePaymentEvent ported from WCPOS v2.

  • 8352f75: The sale taxes by the customer's address (#722). saleTaxContexts(settings) returns useSale's new taxContextFor option: the tax context for a customer's address as WooCommerce's "Calculate tax based on" picks it, from taxRateTable, cached so that customers matching the same rates share one context (the store's own context for everyone without taxRateTable and baseTaxAddress). With it, each new sale and each resumed sale is taxed for its customer, and setCustomer re-taxes a cart whose new customer moves the rates, keeping its order id, lines, discounts, fees, shipping, note and coupons; a sale in tender, on its receipt or holding captured or moving money keeps its rates, as in WCPOS v2, and a customer set during tender is taxed for when cancelTender() brings the cart back. sale.taxLocation reports the address used, with hasCustomer. CustomerSummary gains optional billing and shipping addresses, kept on the open sale and its draft and never sent. createTaxContext(props) builds TaxProvider's context outside React.

  • 5afa4d2: ScanHubProvider keeps the Web Serial and WebHID scanner connections alive across screens and exposes them through useScanHub and useDeviceScanControls, and useBarcodeScanner now merges those device scans with keyboard-wedge scans, dropping cross-source duplicates with scanTimeOf and reporting each through the new onScanEvent option (#682).

  • d3495c4: The scanner adds a scan hub that merges input sources (createScanHub, createScanBus, inertScanHub), a dedupeScans operator that drops one physical scan reaching the POS through two source kinds within SCAN_DEDUP_WINDOW_MS, and a second onScan argument on the wedge detector, WedgeScanMeta (terminated, startedAtMs).

  • 5cd2720: Add scanner device identity keys, a serial line decoder, a HID POS report decoder, Web Serial and WebHID feature detection, and a device-chooser cancel check, ported from WCPOS v2.

  • 1ce3343: A device-local scanner_profiles collection keyed on scannerDeviceKey(), with helpers to read, observe, save (upsert) and remove scanner profiles (#682).

  • fa69171: createSerialScanner reads barcodes from a USB-serial or Bluetooth SPP scanner through Web Serial as a framework-agnostic controller, saving a scanner profile on connect and silently reopening the one granted port that matches a saved profile (#682).

  • 2e691f2: OrderBuilder.setCoupons takes a store-priced coupon context (StorePricedCouponContext): the store's per-line amounts come off the lines in any rounding mode, Order.coupons and display.coupons carry each code's share of the settlement totals, and couponPricesStale flags an order changed since the store priced it, which finalizeOrder refuses; couponPricingBasis gives what the prices depend on. parseInfoCapabilities reads coupons: true from /tally/v1/info (#709).

  • 73caa25: createStorePricedDiscountCodes({ supports?, price }) gives useSale discount codes for a store that prices its own codes, Medusa promotions first. When the order's store-priced coupon prices go stale, useSale prices its accepted codes again (couponsRepricing, repriceCoupons() for Retry), and startTender and complete() refuse with COUPONS_REPRICING until it has. find may now return a transient refusal, such as COUPONS_NEED_CONNECTION.

  • 23ee429: The sale shows how its tax was worked out. @tallyui/pos adds taxDerivation(settings, location), a pure function that explains the sale's tax rates: the "tax based on" setting, the address it used (and any fallback, such as shipping to billing), and each tax class with its effective rate (compound rates included) and the rates that matched, with the reason for each match (postcode, city, state, country or anywhere). When nothing matches, it says why: the order has no address, or the store has no rate for this country or address. SaleTaxLocation types the sale's taxLocation.

    @tallyui/components adds TaxBasedOn, the "Tax based on" trigger and popover that shows that derivation in three steps (setting, address, rates), with optional "Change in Settings › Tax" and "View all tax rates" links. It also adds TaxCalculationSettings, the Settings › Tax "Calculation" group with a "Calculate tax based on" select and read-only rows for prices entered with tax, the shipping tax class and rounding at subtotal, which are set in WooCommerce.

  • 41aa864: WooCommerce's tax location, the pure pieces (#722). woocommerceTax.orderTaxLocation(base, taxBasedOn, order?) resolves the address an order is taxed by, as WC_Abstract_Order::get_tax_location() does: shipping falls back to billing and then to the shop base, billing to the shop base, and the order's _woocommerce_pos_tax_based_on (TAX_BASED_ON_META_KEY) overrides the store's basis when valid; normalizeTaxBasedOn turns anything else into base. StoreSettings gains three optional fields a connector fills: taxBasedOn, baseTaxAddress and taxRateTable (the unfiltered WooCommerce rate table). taxSettingsForLocation(settings, location) in @tallyui/pos re-derives taxRates and taxRatesPpm for an address from taxRateTable (a class's ppm includes compound rates; a class with no matching rate is 0), and returns the settings unchanged when there is no table. Nothing uses them yet.

  • b3924e8: The till's second-device display service (ADR-085 U4, #684), exported from the package root. createTillDisplayService takes a connector's DisplaySignalling, the cashier session, the till's device id, the store's DisplayAdvertisement and a configFor per display. It lists the displays this till owns every LIST_POLL_MS and on refresh(), keeps one WebRTC link and one display link per display, and fans each showCart and showPayment out to all of them (d9), replaying the current sale into a link made later. A link that drops, or stays connecting past CONNECT_TIMEOUT_MS, is replaced at the next successful list. While a display's channel is not open, createSnapshotSender posts its snapshot fallback (d8): at most one POST a second on the trailing edge, the same body again every 20 s, no re-send of a refused body, the 200 KiB cap with the note cut first, no POST for a display the registry reports offline, and an idle snapshot that clears a recent cart from the server. When the server is lost the service goes offline (d11): open links carry on, and no link is made and no snapshot posted until a list succeeds. forbidden, or no cashier session, pauses every server call; not_found drops that display. The service is a DisplayLink, so createSaleDisplayPublisher drives it.

  • b0901ea: The till's pairing flow for a second-device display (ADR-085 U5, d4, d5, #684), exported from the package root. createTillPairing takes a connector's DisplaySignalling, the cashier session, the till's device id and, optionally, the till display service. start() mints a code and shows it with its expiry; while it shows, the claims on it are listed every PENDING_POLL_MS, each with its display's check code (#705), and at its expiry the pairing goes idle with expired. confirm pairs a claim and refreshes the display service; decline drops it; forget removes a paired display and refreshes the service, and a refused forget shows in forgetError. Every refusal is named (forbidden, limit, expired, not_found, network, server), and with no cashier session nothing is called. useTillPairing and useTillDisplays render a pairing and a display service in React.

  • 4fef712: Catalogue takes variationsStyle, v2's Product settings › Variations (#719). The default 'list' keeps the variant list chooser; 'popover' opens a grid tile's popover for a product with option groups, where the cashier picks one value per group (values no variant allows are dimmed), sees the matched variant's stock, and presses "Add to Cart: {price}". A full match never adds on its own, and the popover closes after Add. A product without option groups, and the table view, keep the list chooser. Adds VariationPicker to @tallyui/components, and variantFits, matchVariant, disabledOptions and OptionPicks to @tallyui/pos.

  • 375a8ce: Print a store's own receipt template from a sale. wcposSourceFromSentOrder, wcposSourceFromPosOrder and wcposSourceFromStoreOrder turn the order as sent, the till's stored order and an order read from the store into a WCPOS receipt source, wcposReceiptContext(config, { pricesIncludeTax }) fills WCPOS's store settings and app context from ReceiptConfig, and renderStoreReceiptTemplate(template, sale, context) renders a fetched wcpos or tallyui receipt template, html or thermal.

  • 152277c: Add WCPOS v2's receipt-data vocabulary. wcposReceiptData(source, store, options) turns a sale in minor units into WCPOS's canonical receipt data (money in major units, the _incl/_excl twins, savings, the tax summary, fiscal and register blocks), and formatWcposReceiptData(data) adds the *_display strings, tax-ID labels and the merged i18n that WCPOS templates print. formatWcposMoney, WCPOS_DEFAULT_I18N and WCPOS_TAX_ID_LABELS are exported too.

@tallyui/theme

Patch Changes

  • 9f8d06f: Lighter control borders and a card fill, matching WCPOS v2 (#756). In the light theme --color-input is now #d1d5db (was #848a94), so inputs, selects, toggles and outline buttons get a light grey border that still stands out more than --color-border; the dark theme's value is unchanged. The outline variant of Button and IconButton, and SelectTrigger, now fill with bg-card instead of bg-background, so they read as white controls on a white card in the light theme and as card-coloured controls in the dark theme. Input, Textarea and the Combobox trigger fill with bg-card too, so every bordered control matches.

@tallyui/connector-woocommerce

Minor Changes

  • a3387fc: Customers carry an optional createdAt, and the optional connector method searchCustomersPage returns a page of a customer search with the store's total (CustomerPage); the WooCommerce connector fills both, from date_created_gmt and the X-WP-Total header (#680).

  • 434c143: order.create version 8 taxes a sale on the customer's address (#722, step 2). Version 8 is version 7 plus payload.taxAddress ('billing' or 'shipping', the address the till matched the rates against) and the customer's billing and shipping addresses. A till sends 8 only when a sale was taxed on one of the customer's addresses, and never downgrades such a sale: capped below 8, toOrderCreateEnvelope throws UnsupportedOrderVersionError(8, cap) and the outbox sends it at 8, never at a version whose server would tax it on the base. A sale taxed on the base sends the same bytes as before. The server precheck refuses taxAddress or customer addresses below 8, and 8 without taxAddress.

    @tallyui/pos: saleTaxContexts(settings, { orderCreateVersion }) re-matches rates by the customer's address only from order.create 8 (TAX_ADDRESS_ORDER_CREATE_VERSION); without the option, or below 8, every customer gets the store's context. finalizeOrder takes taxLocation and stores the tax address with the customer's addresses. useSale refuses a customer whose rates differ from the sale's once tender has begun (CUSTOMER_RETAX_REFUSED), telling the cashier to cancel the payment and change the customer in the cart, or start a new order. This is an interim: #759 re-taxes the sale on a customer change, as WCPOS v2 does. pos_orders moves to schema 12; its migration is the identity, and a schema-11 till opening a schema-12 store finds no orders.

    @tallyui/connector-woocommerce: wooStoreSettings fills taxRateTable whenever the store has a base address and advertises order.create 8 where it advertised 7. toWooOrderPayload sends a version-8 sale's tax address as WCPOS's _woocommerce_pos_tax_based_on meta, with the customer's billing and shipping addresses.

  • f819768: receiptTemplates() lists the store's renderable print templates; WooCommerce reads them from the WCPOS templates route and labels them with the wcpos data model.

  • 3a6eb07: SyncContext takes an optional fetch, resolved per request and defaulting to globalThis.fetch, so a host can pass a wrapper such as meteredFetch to count requests. The WooCommerce connector sends every pull, reconcile, settings, payment-methods, receipt-templates and customers request through context.fetch when it is set.

  • 564433e: listOrders now filters order history on the server. The connector declares orderFilters (status, customerId, cashierId, storeId, createdVia, dateRange, also exported as WOO_ORDER_FILTERS) and sends them to WCPOS wcpos/v2/orders as status, customer, pos_cashier, pos_store, created_via and after/before, with dates_are_gmt=true and the bounds converted to WooCommerce's strict whole-second comparison. registerId and paymentMethod, which WCPOS does not filter on, are refused with UnsupportedOrderFilterError before any request instead of being dropped, and an id that is not all digits, or an empty status or createdVia, resolves an empty page without a request.

  • 5ebdb30: The WooCommerce connector's paymentMethods lists the store's POS-enabled payment gateways from WCPOS's wcpos/v2/payment-methods route, with money limits and cash rounding in minor units, and falls back to cash and the card terminal on a plugin older than 2.0.0 (#679).

  • be21652: A sale's note reaches the WooCommerce order as its customer note (order.create 7, ADR-083), on stores that take coupon orders; on other stores the till shows the note as not sent.

  • 13708fa: The WooCommerce connector reads the store's tax basis and base tax address (#722, step 1). When the store calculates taxes, wooStoreSettings sets taxBasedOn from the store's tax_based_on in wcpos/v2/stores (normalised, so anything other than base, billing or shipping reads as base), and baseTaxAddress to the same address it already matches rates against (tax_address when it has a country, else the store_* fields), with each field a string. It leaves baseTaxAddress out when neither address has a country, and sets neither field when taxes are off. These fields are for display only. The connector does not fill taxRateTable and does not tax by the customer's address, so the rates the cart uses and every amount stay the same. Per-customer taxing comes later, together with an order.create change so that the server agrees.

Patch Changes

  • 369b380: Variable products from WCPOS 1.10.20 and later no longer fail validation in dev builds: a product's stored meta_data now keeps only the entries with string values, so object meta such as _woocommerce_pos_variable_prices is dropped (#713).

3.18.0

@tallyui/core

Minor Changes

  • 455c39f: StoreSettings gains an optional allTaxRates: every tax rate the store defines, with where it applies, for an app's "View all tax rates" table (StoreTaxRate, StoreTaxRateLocation). The WooCommerce connector fills it from the /taxes rates it already reads; the filtered taxRates and taxRatesPpm the cart uses are unchanged (#669).

@tallyui/pos

Minor Changes

  • 6067d23: CurrencyProvider takes an optional format (symbol position, thousand separator, decimal separator, decimals), so useCurrencyFormatter can show money the way a store has set it, as WCPOS v2 does. Without format, money reads exactly as before (#667).
  • 4e0fbb3: useSale takes an optional defaultCustomer, put on every new sale it starts (the first, and each one after complete, discard, park or newSale()), never on a resumed sale, as WCPOS v2 pre-selects its default customer on every new cart. The app decides which customer; without the option nothing changes (#668).

@tallyui/connector-woocommerce

Minor Changes

  • 455c39f: StoreSettings gains an optional allTaxRates: every tax rate the store defines, with where it applies, for an app's "View all tax rates" table (StoreTaxRate, StoreTaxRateLocation). The WooCommerce connector fills it from the /taxes rates it already reads; the filtered taxRates and taxRatesPpm the cart uses are unchanged (#669).

3.17.0

@tallyui/database

Patch Changes

  • @tallyui/core@3.17.0

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.17.0

@tallyui/pos

Minor Changes

  • 4a867a9: Log entries can now say who did something (actor) and how one record's sync went (syncRecord). Register events carry the cashier, and the order outbox logs each order the store accepts, refuses or keeps failing. New presetFilters, hasActor and deriveStuckRecords helpers let a Logs screen show a person's actions and the orders that are still stuck (#656).
  • 1297f1c: useSale().add() now says whether the entry went into the cart: it returns { lineId } for the line it went into, or the refusal message that error shows (the sale is being saved, no price in the sale's currency, or an id or tax code the order can't send). Callers that ignore the result don't change (#662).

Patch Changes

  • 4677f1f: A closure the store refuses because its number is not the next one is now renumbered once from the store's counters and sent again, so the register is no longer stuck. Closures still waiting to send behind it are renumbered with it, and the next closure follows them. If the store refuses the renumbered closure too, it stays refused and shows as a till update that needs attention.
    • @tallyui/core@3.17.0

@tallyui/connector-woocommerce

Patch Changes

  • @tallyui/core@3.17.0

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.17.0

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.17.0

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@3.17.0

3.16.0

@tallyui/database

Patch Changes

  • 1ecd1f1: A sign-in error on the pull now holds the replication instead of pausing it: the pull asks the store nothing and a push waits unsent until resume(), so rows queued before the first push are no longer lost (#645). isPaused() stays false during the hold; watch notice$ for it.
    • @tallyui/core@3.16.0

@tallyui/components

Minor Changes

  • 8d0baa4: Components can now be translated: I18nProvider takes the store's locale (or uses the device's) and the app's catalogues for other languages, falling back from fr_CA to fr to the bundled English, and useT reads a string by key. The tender pane is the first area to read its strings this way; without a provider it still shows English.

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.16.0

@tallyui/pos

Patch Changes

  • 325a540: A till with fresh storage now numbers its next closure after the store's, instead of starting again at 1. The register's closure number and perpetual totals rise to the store's counters, each one on its own, and never go down.
  • 89973e5: Adding, voiding or removing a tender now clears a stale sale error, such as an underpaid refusal, once the payment is corrected. A refused call leaves the error as it was, and a dropped terminal reference still shows its own message.
    • @tallyui/core@3.16.0

@tallyui/connector-woocommerce

Patch Changes

  • @tallyui/core@3.16.0

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.16.0

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.16.0

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@3.16.0

3.15.0

@tallyui/core

Minor Changes

  • c2319ab: Fixes the connectivity label and the update-required latch from 3.14.0.

    • noResponse (@tallyui/core, new): a connector tags its fetch rejections with fetch(url, init).catch(noResponse), so that the neutral rule reads them as offline. A bare TypeError no longer counts as offline, since our own code throws those too; a platform network code such as ECONNREFUSED, on the error or its cause, still does.
    • Any answer from the store ends offline: an error with a numeric status, such as a 401 or a 404, shows the store is reachable.
    • The latch holds a push without dropping it. While it is set, the pull returns empty pages and a push waits, with one error per latch and no retries, and neither calls the store. A push already in flight finishes and is not sent again. resetUpdateRequired() re-probes: the pull asks the store again and held writes go in order.
    • A pause no longer loses or doubles a push that is held, in flight or waiting to retry. The push waits, before and after the send, until the replication starts again. startReplication now retries a failed push itself, still with one error per failed attempt, so a pause during that wait loses no rows. This includes the pause after a sign-in error on the pull. Only a cancel ends the wait.

    Known limit: if a paused replication is cancelled after its rows were sent, the next replication sends them again, because RxDB never recorded them.

@tallyui/database

Patch Changes

  • c2319ab: Fixes the connectivity label and the update-required latch from 3.14.0.

    • noResponse (@tallyui/core, new): a connector tags its fetch rejections with fetch(url, init).catch(noResponse), so that the neutral rule reads them as offline. A bare TypeError no longer counts as offline, since our own code throws those too; a platform network code such as ECONNREFUSED, on the error or its cause, still does.
    • Any answer from the store ends offline: an error with a numeric status, such as a 401 or a 404, shows the store is reachable.
    • The latch holds a push without dropping it. While it is set, the pull returns empty pages and a push waits, with one error per latch and no retries, and neither calls the store. A push already in flight finishes and is not sent again. resetUpdateRequired() re-probes: the pull asks the store again and held writes go in order.
    • A pause no longer loses or doubles a push that is held, in flight or waiting to retry. The push waits, before and after the send, until the replication starts again. startReplication now retries a failed push itself, still with one error per failed attempt, so a pause during that wait loses no rows. This includes the pause after a sign-in error on the pull. Only a cancel ends the wait.

    Known limit: if a paused replication is cancelled after its rows were sent, the next replication sends them again, because RxDB never recorded them.

@tallyui/components

Minor Changes

  • 233cf61: Adds CartFoot, WCPOS v2's cart foot: a "Checkout {total}" button beside a ⋮ menu of actions the app passes as { label, onPress, destructive? } items. Cart gains an optional checkout prop that shows this foot in place of its Cash and Card terminal buttons; without it, Cart is unchanged.
  • 77f3612: Cart can now open WCPOS v2's keypad from a line's quantity or price with lineEditor="popover", and the price keypad carries the quick-discount keys. The keypad is a new shared Keypad component, also used by the tender pane, and LinePopover is exported for apps that build their own lines.

3.14.0

@tallyui/core

Minor Changes

  • c2319ab: Adds a connectivity label and an update-required latch.

    • classifyFailure(): a connector may map its own request failures to offline, degraded or an update-required refusal with this optional method. A connector without it gets a neutral rule: no response is offline, and a timeout or a 5xx is degraded.
    • createConnectivityTracker (@tallyui/database) turns request outcomes into a label for the UI. After 30 seconds of failures it reads offline or degraded, and it goes back to online on the first success. The label only reports: being offline or degraded does not stop replication.
    • The update-required latch is the only thing that holds sync. While it is set, startReplication neither pulls nor pushes, so unsent writes wait in the queue. It stays set until resetUpdateRequired() is called.

@tallyui/database

Minor Changes

  • c2319ab: Adds a connectivity label and an update-required latch.

    • classifyFailure(): a connector may map its own request failures to offline, degraded or an update-required refusal with this optional method. A connector without it gets a neutral rule: no response is offline, and a timeout or a 5xx is degraded.
    • createConnectivityTracker (@tallyui/database) turns request outcomes into a label for the UI. After 30 seconds of failures it reads offline or degraded, and it goes back to online on the first success. The label only reports: being offline or degraded does not stop replication.
    • The update-required latch is the only thing that holds sync. While it is set, startReplication neither pulls nor pushes, so unsent writes wait in the queue. It stays set until resetUpdateRequired() is called.

@tallyui/components

Minor Changes

  • d28e6ea: Adds the app shell from WCPOS v2: AppShell puts a NavRail beside the page on windows at least 768 wide and 480 tall, and a NavDrawer on phones, with aria-current on the active item and a focus-trapped drawer that closes on Escape or a backdrop press. RegisterBar gains optional storeName, cashier, syncStatus and onOpenMenu props, and shows the menu button on its own inside a phone shell.
  • 01580b8: Cart gains an optional orderActions prop, true by default. Pass false when the app hosts the Order discount and Add charge controls in its own menu, as WCPOS v2's cart "+" menu does; applied order discounts, fees and shipping still show with their Remove controls.
  • d544736: Add a customer display that runs in a second window on the same device: a BroadcastChannel transport, a till-side display link that answers the display's hello and returns it to idle after a payment, a useCustomerDisplay hook, and the CustomerDisplayScreen component.
  • 90463af: Adds what an app needs to confirm a cashier switch, a register switch or a sign-out: switchWarnings() lists what the switch leaves behind (unsent sales and till updates, parked sales, a partly paid sale, an open register), and handoverSlip() builds the hand-over slip with a printable X-report envelope. In @tallyui/components, SwitchConfirm asks with WCPOS v2's wording and names each warning, and HandoverSlip shows the slip.
  • 1a5af04: The cart line's Price form can show WCPOS v2's quick-discount keys (quickDiscounts on PriceForm and Cart): a key takes its percentage off the line's current price and Apply writes it. The pos app settings gain cart.quickDiscounts, defaulting to v2's [5, 10, 15] and keeping only percentages above 0 and up to 100.
  • 30cfc94: RegisterCount's approve now receives the count and may return the store's approval and the approvedVariance, which go to closeSession, so a store-verified manager approval works through the shared component; a count edited during approval asks again, and zero-argument approve callers keep working. RegisterPanel shows an "Approval needed" card for a closure the store refused, and its new reapprove prop sends a new approval through reapproveClosure.
  • f68c1d9: Tender is redrawn as WCPOS v2's tender pane, with a balance headline that counts captured payments only, each payment leg with its status and Cancel payment where the method can void it, a keypad, and quick-cash chips for the exact amount and the next 5, 10 and 50; TenderPane is the same pane for a host that owns the tender reducer. SplitTender is now the same component as Tender, and CashTendered's default quick amounts round up to 5, 10 and 50.
  • cdac1c6: The cart now has WCPOS v2's column heads (Qty, Item, Price, Total) through the new CartColumnHeads, and hides the Price column on a narrow cart or a phone. CartLine shows a variation's attributes under its name and, with the new regularUnitPrice prop, the regular price struck through when the line costs less.
  • d96bfc2: Add WCPOS v2's catalogue tile details: InCartBadge shows how many of a product the cart holds (summed by the new cartQuantities from @tallyui/pos), CategoryTile shows a category's photo full-bleed with an initial fallback, and ProductFilterBar brings v2's filter chips with In Stock on by default. Catalogue takes cartLines and showFilterBar to use them.

Patch Changes

  • 0648b18: The register, parked-sales and refund screens now show a thrown error by its message alone, so a cashier reads "Finish or cancel the sale in progress first." rather than "RegisterTenderInProgressError: Finish or cancel…". An error with no message shows "Something went wrong".

@tallyui/pos

Minor Changes

  • d544736: Add a customer display that runs in a second window on the same device: a BroadcastChannel transport, a till-side display link that answers the display's hello and returns it to idle after a payment, a useCustomerDisplay hook, and the CustomerDisplayScreen component.
  • 5f535c8: Adds ESC/POS printing for thermal printers: encodeEscPos lays a receipt out in the printer's columns and code page, escpos is the command builder it uses, and createEscPosTransport sends the bytes to a sink the app supplies (USB, serial, network or Bluetooth) through the print queue.
  • 90463af: Adds what an app needs to confirm a cashier switch, a register switch or a sign-out: switchWarnings() lists what the switch leaves behind (unsent sales and till updates, parked sales, a partly paid sale, an open register), and handoverSlip() builds the hand-over slip with a printable X-report envelope. In @tallyui/components, SwitchConfirm asks with WCPOS v2's wording and names each warning, and HandoverSlip shows the slip.
  • 1a5af04: The cart line's Price form can show WCPOS v2's quick-discount keys (quickDiscounts on PriceForm and Cart): a key takes its percentage off the line's current price and Apply writes it. The pos app settings gain cart.quickDiscounts, defaulting to v2's [5, 10, 15] and keeping only percentages above 0 and up to 100.
  • d96bfc2: Add WCPOS v2's catalogue tile details: InCartBadge shows how many of a product the cart holds (summed by the new cartQuantities from @tallyui/pos), CategoryTile shows a category's photo full-bleed with an initial fallback, and ProductFilterBar brings v2's filter chips with In Stock on by default. Catalogue takes cartLines and showFilterBar to use them.

Patch Changes

  • 5a33bd9: comparisonRange now compares period to date, as WCPOS v2 does: this week so far against the same weekdays of the week before, and this month so far against the same days of the month before (1–10 Nov against 1–10 Oct). Pass the selected preset as the new optional third argument so a short running month is still treated as a month.
  • dddbf6a: Ship @types/mustache as a dependency, so apps that typecheck @tallyui/pos from source no longer fail with TS7016.

@tallyui/connector-woocommerce

Minor Changes

  • add0b19: searchCustomers now lists a first page of customers, by last name as WCPOS v2's customer picker does, when the query is empty or whitespace, so a customer dropdown can show customers as soon as it opens.

3.13.0

@tallyui/core

Minor Changes

  • 73387ab: Adds cashier permissions: a connector may describe the signed-in cashier with an optional cashier() that returns neutral permissions (viewReports, manageClosures, approveVariance, refund, discount). In @tallyui/pos, can() and the useCashier hook read them and give the blind-count flag and a Reports gate; a connector without cashier() still allows everything, as before.
  • 0bf0072: Add an optional, online-only updateCustomer(context, id, patch) connector method with a CustomerPatch type, and let Customer and CustomerInput carry billing and shipping addresses (CustomerAddress) and tax ids (CustomerTaxId).
  • 135eda4: CustomerServiceError now has an optional status: the HTTP status the store answered with, or undefined when no response came. The WooCommerce, Medusa and Vendure connectors set it, so a retry can check the status instead of parsing the message.
  • 7e12633: Core now describes a payment method in a backend-neutral way (PaymentMethodDescriptor), and a connector may list its methods with an optional paymentMethods(). A connector without it still offers cash and the card terminal, through defaultPaymentMethods() and paymentMethodOf().
  • c31eef8: Add the core types for register contract 3 (ADR-082): ServerCapabilities.registerApproval (the store's approval threshold, read from /tally/v1/info), an optional opaque approval on the closure payload, and the register_approval_required and register_approval_invalid conflict codes with their data types.
  • 9f04b1b: Connectors can now offer the store's register directory through an optional listRegisters, which returns each register's id, name, default float and expected close time. @tallyui/pos adds suggestFloat, which suggests a register's opening float: its default float, else the cash counted at the last close.
  • 80c7a6b: A cashier can now add a note to a sale with useSale().setNote(); it is kept when the sale is parked and resumed, and cleared by a new sale. The note is sent to the store as order.create version 7, only to servers that advertise version 7 (ADR-083).

Patch Changes

  • dfda46e: SUPPORTED_ORDER_CREATE_VERSIONS now lists versions 5 and 6, which the till already sends. A new test keeps it in step with the order.create envelope's version type.

@tallyui/database

Patch Changes

  • 6014050: A catalogue reconcile pass that lists no page now skips the deletion check, so it no longer raises a false "kept on this till" message every hour (#376). The WooCommerce catalogue check now restarts in full after its listing fails on a fresh pass, instead of resuming and skipping deletions for a day (#376).

@tallyui/components

Minor Changes

  • 2b4e31d: Adds RefundForm and RefundModal. The cashier picks quantities up to what is still refundable, with restock, shipping, a signed adjustment, a destination and a required reason, and the form hands back the order.refund payload parts, priced by priceRefund, for the caller to send.
  • 31a244c: App settings gain a device-local ui.theme (system, light or dark, default system). The new DisplaySettings component lets the user choose the theme, the UI scale and the font set, and saves each choice through useAppSettings.
  • 9beba13: Adds open sales as cart tabs: useSale gains switchSale (it parks the current sale and opens a parked one, or a new one) and closeSale, and openSales lists the open sales for OpenSaleTabs, which shows each sale's customer or contents, its total and a Partly paid chip. A partly paid sale cannot be switched away from or closed until it is paid or its paid legs are voided.
  • 5cb82ce: useRegisterSession now returns liveAtStore, approvalNeeded and closureApprovalStatus, and actions.reapproveClosure sends a closure the store refused for its approval again with a new proof; at register contract 3 a close over the threshold on a session live at the store needs the store's proof, not approvedBy alone. The closure sheet shows "Approval not yet verified by the store" beside the approver until the store applies the closure with its proof.
  • f52d025: Adds the Reports Sales room (SalesRoom, with its hero chart, figure cards and filters bar) to components, and the store-time date presets it uses (presetRange, DATE_PRESETS) to pos.
  • e4299f5: A reopened refused sale now keeps only the cashier's own note, so the "Refused by the store" text never goes out with order.create 7; a sale parked by 3.12.0 that still carries that first line has it dropped when the command is built. New noteDelivery(order) tells whether a stored sale's note was sent, and Receipt and OrdersList show the note and say when it couldn't be sent to the store.
  • ff03391: Add font choices for the ui.font setting: the font-family tokens, face list and type sets (system, instrument, grotesk, fraunces, manrope) in @tallyui/theme, and a FontProvider in @tallyui/components that loads the chosen set through an app-supplied loader so Text draws its body or numbers face. No font files ship in the packages; each app bundles the OFL files and passes loadFonts.
  • 6296a06: Add the UI scale: nine size tokens for each of the compact, regular and spacious steps with Auto picking by window size, pointer floors for controls and rows, an opt-in @tallyui/theme/scale.css, and a ScaleProvider that applies the stored ui.scale setting on native and mirrors it onto the web document root so portals scale too. Text now caps the OS text multiplier at MAX_FONT_SCALE (1.3) unless a caller overrides it.

@tallyui/pos

Minor Changes

  • 41fa7bf: Adds cash rounding to the tender: roundedDue rounds a balance to a hand-counted method's rounding increment, with halves rounding up, and tenderRounding gives the tender pane the rounded amount due and the signed rounding difference. These are figures only: nothing is added to the sale yet.
  • 73387ab: Adds cashier permissions: a connector may describe the signed-in cashier with an optional cashier() that returns neutral permissions (viewReports, manageClosures, approveVariance, refund, discount). In @tallyui/pos, can() and the useCashier hook read them and give the blind-count flag and a Reports gate; a connector without cashier() still allows everything, as before.
  • 31a244c: App settings gain a device-local ui.theme (system, light or dark, default system). The new DisplaySettings component lets the user choose the theme, the UI scale and the font set, and saves each choice through useAppSettings.
  • 9beba13: Adds open sales as cart tabs: useSale gains switchSale (it parks the current sale and opens a parked one, or a new one) and closeSale, and openSales lists the open sales for OpenSaleTabs, which shows each sale's customer or contents, its total and a Partly paid chip. A partly paid sale cannot be switched away from or closed until it is paid or its paid legs are voided.
  • e2d3a2b: The register outbox now counts the till updates the store rejected that hold up their register (state.rejected), and requeue() sends a rejected till update again under its own command id, except for the refusals the store records or that have their own exits (#366). The new summarizeOutboxHealth, watchOutboxHealth and useOutboxHealth give one summary of sales and till updates waiting, rejected or stuck, and whether either outbox needs the cashier to sign in again, with one flush() for both (#373).
  • 13f8a3b: Each payment on a sale now has a status (pending, authorized, captured, failed or voided). Only captured payments count toward the balance. A payment can be voided and stays on the sale, counting nothing, and a sale with a payment still in progress cannot complete.
  • c9ca7a2: Add a device-local app settings store: an app_settings collection that is never replicated, a typed AppSettings map with defaults (ui.scale, ui.font), readAppSettings/writeAppSetting, and a useAppSettings hook. Unknown or invalid stored values fall back to their defaults.
  • 3b32e4c: Add keyboard-wedge barcode scanning: useBarcodeScanner tells a scanner's fast burst of keys from a person typing and calls onScan with the code, along with retail barcode helpers ported from WCPOS v2 (UPC-A/EAN-13 leading-zero handling, check digits and a repeat-scan cooldown).
  • 6995e84: Add a shared CSV writer (toCsv, csvFromCells, csvCell) that quotes every cell and guards formula-leading text, as WCPOS v2's reports export does. The register's closures export now uses it, with unchanged output.
  • d4ae385: Add the customer display protocol: a versioned message envelope with encodeDisplayMessage and a decodeDisplayMessage that refuses anything it cannot trust, the five display actions, a cart snapshot over ReceiptData kept under 200 KiB, and a displayReducer for the idle, cart and payment screens.
  • 9e0a750: POS now describes a card reader or payment terminal through a backend-neutral PaymentDriver interface, with a registry that finds a payment method's driver by its capture.provider. A deterministic simulated driver, with injectable timers, approves, declines, cancels and times out on cue for tests and demos.
  • 53c6dc8: POS now prints through a PrintTransport interface, with createPrintQueue running each printer's jobs one at a time so a failed or stalled printer never holds up another. A device-local printer_profiles collection stores the printers set up on a till, and createSystemPrintTransport prints receipt HTML through the browser's print dialog, or through a printHtml function the app passes in on native (such as expo-print).
  • 5fedc5d: New receipt templates: renderReceiptHtml turns a ReceiptData into sanitised HTML with a default 80 mm or 58 mm template, and receiptTemplateData, renderThermalPreview and sanitizeHtml let an app render its own thermal-XML Mustache templates, sanitised with DOMPurify in a browser and parsed with xmldom on React Native. QR codes and barcodes render as placeholders for now.
  • d0dc455: Add sales figures for the Reports screen: totals, payments by method, top products and categories, taxes by rate, refunds on the day they were made and a per-day series with a comparison range, all by store day. Adapters read the till's own orders and refunds and the store's orders.
  • 9b6d07c: refundableLines shows what is still refundable on each order line after earlier refunds, as a quantity plus net and tax amounts. priceRefund prices a chosen refund by each line's cumulative share (ADR-080 amendment 2), caps each quantity at what remains, and returns the order.refund v1 payload lines.
  • 5cb82ce: useRegisterSession now returns liveAtStore, approvalNeeded and closureApprovalStatus, and actions.reapproveClosure sends a closure the store refused for its approval again with a new proof; at register contract 3 a close over the threshold on a session live at the store needs the store's proof, not approvedBy alone. The closure sheet shows "Approval not yet verified by the store" beside the approver until the store applies the closure with its proof.
  • d1c587e: At register contract 3 (ADR-082), the closure command is sent as version 3 and carries the store's opaque approval proof, which closeSession keeps on the session and never puts on the Z, a fact or a log. The store's approval threshold now wins over the app's varianceThreshold, and the new closureVariance helper and hook action give the variance an approval is bound to; a close whose approvedVariance no longer matches is refused.
  • 9f04b1b: Connectors can now offer the store's register directory through an optional listRegisters, which returns each register's id, name, default float and expected close time. @tallyui/pos adds suggestFloat, which suggests a register's opening float: its default float, else the cash counted at the last close.
  • 4a9f14c: The register outbox no longer lets a closure the store refused for its approval (register_approval_required or register_approval_invalid) block the register's other commands, but it holds the register's next closure until the refused one is approved again (ADR-082 decision 6). Requeue never resends either refusal, and neither counts in rejected or keeps a stuck clock on the held closure.
  • f52d025: Adds the Reports Sales room (SalesRoom, with its hero chart, figure cards and filters bar) to components, and the store-time date presets it uses (presetRange, DATE_PRESETS) to pos.
  • e4299f5: A reopened refused sale now keeps only the cashier's own note, so the "Refused by the store" text never goes out with order.create 7; a sale parked by 3.12.0 that still carries that first line has it dropped when the command is built. New noteDelivery(order) tells whether a stored sale's note was sent, and Receipt and OrdersList show the note and say when it couldn't be sent to the store.
  • 80c7a6b: A cashier can now add a note to a sale with useSale().setNote(); it is kept when the sale is parked and resumed, and cleared by a new sale. The note is sent to the store as order.create version 7, only to servers that advertise version 7 (ADR-083).

@tallyui/theme

Minor Changes

  • ff03391: Add font choices for the ui.font setting: the font-family tokens, face list and type sets (system, instrument, grotesk, fraunces, manrope) in @tallyui/theme, and a FontProvider in @tallyui/components that loads the chosen set through an app-supplied loader so Text draws its body or numbers face. No font files ship in the packages; each app bundles the OFL files and passes loadFonts.
  • 6296a06: Add the UI scale: nine size tokens for each of the compact, regular and spacious steps with Auto picking by window size, pointer floors for controls and rows, an opt-in @tallyui/theme/scale.css, and a ScaleProvider that applies the stored ui.scale setting on native and mirrors it onto the web document root so portals scale too. Text now caps the OS text multiplier at MAX_FONT_SCALE (1.3) unless a caller overrides it.

Patch Changes

  • 09d7140: tokens.css no longer wraps its @variant light and @variant dark blocks in :root, so the dark theme applies on web with Uniwind 1.4, which turned the wrapped rule into :root .dark and never matched. Token values are unchanged, and both themes still apply on web and native with Uniwind 1.3.

@tallyui/connector-woocommerce

Minor Changes

  • 135eda4: CustomerServiceError now has an optional status: the HTTP status the store answered with, or undefined when no response came. The WooCommerce, Medusa and Vendure connectors set it, so a retry can check the status instead of parsing the message.
  • e4e59d7: The WooCommerce connector now has updateCustomer: it edits a customer's name, email, phone, company, billing and shipping addresses and tax ids through WCPOS's own push/customers update, the same route createCustomer uses.

Patch Changes

  • 6014050: A catalogue reconcile pass that lists no page now skips the deletion check, so it no longer raises a false "kept on this till" message every hour (#376). The WooCommerce catalogue check now restarts in full after its listing fails on a fresh pass, instead of resuming and skipping deletions for a day (#376).

@tallyui/connector-medusa

Minor Changes

  • 135eda4: CustomerServiceError now has an optional status: the HTTP status the store answered with, or undefined when no response came. The WooCommerce, Medusa and Vendure connectors set it, so a retry can check the status instead of parsing the message.
  • 5707be4: The Medusa admin-user connector can now edit a customer: updateCustomer saves the customer's own fields and replaces their default billing and shipping addresses in Medusa's address book. Customers read with their addresses now carry billing and shipping.

@tallyui/connector-vendure

Minor Changes

  • 135eda4: CustomerServiceError now has an optional status: the HTTP status the store answered with, or undefined when no response came. The WooCommerce, Medusa and Vendure connectors set it, so a retry can check the status instead of parsing the message.
  • e77573e: The Vendure connector now provides listOrders and getOrders, so the shared order history and receipt reprint work on Vendure. It maps Vendure's orders to StoreOrder (new toVendureStoreOrder, createVendureOrders and listVendureOrderDetails); pass tallyFields: false to createVendureConnector on a server without the vendurepos plugin.
  • 58c9f24: The Vendure connector can now edit a customer (updateCustomer), using Vendure's updateCustomer mutation for names, email and phone and its customer address book for the billing and shipping addresses. Company and tax ids are not stored, because Vendure customers have neither.

3.12.0

@tallyui/core

Minor Changes

  • b1397a3: OrderCreateLine takes anyAttributes, the names of the attributes the cashier picked for a variant's "Any" option groups. It is a version-6 field, checked by the precheck and the shape check (#495).
  • e32dda1: Order history and reprint (G7, ADR-081). TallyConnector gains optional listOrders and getOrders, which read the store's orders online as StoreOrders, with the store's line ids and prior refunds; a connector without them is unchanged. The WooCommerce connector implements both over WCPOS wcpos/v2/orders. @tallyui/pos adds buildReceiptDataFromPosOrder and buildReceiptDataFromStoreOrder, which build a receipt marked as a reprint (fiscal.is_reprint, reprint_count) from a stored order, and Receipt takes a prebuilt receipt and a doneLabel.

@tallyui/components

Minor Changes

  • 6a6e925: Catalogue takes pickAnyOptions. When it is set, choosing a variant with local "Any" option groups first asks for a value for each group, then passes them to onSelect as the entry's picks (#495).
  • 2076f68: Cart takes couponDiscountMinor, the coupon amount the app itemises under the Subtotal (afterSubtotal). When it is set, the totals' Discount row shows the other discounts only and is hidden when they come to 0, so a coupon is no longer counted twice. Without it, the Discount row is unchanged.
  • e32dda1: Order history and reprint (G7, ADR-081). TallyConnector gains optional listOrders and getOrders, which read the store's orders online as StoreOrders, with the store's line ids and prior refunds; a connector without them is unchanged. The WooCommerce connector implements both over WCPOS wcpos/v2/orders. @tallyui/pos adds buildReceiptDataFromPosOrder and buildReceiptDataFromStoreOrder, which build a receipt marked as a reprint (fiscal.is_reprint, reprint_count) from a stored order, and Receipt takes a prebuilt receipt and a doneLabel.
  • f52dfcd: OrdersList takes onOpen. When it is set, each order row, from the till or the store's history, gets an Open button that passes that row to onOpen, so an app can open the order and reprint its receipt. A till row's press still expands its lines, and without onOpen the list is unchanged.

Patch Changes

  • 5df00c0: An invalid Any pick is reported as a cart error instead of being thrown. The Any picker closes when its product leaves the catalogue (#495).

@tallyui/pos

Minor Changes

  • b1397a3: Storage, one way: pos_orders moves from schema version 9 to 10. It adds a line's anyAttributes, and the migration keeps every order byte for byte. CatalogueEntry takes picks for a variant's local "Any" option groups. addEntryToCart validates them, stores them on the line, and keeps lines with different picks apart. A sale with picks goes at order.create version 6, and every other sale's envelope is unchanged (#495).
  • e32dda1: Order history and reprint (G7, ADR-081). TallyConnector gains optional listOrders and getOrders, which read the store's orders online as StoreOrders, with the store's line ids and prior refunds; a connector without them is unchanged. The WooCommerce connector implements both over WCPOS wcpos/v2/orders. @tallyui/pos adds buildReceiptDataFromPosOrder and buildReceiptDataFromStoreOrder, which build a receipt marked as a reprint (fiscal.is_reprint, reprint_count) from a stored order, and Receipt takes a prebuilt receipt and a doneLabel.

Patch Changes

  • 5df00c0: An invalid Any pick is reported as a cart error instead of being thrown. The Any picker closes when its product leaves the catalogue (#495).

@tallyui/connector-woocommerce

Minor Changes

  • 6a6e925: A line's picked "Any" options go to WooCommerce as line meta, keyed as WooCommerce keys a local attribute, so the order shows the cashier's choice instead of an empty value. Every line without picks is sent as before (#495).
  • e32dda1: Order history and reprint (G7, ADR-081). TallyConnector gains optional listOrders and getOrders, which read the store's orders online as StoreOrders, with the store's line ids and prior refunds; a connector without them is unchanged. The WooCommerce connector implements both over WCPOS wcpos/v2/orders. @tallyui/pos adds buildReceiptDataFromPosOrder and buildReceiptDataFromStoreOrder, which build a receipt marked as a reprint (fiscal.is_reprint, reprint_count) from a stored order, and Receipt takes a prebuilt receipt and a doneLabel.

3.11.0

@tallyui/core

Patch Changes

  • 916055f: Remove an unused type import. No behaviour change.
  • 1cebe19: Drop dead re-exports from internal modules. The package entry points export the same names as before.

@tallyui/primitives

Patch Changes

  • 1cebe19: Drop dead re-exports from internal modules. The package entry points export the same names as before.
  • 9f84f24: Drop unused devDependencies (@testing-library/jest-dom, tailwindcss). No runtime change.

@tallyui/components

Minor Changes

  • a6b1a7a: CartTotal and Cart take afterSubtotal, rows rendered directly under Subtotal (e.g. a platform's coupon chips).
  • fc6e0d8: CartLine takes attributes and shows a "Name: Value" row for each. Cart and Receipt pass a line's attributes through (#495).

@tallyui/pos

Minor Changes

  • fc6e0d8: Cart lines keep a variant's chosen options as attributes (from VariantSummary.options) through park, resume and reopen. finalizeOrder stores them on PosOrderLine.attributes, and receipt data carries them. The order-create envelope is unchanged: attributes still go only at version 6 (#495).

Patch Changes

  • 6e058ac: Export the PosOrderCoupon type from the package index, as the 3.x changelog already said.
  • 1cebe19: Drop dead re-exports from internal modules. The package entry points export the same names as before.

@tallyui/theme

Patch Changes

  • 9f84f24: Drop unused devDependencies (@testing-library/jest-dom, tailwindcss). No runtime change.

@tallyui/connector-shopify

Patch Changes

  • bd8e6bc: Keep one copy of the internal Link-header and id helpers shared by product sync and replication. No behaviour change.

3.10.0

@tallyui/core

Storage, one way: pos_orders moves from schema version 8 to 9. Every stored order is kept byte for byte, but a till that goes back to a build on version 8 shows no orders and sends none of its pending ones until it is upgraded again. Nothing is deleted.

Minor Changes

  • 38d3032: A coupon sale is sent as order.create version 6 (#501, ADR-077 step d4a). No app passes a coupon source yet, so nothing changes for a cashier.
    • Version 6 is version 5 plus the order's coupons (code, couponId, discountMinor, discountTaxMinor), each line's regularUnitPriceMinor and attributes when stored, and the receipt's display.coupons. precheckCommand accepts it, refuses those fields below version 6, and checks that each receipt coupon row names a coupon in the payload, once.
    • In version 6, subtotalMinor and taxMinor are net of the coupons, and the top-level discountMinor still sums only the lines' discounts.
    • CommandRejectionCode gains coupon_invalid (with OrderCreateCouponInvalidData: storeCode, couponCode) and total_mismatch (with OrderCreateTotalMismatchData).
    • Only a coupon sale goes as 6. A sale without coupons is sent as before, byte for byte, whatever the store advertises.
    • A coupon sale never goes below 6: useSale offers coupons only when the store also accepts version 6, finalizeOrder refuses a coupon sale to a store below 6, and the outbox keeps a coupon sale at 6 after an unsupported_version answer, so an older store refuses it instead of receiving it without its coupons.
    • The till's highest order.create version (ORDER_CREATE_MAX_VERSION in @tallyui/pos's command module, not exported from the package) is 6, and a test pins it to pos_orders' sentVersion and downgradedFrom maxima.

Patch Changes

  • f50fca2: CatalogueReconcileAdapter.enqueue entries may carry refreshOnly.

@tallyui/database

Storage, one way: pos_orders moves from schema version 8 to 9. Every stored order is kept byte for byte, but a till that goes back to a build on version 8 shows no orders and sends none of its pending ones until it is upgraded again. Nothing is deleted.

@tallyui/primitives

Storage, one way: pos_orders moves from schema version 8 to 9. Every stored order is kept byte for byte, but a till that goes back to a build on version 8 shows no orders and sends none of its pending ones until it is upgraded again. Nothing is deleted.

@tallyui/components

Storage, one way: pos_orders moves from schema version 8 to 9. Every stored order is kept byte for byte, but a till that goes back to a build on version 8 shows no orders and sends none of its pending ones until it is upgraded again. Nothing is deleted.

Patch Changes

  • 3fd1ed4: Needs attention offers no Retry for a coupon_invalid or total_mismatch refusal, which the outbox does not resend (#501, ADR-077 Q-d4b-4).
  • 811b1f2: CustomerPicker's search field now has the testID customer-picker-search. A new optional testID prop overrides it. The accessibility label "Search customers" is unchanged.

@tallyui/storage-sqlite

Storage, one way: pos_orders moves from schema version 8 to 9. Every stored order is kept byte for byte, but a till that goes back to a build on version 8 shows no orders and sends none of its pending ones until it is upgraded again. Nothing is deleted.

@tallyui/pos

Storage, one way: pos_orders moves from schema version 8 to 9. Every stored order is kept byte for byte, but a till that goes back to a build on version 8 shows no orders and sends none of its pending ones until it is upgraded again. Nothing is deleted.

Minor Changes

  • 8c35723: pos_orders is now schema version 9 (#501, ADR-077 step d2). Version 9 declares four optional fields, and nothing writes them yet:

    • the order's coupons ({ code, couponId, discountMinor, discountTaxMinor }, exported as PosOrderCoupon);
    • the receipt's display.coupons;
    • a line's attributes (#495);
    • a line's regularUnitPriceMinor.

    It also lets an order's sentVersion and downgradedFrom be 6, ready for order.create version 6 (ADR-077 d4).

    It also declares an order's optional reopenedAt, for a refused sale the till reopens as a parked sale (ADR-077 d4b).

    The migration from version 8 is the identity, so every stored order is kept byte for byte. This is a one-way storage change (ADR-069). A till that goes back to a build on version 8 shows no orders and sends none of its pending ones until it is upgraded again. Nothing is deleted.

  • 74a58a4: The order layer carries coupon ids and regular prices (#501, ADR-077 step d3b). Nothing applies a coupon yet.

    • Breaking change for code that builds an OrderCouponContext or reads Order.coupons as shipped in 3.9.0: couponIds is now required and each Order.coupons row has a required couponId. setCoupons refuses a code whose id is missing or empty, and takes an optional new context, which replaces the builder's once every code passes its checks. No consumer outside @tallyui/pos builds the context. This remains a minor release because TallyUI is pre-beta.
    • A catalogue line keeps its regular unit price as regularUnitPriceMinor. The order builder picks the regular price from resolvePrice's result. A price edit or a restored draft keeps it, lines with different regular prices do not merge, and custom lines have none.
    • Parked-sale drafts keep the order's coupons; restoring a draft does not apply them.
    • finalizeOrder stores the order's coupons and each line's regular price in pos_orders version 9. An order without them is stored as before.
    • Coupons that exclude sale items are still refused.
  • c2efd7d: The sale applies coupons (#501, ADR-077 step d3c). No app passes a coupon source yet, so nothing changes for a cashier.

    • useSale returns applyCoupon(code) and removeCoupon(code). applyCoupon refuses with COUPONS_UNSUPPORTED ("This store's plugin does not support coupons yet") unless the store's capabilities say coupons: true, the app passes discount codes (discountCodes, see the d6 entry), and they support the store; WooCommerce's need its tax context.
    • Each code is validated with woocommerceCoupons.validateCoupon before it is applied, and every refusal has its own cashier-facing sentence (woocommerceDiscountCodes.couponRefusal).
    • Resuming a parked sale looks its coupons up and validates them again; any that no longer pass are removed, and the message says why.
    • useSale's settings may carry calcDiscountsSequentially. New export: COUPONS_UNSUPPORTED.
  • 38d3032: A coupon sale is sent as order.create version 6 (#501, ADR-077 step d4a). No app passes a coupon source yet, so nothing changes for a cashier.

    • Version 6 is version 5 plus the order's coupons (code, couponId, discountMinor, discountTaxMinor), each line's regularUnitPriceMinor and attributes when stored, and the receipt's display.coupons. precheckCommand accepts it, refuses those fields below version 6, and checks that each receipt coupon row names a coupon in the payload, once.
    • In version 6, subtotalMinor and taxMinor are net of the coupons, and the top-level discountMinor still sums only the lines' discounts.
    • CommandRejectionCode gains coupon_invalid (with OrderCreateCouponInvalidData: storeCode, couponCode) and total_mismatch (with OrderCreateTotalMismatchData).
    • Only a coupon sale goes as 6. A sale without coupons is sent as before, byte for byte, whatever the store advertises.
    • A coupon sale never goes below 6: useSale offers coupons only when the store also accepts version 6, finalizeOrder refuses a coupon sale to a store below 6, and the outbox keeps a coupon sale at 6 after an unsupported_version answer, so an older store refuses it instead of receiving it without its coupons.
    • The till's highest order.create version (ORDER_CREATE_MAX_VERSION in @tallyui/pos's command module, not exported from the package) is 6, and a test pins it to pos_orders' sentVersion and downgradedFrom maxima.
  • 3fd1ed4: A sale the store refused over its coupons can be reopened as a parked sale (#501, ADR-077 step d4b). No app shows the action yet, so nothing changes for a cashier.

    • reopenRefusedOrder(orderId, deps) rebuilds a coupon_invalid or total_mismatch refusal as a parked sale without its coupons. The parked sale carries the order's payments, and its note gives the store's reason. A second call returns the parked sale already written. The refused order is marked with reopenedAt and stays as the record. The function refuses with ReopenRefusedOrderError when the order is missing, not rejected, refused for another reason, already replaced by a finalized sale, or in a register session that is not open.
    • A refused order counts nowhere once its finalized successor (saleId) exists (replacedOrderIds): it is left out of Needs attention, the outbox's rejected count, the Z report and the register's live expected figures. Until then it counts like any rejected order. isReopened only tells that a reopen was started.
    • requeue no longer resends a coupon_invalid or total_mismatch refusal.
    • isRequeueable(code) reports whether the outbox resends a refusal with that code.
  • f50fca2: Coupons on one register (ADR-077 d5). woocommerceDiscountCodes.createSaleCouponSource gives useSale its coupons from the local coupons collection. It adds this register's own uses to usage_count and used_by: a pending order always counts, and an applied order counts until a later pull rewrites the coupon or for at most 10 minutes. woocommerceDiscountCodes.startCouponUsageRefetch asks the coupon feed to fetch a coupon again by id once an order using it applies. Neither writes to any collection. The overlay records the customer's WooCommerce id, else the lower-cased email.

  • 10a3813: The sale takes the platform's discount codes (ADR-077 amendment 3). Each platform keeps its own discount model, so useSale's discountCodes option takes a SaleDiscountCodes contract. The contract has five parts: supports, find, check, apply, and an optional beforeResume. Each part is given a SaleDiscountState: the order, a copy of the codes already accepted, the categories and the settings. Both SaleDiscountCodes and SaleDiscountState are exported as types. A refusal is shown to the cashier in the platform's own words. WooCommerce coupons are one implementation: woocommerceDiscountCodes.createDiscountCodes(source). createSaleCouponSource, startCouponUsageRefetch, couponRefusal and the SaleCoupon and SaleCouponSource types are exported under woocommerceDiscountCodes, not at the top level. A cashier sees no change.

@tallyui/theme

Storage, one way: pos_orders moves from schema version 8 to 9. Every stored order is kept byte for byte, but a till that goes back to a build on version 8 shows no orders and sends none of its pending ones until it is upgraded again. Nothing is deleted.

@tallyui/connector-woocommerce

Storage, one way: pos_orders moves from schema version 8 to 9. Every stored order is kept byte for byte, but a till that goes back to a build on version 8 shows no orders and sends none of its pending ones until it is upgraded again. Nothing is deleted.

Minor Changes

  • 133faac: The WooCommerce connector sends a coupon sale (#501, ADR-077 step d4a-woo).
    • A store that lists order_create_v5 and passes the coupons gate (plugin 1.9.0 or later) is advertised orderCreate: 6. WOO_ORDER_CREATE_VERSION is still 5.
    • createWooCommandTransport takes acceptsCoupons (a boolean or a function, read at push time). Absent or false, a sale that still carries coupons is refused as coupon_invalid (storeCode: 'coupons_unsupported') without a request, so wire it to the store's coupons capability to send coupon sales.
    • A version-6 envelope with coupons is pushed with coupon_lines (the codes, in the order applied), and each line carries its POS price and regular price in _woocommerce_pos_data, so WooCommerce applies the coupons to the till's prices.
    • On a tax-inclusive line, price is the gross unit price after the line's own discounts, taken from the till's stored line; without it the order is refused as unsupported_tax_mode.
    • A store's coupon refusal (woocommerce_rest_invalid_coupon) is rejected as coupon_invalid, never retried, with the store's message as plain text, storeCode, and couponCode when the message names a coupon of the sale.
    • A store total that differs after the order is created stays applied, with the store order's refs and the total_mismatch warning (ADR-077's R4 exception).
    • An envelope without coupons is pushed exactly as before.

@tallyui/connector-medusa

Storage, one way: pos_orders moves from schema version 8 to 9. Every stored order is kept byte for byte, but a till that goes back to a build on version 8 shows no orders and sends none of its pending ones until it is upgraded again. Nothing is deleted.

@tallyui/connector-shopify

Storage, one way: pos_orders moves from schema version 8 to 9. Every stored order is kept byte for byte, but a till that goes back to a build on version 8 shows no orders and sends none of its pending ones until it is upgraded again. Nothing is deleted.

@tallyui/connector-vendure

Storage, one way: pos_orders moves from schema version 8 to 9. Every stored order is kept byte for byte, but a till that goes back to a build on version 8 shows no orders and sends none of its pending ones until it is upgraded again. Nothing is deleted.

Patch Changes

  • 7649149: A refund line's amount is now its cumulative share of the line total, the vendurepos plugin's rule (ADR-080 amendment 2). getVendureOrder also reads each line's proratedLinePriceWithTax. vendureRefundable gives each line lineTotalWithTax, and the new vendureLineRefundWithTax(line, quantity) returns round((r + q) × T / N) − round(r × T / N). A whole-line refund is now exactly the line total; per-unit unitRefundWithTax could miss it by a few minor units, and the plugin refused it with amount_mismatch. unitRefundWithTax stays for display and is deprecated.

3.9.2

@tallyui/core

Patch Changes

  • fc37285: @tallyui/pos no longer imports from @tallyui/core/server, whose barrel reaches node:crypto. Browser bundlers such as Expo Snack could not build @tallyui/pos, and so @tallyui/components, because of it. parseCommandResult and CommandResultError are now exported from @tallyui/core as well as from @tallyui/core/server, and pos imports them from there. CI now checks that no browser-facing package's dist reaches @tallyui/core/server or a Node built-in.

@tallyui/pos

Patch Changes

  • fc37285: @tallyui/pos no longer imports from @tallyui/core/server, whose barrel reaches node:crypto. Browser bundlers such as Expo Snack could not build @tallyui/pos, and so @tallyui/components, because of it. parseCommandResult and CommandResultError are now exported from @tallyui/core as well as from @tallyui/core/server, and pos imports them from there. CI now checks that no browser-facing package's dist reaches @tallyui/core/server or a Node built-in.

3.9.1

@tallyui/database

Patch Changes

  • @tallyui/core@3.9.1

@tallyui/components

Patch Changes

  • d0df307: OrdersList shows the store's order history next to the till's own sales (ADR-052 amendment 1). It takes an optional history of platform-neutral rows (OrderHistoryRow: id, clientOrderId?, reference, placedAt, totalMinor, currency, itemCount, stateLabel), which the app maps from its own store.

    • A history row whose clientOrderId matches an outbox order is hidden while that order is in orders.
    • Recent merges the two lists, newest first.
    • A history row is read-only: it has no detail, no Retry, and never appears under Needs attention.

    Without history, OrdersList renders exactly as before.

    • @tallyui/core@3.9.1
    • @tallyui/pos@3.9.1
    • @tallyui/primitives@3.9.1
    • @tallyui/theme@3.9.1

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.9.1

@tallyui/pos

Patch Changes

  • @tallyui/core@3.9.1

@tallyui/connector-woocommerce

Patch Changes

  • @tallyui/core@3.9.1

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.9.1

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.9.1

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@3.9.1

3.9.0

@tallyui/core

Minor Changes

  • 39a4583: @tallyui/core exports the WooCommerce coupon engine as woocommerceCoupons (#501, ADR-077 phase b), next to woocommerceTax. It has recalculateCoupons, validateCoupon, toCouponConfigs and enrichCategoriesWithAncestors, with their input, result and rejection types. Nothing in TallyUI calls it yet; the sale builder will in phase (d).
  • 3e2245a: order.refund version 1 (ADR-080), an online refund command on the command channel. @tallyui/core adds the envelope and payload types, refundPayloadErrors (the strict shape check), the order.refund type in validateBatch, an optional orderRefund list in precheckCommand, the refund result in parseCommandResult, the refusal codes (nothing_to_refund, quantity_exceeds, amount_mismatch, order_state, not_till_order, forbidden, no_open_session), the orderRefund capability from /tally/v1/info, and refunds in deriveSessionFigures: a session's expected figures fall by the refunds it made, and it returns refundsTotalMinor when refunds are passed (callers that pass none get the same result as before). @tallyui/pos adds sendOrderRefund(transport, envelope), which sends one refund and never queues it. @tallyui/connector-vendure's getVendureOrder also reads each line's placed quantity and prorated prices and each refund's amounts and metadata, and vendureRefundable(order) computes what is left to refund.
  • a3dc028: The order builder can apply WooCommerce coupons (#501, ADR-077 step d1). createOrderBuilder takes an optional couponContext (the coupon configs, product categories and the store's sequential-discount setting), and setCoupons(codes) replays the codes through the ported engine on a WooCommerce tax context. The order then carries coupons ({ code, discountMinor, discountTaxMinor }), its lines and totals are the post-coupon figures, and display.coupons shows one row per coupon while the display lines keep their pre-coupon amounts. Codes are trimmed, lower-cased and deduplicated. An unknown code, or one that excludes sale items, throws a RangeError. Other tax contexts ignore the codes. Drafts do not save coupons yet (step d2), and useSale does not expose them yet (step d3). @tallyui/core also exports woocommerceCoupons.calculateOrderTotals and StoreSettings.calcDiscountsSequentially, which the WooCommerce connector now reads from the store's settings.
  • 006cfb2: ServerCapabilities gains an optional coupons (#501, ADR-077 ruling R3). Absent means the store does not accept an order's coupons. The WooCommerce connector's readWooCapabilities now also reads GET wcpos/v2/site. coupons is true only when its wcpos_version is woocommerce-pos 1.9.0 or later; every unclear or failed read gives false. orderCreate is decided as before. Nothing reads coupons yet.
  • 19093c2: The WooCommerce connector now has a coupons collection (#500, ADR-077 amendment 2). Its only source is a catalogue reconcile over the store's published coupons. Each coupon's fingerprint is date_modified_gmt|usage_count|used_by, because using a coupon does not move its modified time. A coupon whose fingerprint differs is refetched by id. A draft arrives deleted. A coupon that is trashed or no longer published is removed only after the store confirms it by id. TallyConnector.reconcile gains an optional coupons key. A connector without it has no coupons. Nothing reads the collection yet, and no app starts the coupons reconcile yet.

Patch Changes

  • c1bf800: Every exports entry gains a default condition so CommonJS and require-condition resolvers (Node require, webpack, Snack's bundler) resolve the packages; smoke:pack checks require.resolve for every entry.

@tallyui/database

Patch Changes

  • c1bf800: Every exports entry gains a default condition so CommonJS and require-condition resolvers (Node require, webpack, Snack's bundler) resolve the packages; smoke:pack checks require.resolve for every entry.

@tallyui/primitives

Patch Changes

  • c1bf800: Every exports entry gains a default condition so CommonJS and require-condition resolvers (Node require, webpack, Snack's bundler) resolve the packages; smoke:pack checks require.resolve for every entry.

@tallyui/components

Patch Changes

  • c1bf800: Every exports entry gains a default condition so CommonJS and require-condition resolvers (Node require, webpack, Snack's bundler) resolve the packages; smoke:pack checks require.resolve for every entry.

@tallyui/storage-sqlite

Patch Changes

  • c1bf800: Every exports entry gains a default condition so CommonJS and require-condition resolvers (Node require, webpack, Snack's bundler) resolve the packages; smoke:pack checks require.resolve for every entry.

@tallyui/pos

Minor Changes

  • 3e2245a: order.refund version 1 (ADR-080), an online refund command on the command channel. @tallyui/core adds the envelope and payload types, refundPayloadErrors (the strict shape check), the order.refund type in validateBatch, an optional orderRefund list in precheckCommand, the refund result in parseCommandResult, the refusal codes (nothing_to_refund, quantity_exceeds, amount_mismatch, order_state, not_till_order, forbidden, no_open_session), the orderRefund capability from /tally/v1/info, and refunds in deriveSessionFigures: a session's expected figures fall by the refunds it made, and it returns refundsTotalMinor when refunds are passed (callers that pass none get the same result as before). @tallyui/pos adds sendOrderRefund(transport, envelope), which sends one refund and never queues it. @tallyui/connector-vendure's getVendureOrder also reads each line's placed quantity and prorated prices and each refund's amounts and metadata, and vendureRefundable(order) computes what is left to refund.
  • a3dc028: The order builder can apply WooCommerce coupons (#501, ADR-077 step d1). createOrderBuilder takes an optional couponContext (the coupon configs, product categories and the store's sequential-discount setting), and setCoupons(codes) replays the codes through the ported engine on a WooCommerce tax context. The order then carries coupons ({ code, discountMinor, discountTaxMinor }), its lines and totals are the post-coupon figures, and display.coupons shows one row per coupon while the display lines keep their pre-coupon amounts. Codes are trimmed, lower-cased and deduplicated. An unknown code, or one that excludes sale items, throws a RangeError. Other tax contexts ignore the codes. Drafts do not save coupons yet (step d2), and useSale does not expose them yet (step d3). @tallyui/core also exports woocommerceCoupons.calculateOrderTotals and StoreSettings.calcDiscountsSequentially, which the WooCommerce connector now reads from the store's settings.
  • 2a79339: The till keeps a record of its refunds (ADR-080 amendment 1). posRefundSchema and posRefundCollection() define pos_refunds, a new local-only collection that the app adds as it adds cash_movements. submitOrderRefund({ refunds, transport, envelope }) records each refund before it is sent and then stores the store's answer: applied, rejected, unsent (the store did not take the batch) or still pending (the answer is unknown, so resend the same envelope). The session's applied refunds now lower its expected figures. deriveExpected and writeClosure take optional refunds. The closure then fills period_refunds_total_minor, each method's refunds_minor and refund_count, and lists refund_ids and pending_refund_ids. useRegisterSession takes an optional refunds collection. Callers that pass no refunds get the same figures and closures as before.

Patch Changes

  • c1bf800: Every exports entry gains a default condition so CommonJS and require-condition resolvers (Node require, webpack, Snack's bundler) resolve the packages; smoke:pack checks require.resolve for every entry.
  • a51d0bb: takeOverSession now checks register contract 2 itself (#498). It takes an optional registerContract (the store's capabilities.register). Below 2, or when the contract is missing, it refuses with RegisterTakeOverError (REGISTER_TAKEOVER_UNSUPPORTED) before it reads or writes anything. A direct caller therefore can no longer queue a version 2 open for a register v1 store. useRegisterSession passes its contract through, so the hook behaves as before. Direct callers of takeOverSession must now pass registerContract.

@tallyui/theme

Patch Changes

  • c1bf800: Every exports entry gains a default condition so CommonJS and require-condition resolvers (Node require, webpack, Snack's bundler) resolve the packages; smoke:pack checks require.resolve for every entry.

@tallyui/connector-woocommerce

Minor Changes

  • a3dc028: The order builder can apply WooCommerce coupons (#501, ADR-077 step d1). createOrderBuilder takes an optional couponContext (the coupon configs, product categories and the store's sequential-discount setting), and setCoupons(codes) replays the codes through the ported engine on a WooCommerce tax context. The order then carries coupons ({ code, discountMinor, discountTaxMinor }), its lines and totals are the post-coupon figures, and display.coupons shows one row per coupon while the display lines keep their pre-coupon amounts. Codes are trimmed, lower-cased and deduplicated. An unknown code, or one that excludes sale items, throws a RangeError. Other tax contexts ignore the codes. Drafts do not save coupons yet (step d2), and useSale does not expose them yet (step d3). @tallyui/core also exports woocommerceCoupons.calculateOrderTotals and StoreSettings.calcDiscountsSequentially, which the WooCommerce connector now reads from the store's settings.
  • 006cfb2: ServerCapabilities gains an optional coupons (#501, ADR-077 ruling R3). Absent means the store does not accept an order's coupons. The WooCommerce connector's readWooCapabilities now also reads GET wcpos/v2/site. coupons is true only when its wcpos_version is woocommerce-pos 1.9.0 or later; every unclear or failed read gives false. orderCreate is decided as before. Nothing reads coupons yet.
  • 19093c2: The WooCommerce connector now has a coupons collection (#500, ADR-077 amendment 2). Its only source is a catalogue reconcile over the store's published coupons. Each coupon's fingerprint is date_modified_gmt|usage_count|used_by, because using a coupon does not move its modified time. A coupon whose fingerprint differs is refetched by id. A draft arrives deleted. A coupon that is trashed or no longer published is removed only after the store confirms it by id. TallyConnector.reconcile gains an optional coupons key. A connector without it has no coupons. Nothing reads the collection yet, and no app starts the coupons reconcile yet.

Patch Changes

  • c1bf800: Every exports entry gains a default condition so CommonJS and require-condition resolvers (Node require, webpack, Snack's bundler) resolve the packages; smoke:pack checks require.resolve for every entry.

@tallyui/connector-medusa

Patch Changes

  • c1bf800: Every exports entry gains a default condition so CommonJS and require-condition resolvers (Node require, webpack, Snack's bundler) resolve the packages; smoke:pack checks require.resolve for every entry.

@tallyui/connector-shopify

Patch Changes

  • c1bf800: Every exports entry gains a default condition so CommonJS and require-condition resolvers (Node require, webpack, Snack's bundler) resolve the packages; smoke:pack checks require.resolve for every entry.

@tallyui/connector-vendure

Minor Changes

  • 3e2245a: order.refund version 1 (ADR-080), an online refund command on the command channel. @tallyui/core adds the envelope and payload types, refundPayloadErrors (the strict shape check), the order.refund type in validateBatch, an optional orderRefund list in precheckCommand, the refund result in parseCommandResult, the refusal codes (nothing_to_refund, quantity_exceeds, amount_mismatch, order_state, not_till_order, forbidden, no_open_session), the orderRefund capability from /tally/v1/info, and refunds in deriveSessionFigures: a session's expected figures fall by the refunds it made, and it returns refundsTotalMinor when refunds are passed (callers that pass none get the same result as before). @tallyui/pos adds sendOrderRefund(transport, envelope), which sends one refund and never queues it. @tallyui/connector-vendure's getVendureOrder also reads each line's placed quantity and prorated prices and each refund's amounts and metadata, and vendureRefundable(order) computes what is left to refund.
  • 0b8a4da: Order history for Vendure (ADR-079). listVendureOrders(context, options) reads the channel's placed orders, newest first and paged, through the Admin API. It filters on the server by placed date, state, register (tallyRegisterId), cashier (tallyCashierRef), customer, and a search on order code or customer last name. getVendureOrder(context, id) reads one order with its lines, totals, tax summary, payments and refunds. Both return Vendure's own fields unmapped, need ReadOrder (and ReadCustomer for the customer filter), and write nothing locally. Pass tallyFields: false on a server without the vendurepos plugin.

Patch Changes

  • c1bf800: Every exports entry gains a default condition so CommonJS and require-condition resolvers (Node require, webpack, Snack's bundler) resolve the packages; smoke:pack checks require.resolve for every entry.

3.8.0

@tallyui/core

Minor Changes

  • 6158b2a: Variation attributes through the product traits (#494). Core adds VariantSummary.options (the variant's value in each option group, keyed by group name; a group the variant accepts any value of has no key), the VariantOptionGroup type and the optional ProductTraits.getVariantOptions (the option groups in the backend's display order). The WooCommerce connector implements both: groups are the parent's attributes with variation: true, by position, with an id only for global attributes; replication now keeps each variation attribute's numeric id. Additive: no schema change, and variations stored before this release gain the id when they are next pulled.

@tallyui/pos

Minor Changes

  • c69c6e2: Register v2, the till's half (ADR-078 step 3b, #371). These are additive APIs; the sheets come in a later release.

    • v2 open. When the store advertises register contract 2 (capabilities.register >= 2 on useRegisterSession), the till sends register.session.open as version 2, carrying the till's deviceName (trimmed, 1 to 64 characters). reconcileRegisterCommands takes registerContract and deviceName.
    • Conflict. A session whose open the store refused with register_session_already_open becomes conflict. It stays current for its register, so the sheet can show, but it takes no sale. Opening on that register is refused with RegisterSessionConflictError.
    • Take over and Choose another register.
      • useRegisterSession exposes conflict (the refusal's sessionId, openedAt, openedBy and deviceName, or takingOver: true while the take-over is in flight), plus actions.takeOver() and actions.chooseAnotherRegister().
      • The standalone functions are takeOverSession and abandonSession.
      • Take over on a register v1 store is refused with RegisterTakeOverError (REGISTER_TAKEOVER_UNSUPPORTED). Choose another register while a take-over is in flight is refused with REGISTER_TAKEOVER_PENDING.
    • abandoned. Choose another register moves the session to abandoned, a terminal local state: it is never current or sellable, never sent, and it does not block opening. Its unsent commands are rejected locally with register_session_abandoned.
    • Answers are derived from stored rows. adoptRegisterResults derives resume, conflict, superseded and the way out of conflict from the stored command rows. It runs at start and on every change to the register's command rows, and useRegisterSession runs it for you.
    • Outbox. createRegisterOutbox and useRegisterOutbox take an optional sessions (the till's register_sessions). With it, an open refused as already open stops blocking its register's ledger once its session is abandoned. Without it, that refusal always blocks, so apps should pass sessions: otherwise a till that chose another register and then reopens the same one never sends again.

    One-way storage note. A till that rolls back past this release reads a stored abandoned session as "needs upgrade" (RegisterNeedsUpgradeError) on that register. That is accepted (ADR-078 decision 9).

@tallyui/connector-woocommerce

Minor Changes

  • 6158b2a: Variation attributes through the product traits (#494). Core adds VariantSummary.options (the variant's value in each option group, keyed by group name; a group the variant accepts any value of has no key), the VariantOptionGroup type and the optional ProductTraits.getVariantOptions (the option groups in the backend's display order). The WooCommerce connector implements both: groups are the parent's attributes with variation: true, by position, with an id only for global attributes; replication now keeps each variation attribute's numeric id. Additive: no schema change, and variations stored before this release gain the id when they are next pulled.

3.7.1

@tallyui/database

Patch Changes

  • @tallyui/core@3.7.1

@tallyui/primitives

Patch Changes

  • 9b084a1: The Slider now moves. Pressing or dragging on it sets the value from the pointer, snapped to step and clamped to min..max. With the thumb focused, Arrow keys move one step, Page Up/Down move ten steps, and Home/End go to min/max. The Range's width and the Thumb's position follow the value: the primitive gives Range a default width and Thumb a default position: absolute; left, and a caller's own style still wins. The slider context gains percent. disabled ignores the pointer and the keys, and the styled Slider dims when disabled. (#491)

@tallyui/components

Patch Changes

  • 9b084a1: The Slider now moves. Pressing or dragging on it sets the value from the pointer, snapped to step and clamped to min..max. With the thumb focused, Arrow keys move one step, Page Up/Down move ten steps, and Home/End go to min/max. The Range's width and the Thumb's position follow the value: the primitive gives Range a default width and Thumb a default position: absolute; left, and a caller's own style still wins. The slider context gains percent. disabled ignores the pointer and the keys, and the styled Slider dims when disabled. (#491)

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.7.1

@tallyui/pos

Patch Changes

  • @tallyui/core@3.7.1

@tallyui/connector-woocommerce

Patch Changes

  • @tallyui/core@3.7.1

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.7.1

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.7.1

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@3.7.1

3.7.0

@tallyui/database

Patch Changes

  • @tallyui/core@3.7.0

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.7.0

@tallyui/pos

Minor Changes

  • f18cc1e: A register session whose stored status this build does not know (written by a later build, then the app rolled back) now makes the register "needs upgrade" instead of counting as open. useRegisterSession reports needsUpgrade: true and no current or sellable session. Opening, counting, closing, stamping a sale and recording cash on it refuse with RegisterNeedsUpgradeError (code REGISTER_NEEDS_UPGRADE), whose message can be shown to the cashier. Reconcile never sends such a status. isKnownSessionStatus is exported for apps that read session rows themselves.

  • 0a90e64: register_sessions moves to schema version 1 (ADR-078, #371). The stored status is an open string, so later local states need no migration; today's states add conflict and superseded. Rows gain server_session_id, the store session a local id was resumed as, which the migration sets to null on every older row.

    Upgrade notes

    • Apps must switch. Open the collection with await addRegisterSessionCollection(db), which migrates a version-0 collection safely and keeps the register document. registerSessionCollection() now throws at start with an error naming addRegisterSessionCollection, because adding the collection with addCollections would run RxDB's own migration, which can lose sessions.
    • Storage is one-way. Once a till has opened this version, register_sessions is at schema version 1. An older build opens it without an error but shows no sessions, so the till looks closed until it is upgraded again. Nothing is deleted: the next upgrade recovers every session. Never roll an app back across this version, and never open a second session while it hides the first. See ADR-069 and ADR-078 in docs/DECISIONS.md.

Patch Changes

  • @tallyui/core@3.7.0

@tallyui/connector-woocommerce

Patch Changes

  • @tallyui/core@3.7.0

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.7.0

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.7.0

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@3.7.0

3.6.0

@tallyui/core

Minor Changes

  • 2894a59: App and plugin authors can use the register v2 contract (ADR-078): optional open fields deviceName and supersedes, optional result fields session.openedAt, session.openingFloatMinor, resumed and superseded, the superseded session status, conflict codes register_session_superseded and register_supersede_forbidden, error-data types RegisterSessionAlreadyOpenData and RegisterSessionSupersededData, and the register_session_unknown order warning. Payload shape checks and warning readers support these fields; the till does not send v2 yet.

@tallyui/components

Minor Changes

  • 6c94486: Add an optional Receipt footerSlot for app content that prints after Change and above the on-screen buttons.
  • 3033b49: buildReceiptData returns the WCPOS receipt schema 1.4 version (RECEIPT_SCHEMA_VERSION) and its software, register and fiscal blocks with 1.4 defaults; ReceiptConfig takes registerName, software and fiscal. Receipt takes registerName and prints Register: <name> when given (#474).

Patch Changes

  • d9a6080: An order the store applied with register_session_unknown is neither listed under Needs attention nor given a warning line, because the store counts it once its session arrives.

@tallyui/pos

Minor Changes

  • 3033b49: buildReceiptData returns the WCPOS receipt schema 1.4 version (RECEIPT_SCHEMA_VERSION) and its software, register and fiscal blocks with 1.4 defaults; ReceiptConfig takes registerName, software and fiscal. Receipt takes registerName and prints Register: <name> when given (#474).
  • 843a08c: A register command refused with register_session_superseded (or abandoned locally) no longer holds up the commands behind it, and a session open now ends its batch (ADR-078).
  • 2faa6c1: Export TenderVoid, tenderVoidSchema and tenderVoidCollection(): the shape of a voided tender leg for an app's local write-once journal (#479).

Patch Changes

  • d9a6080: An order the store applied with register_session_unknown is neither listed under Needs attention nor given a warning line, because the store counts it once its session arrives.

3.5.3

@tallyui/database

Patch Changes

  • @tallyui/core@3.5.3

@tallyui/components

Patch Changes

  • @tallyui/pos@3.5.3
  • @tallyui/core@3.5.3
  • @tallyui/primitives@3.5.3
  • @tallyui/theme@3.5.3

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.5.3

@tallyui/pos

Patch Changes

  • @tallyui/core@3.5.3

@tallyui/connector-woocommerce

Patch Changes

  • 692b6f9: readWooCapabilities reports orderCreate: 5 only when the store's /status capabilities list order_create_v5, which only the TallyUI fork of the plugin advertises. A store that does not list it, whatever its WCPOS version or payment list support, gets orderCreate: 3, so the till does not offer fees, shipping or custom lines there and never sends them. The connector no longer requests /site.
    • @tallyui/core@3.5.3

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.5.3

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.5.3

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@3.5.3

3.5.2

@tallyui/database

Patch Changes

  • @tallyui/core@3.5.2

@tallyui/components

Patch Changes

  • 1bb2aae: The Receipt prints fee and shipping rows after Subtotal and the discount rows, before tax and Total (they printed above Subtotal). Apps whose receipts carry fees or shipping print them in this new place; receipts without charges are unchanged.
  • 653b4ed: The Orders list shows an insufficient_stock warning as "{quantity} sold without stock: {name}" (was "Stock short by {quantity} for {name}"). From medusapos plugin 0.2.0, quantity is the units of this sale that stock did not cover.
    • @tallyui/core@3.5.2
    • @tallyui/pos@3.5.2
    • @tallyui/primitives@3.5.2
    • @tallyui/theme@3.5.2

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.5.2

@tallyui/pos

Patch Changes

  • @tallyui/core@3.5.2

@tallyui/connector-woocommerce

Patch Changes

  • @tallyui/core@3.5.2

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.5.2

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.5.2

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@3.5.2

3.5.1

@tallyui/database

Patch Changes

  • @tallyui/core@3.5.1

@tallyui/components

Patch Changes

  • @tallyui/pos@3.5.1
  • @tallyui/core@3.5.1
  • @tallyui/primitives@3.5.1
  • @tallyui/theme@3.5.1

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.5.1

@tallyui/pos

Patch Changes

  • @tallyui/core@3.5.1

@tallyui/connector-woocommerce

Patch Changes

  • 11564ed: readWooCapabilities reports orderCreate: 5 only for a store that proves it takes version 5: /wcpos/v2/status lists order_create_v5 or order_payments_list, or /wcpos/v2/site reports WCPOS 1.10.20 or later (the oldest release with a proven v5 push). Any other store, including one whose version cannot be read, gets orderCreate: 3, so fees, shipping and custom lines are not offered there.
    • @tallyui/core@3.5.1

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.5.1

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.5.1

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@3.5.1

3.5.0

@tallyui/core

Minor Changes

  • a5b432e: Products report flat categories with string ids through the new optional getCategories trait (WooCommerce and Medusa categories, Vendure collections, Shopify product type). @tallyui/pos adds productCategories, listCategories and inCategory, which fall back to getCategoryNames for connectors without the trait.

@tallyui/components

Minor Changes

  • f93720a: Catalogue gains an opt-in category nav (showCategoryNav, optional categories). "All products" comes first, then the categories of the listed products. The choice is kept in the view state as categoryId (new in CatalogueViewState, with the setCategory action). Visual change: CategoryNav chips are now rectangular (rounded-md) instead of pill-shaped (rounded-full), in every app that renders it. CategoryNav chips are also exposed as radios (role="radio", aria-checked) in a radiogroup labelled "Categories".
  • 4579599: Catalogue can switch between grid and table (showViewToggle), take a grid column count, and keep a view state the app controls or persists (viewState, defaultViewState, loadViewState, saveViewState, onStateChange, items, onQueryChange); new ViewToggle primitive and pure catalogueViewReducer / normalizeCatalogueViewState / resolveGridColumns. Without the new props the Catalogue is unchanged.
  • 6b2277c: Add ProductTable (a virtualised product table with default trait columns and header sort) and the pure sortProducts / productSortValue helpers.

@tallyui/pos

Minor Changes

  • f93720a: Catalogue gains an opt-in category nav (showCategoryNav, optional categories). "All products" comes first, then the categories of the listed products. The choice is kept in the view state as categoryId (new in CatalogueViewState, with the setCategory action). Visual change: CategoryNav chips are now rectangular (rounded-md) instead of pill-shaped (rounded-full), in every app that renders it. CategoryNav chips are also exposed as radios (role="radio", aria-checked) in a radiogroup labelled "Categories".
  • 4579599: Catalogue can switch between grid and table (showViewToggle), take a grid column count, and keep a view state the app controls or persists (viewState, defaultViewState, loadViewState, saveViewState, onStateChange, items, onQueryChange); new ViewToggle primitive and pure catalogueViewReducer / normalizeCatalogueViewState / resolveGridColumns. Without the new props the Catalogue is unchanged.
  • a5b432e: Products report flat categories with string ids through the new optional getCategories trait (WooCommerce and Medusa categories, Vendure collections, Shopify product type). @tallyui/pos adds productCategories, listCategories and inCategory, which fall back to getCategoryNames for connectors without the trait.
  • 6b2277c: Add ProductTable (a virtualised product table with default trait columns and header sort) and the pure sortProducts / productSortValue helpers.

@tallyui/connector-woocommerce

Minor Changes

  • a5b432e: Products report flat categories with string ids through the new optional getCategories trait (WooCommerce and Medusa categories, Vendure collections, Shopify product type). @tallyui/pos adds productCategories, listCategories and inCategory, which fall back to getCategoryNames for connectors without the trait.

@tallyui/connector-medusa

Minor Changes

  • a5b432e: Products report flat categories with string ids through the new optional getCategories trait (WooCommerce and Medusa categories, Vendure collections, Shopify product type). @tallyui/pos adds productCategories, listCategories and inCategory, which fall back to getCategoryNames for connectors without the trait.

@tallyui/connector-shopify

Minor Changes

  • a5b432e: Products report flat categories with string ids through the new optional getCategories trait (WooCommerce and Medusa categories, Vendure collections, Shopify product type). @tallyui/pos adds productCategories, listCategories and inCategory, which fall back to getCategoryNames for connectors without the trait.

@tallyui/connector-vendure

Minor Changes

  • a5b432e: Products report flat categories with string ids through the new optional getCategories trait (WooCommerce and Medusa categories, Vendure collections, Shopify product type). @tallyui/pos adds productCategories, listCategories and inCategory, which fall back to getCategoryNames for connectors without the trait.

3.4.0

@tallyui/database

Patch Changes

  • @tallyui/core@3.4.0

@tallyui/components

Minor Changes

  • 4ddcc43: The Cart adds, shows and removes fees, shipping and custom lines when the store accepts order.create 5 (ChargeForm, gated on the store's lineTax for tax status and class), and the receipt prints fees and shipping.

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.4.0

@tallyui/pos

Minor Changes

  • c3acce9: Include fees and shipping in Z report tax rates, expose store capabilities from useSale, and tax WooCommerce shipping using the store's shipping tax class as the cart changes.

Patch Changes

  • @tallyui/core@3.4.0

@tallyui/connector-woocommerce

Patch Changes

  • 268d8a4: WooCommerce orders carry a discounted line as a price override, as WCPOS does: its subtotal equals its discounted total, so WooCommerce's discount total shows coupons only (ADR-077). A discounted tax-inclusive line is no longer refused: it pushes its stored 6dp net.
  • bf1c33d: The WooCommerce transport maps order.create version 5: fees as fee_lines, shipping as shipping_lines and custom lines as a WCPOS misc product (product_id 0 with _woocommerce_pos_data), and the connector now reports orderCreate: 5.
    • @tallyui/core@3.4.0

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.4.0

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.4.0

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@3.4.0

3.3.0

@tallyui/core

Minor Changes

  • 820b8c2: order.create version 5 (ADR-075): fees, shipping and custom lines in the command types, with precheckCommand and the payload, bounds and fiscal-figure checks; v5 fields are refused below version 5.
  • 585af9b: woocommerceTax: WooCommerce tax primitives ported from WCPOS's order-math (MIT): calculateTaxes (compound, priority order, PHP rounding), filterTaxRates (address matching), and the rounding and tax-class helpers, for the WooCommerce connector (ADR-076).
  • 71be352: A woocommerce tax strategy (ADR-076): several rates per class with priority and compound tax, and WooCommerce's per-rate per-line rounding (or at subtotal), through StoreSettings.taxRates and TaxContext.getTaxRates; other strategies are unchanged.

Patch Changes

  • fcace3b: ServerCapabilities.lineTax and parseLineTax: a store's /tally/v1/info says whether it accepts tax-free and tax-classed fees, shipping and custom lines (order.create 5).
  • 9f7cffe: A WooCommerce order can carry several payments when the store's plugin records the list (order_payments_list): the primary tender names the payment method and _woocommerce_pos_payments keeps all of them. ServerCapabilities.multiplePayments tells the app whether to offer split tender. The connector also reports lineTax: { none: true, classes: true } itself, since WCPOS has no /tally/v1/info.
  • c7aa412: Woo products carry tax_class and tax_status (schema version 2: a till resyncs its products once) through the getTaxClass/getTaxStatus traits. Core adds the optional getTaxStatus trait, which the cart and addProduct pass to the line.
  • 611ce1c: The connector now reads the store's tax settings and capabilities (the WooCommerce tax strategy, ADR-076); parseTaxRounding accepts the woocommerce granularity.

@tallyui/pos

Minor Changes

  • f604f87: Orders with fees, shipping or custom lines can be completed and sent as order.create version 5 to a store that accepts it (others refuse at completion, naming the plugin upgrade). pos_orders moves to version 8, which also records the woocommerce tax rounding (ADR-075, ADR-076). Version 8 is one-way: a till that opens this release can't go back.
  • 71be352: A woocommerce tax strategy (ADR-076): several rates per class with priority and compound tax, and WooCommerce's per-rate per-line rounding (or at subtotal), through StoreSettings.taxRates and TaxContext.getTaxRates; other strategies are unchanged.

Patch Changes

  • db9d97a: buildClosureDocument's has_sales is true only when the period had a sale or refund (it was true for every closure, because the period totals are always strings such as "0.00").
  • cec1088: The WooCommerce transport pushes tax-inclusive lines with the till's 6dp ex-tax net, as WooCommerce rebuilds a line's tax from it (ADR-076); a discounted tax-inclusive line is still refused. CommandTransport.send takes an optional, local-only OrderTransportContext.
  • c7aa412: Woo products carry tax_class and tax_status (schema version 2: a till resyncs its products once) through the getTaxClass/getTaxStatus traits. Core adds the optional getTaxStatus trait, which the cart and addProduct pass to the line.

@tallyui/connector-woocommerce

Patch Changes

  • f604f87: Orders with fees, shipping or custom lines can be completed and sent as order.create version 5 to a store that accepts it (others refuse at completion, naming the plugin upgrade). pos_orders moves to version 8, which also records the woocommerce tax rounding (ADR-075, ADR-076). Version 8 is one-way: a till that opens this release can't go back.
  • cec1088: The WooCommerce transport pushes tax-inclusive lines with the till's 6dp ex-tax net, as WooCommerce rebuilds a line's tax from it (ADR-076); a discounted tax-inclusive line is still refused. CommandTransport.send takes an optional, local-only OrderTransportContext.
  • 9f7cffe: A WooCommerce order can carry several payments when the store's plugin records the list (order_payments_list): the primary tender names the payment method and _woocommerce_pos_payments keeps all of them. ServerCapabilities.multiplePayments tells the app whether to offer split tender. The connector also reports lineTax: { none: true, classes: true } itself, since WCPOS has no /tally/v1/info.
  • c7aa412: Woo products carry tax_class and tax_status (schema version 2: a till resyncs its products once) through the getTaxClass/getTaxStatus traits. Core adds the optional getTaxStatus trait, which the cart and addProduct pass to the line.
  • 611ce1c: The connector now reads the store's tax settings and capabilities (the WooCommerce tax strategy, ADR-076); parseTaxRounding accepts the woocommerce granularity.

3.2.1

@tallyui/database

Patch Changes

  • @tallyui/core@3.2.1

@tallyui/components

Patch Changes

  • 50ae7de: New SplitTender view: take several payments for one sale (cash and card), with remaining due and change, over useSale().addTender/removeTender; Tender is unchanged.

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.2.1

@tallyui/pos

Patch Changes

  • a187b61: Fees, shipping and custom lines on the order (ADR-075 phase a): useSale addFee, addShipping, addCustomLine and their update/remove, with tax, totals, display and receipt rows. Orders carrying them can't be completed until a later release sends order.create version 5.
    • @tallyui/core@3.2.1

@tallyui/connector-woocommerce

Patch Changes

  • @tallyui/core@3.2.1

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.2.1

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.2.1

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@3.2.1

3.2.0

@tallyui/database

Patch Changes

  • @tallyui/core@3.2.0

@tallyui/components

Minor Changes

  • 2a3a3f0: useSale takes an optional currentPrice(variantId) and resume() then re-prices a parked sale's lines to today's prices (with a non-blocking 'Prices changed' message; resume(id, { keepParkedPrices: true }) keeps them); ParkedSales takes optional onPark/onResume, so an app can drive it from its own parked store.

Patch Changes

  • d870060: Price and fixed-discount entry accept up to the currency's own decimal places, so 3-decimal currencies (KWD, BHD, OMR) can be entered to the minor unit; percentages stay at 2.

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.2.0

@tallyui/pos

Minor Changes

  • 2a3a3f0: useSale takes an optional currentPrice(variantId) and resume() then re-prices a parked sale's lines to today's prices (with a non-blocking 'Prices changed' message; resume(id, { keepParkedPrices: true }) keeps them); ParkedSales takes optional onPark/onResume, so an app can drive it from its own parked store.

Patch Changes

  • @tallyui/core@3.2.0

@tallyui/connector-woocommerce

Patch Changes

  • @tallyui/core@3.2.0

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.2.0

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.2.0

@tallyui/connector-vendure

Minor Changes

  • 5f588a6: vendureAuth gains fieldSets (email and password, or a device key) and honours an optional credential kind: 'password' | 'api-key', so a SignIn screen can offer a device key without its own form; credentials without kind behave as before.

Patch Changes

  • @tallyui/core@3.2.0

3.1.1

@tallyui/core

Patch Changes

  • 63a7431: TallyConnector gains an optional emailReceipt(context, orderId, email, { saveToBilling? }) for connectors that can email a store order's receipt (online only, not idempotent).

@tallyui/connector-woocommerce

Patch Changes

  • f2a1a0f: Customers on WCPOS 1.10.x (searchCustomers, getCustomer, createCustomer over wcpos/v2/customers and push/customers) and emailReceipt over wcpos/v2/orders/<id>/email, with the same contract as the Vendure connector.

3.1.0

@tallyui/database

Patch Changes

  • @tallyui/core@3.1.0

@tallyui/components

Patch Changes

  • 7986abe: Cart can show a Price action on each line (canEditPrice) over useSale().setUnitPrice, with an optional reason passed to onPriceChange; new PriceForm and parsePrice.
  • 4a93ef6: CustomerSelect renders its search input (it took onSearch and placeholder but showed no input), so apps no longer compose their own.
  • ae38ef8: New ParkedSales sheet (components) and useParkedSales(drafts) hook (pos): park the current cart, and resume or discard (with confirmation) parked carts, newest first.

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.1.0

@tallyui/pos

Minor Changes

  • 8471546: The stored order keeps the sale's id as saleId (pos_orders version 7, ADR-072; never sent). Version 7 is one-way: a till that opens 3.1.0 can't go back to 3.0.x.
  • 423bf42: Split tender: useSale().addTender() and removeTender() take several payments for one sale. Change comes only from cash, and a card tender is capped at the balance due (ADR-072). setTender now replaces every payment with the one given.

Patch Changes

  • ae38ef8: New ParkedSales sheet (components) and useParkedSales(drafts) hook (pos): park the current cart, and resume or discard (with confirmation) parked carts, newest first.
  • 56b24d2: useSale().removeTender() with an id not among the payments changes nothing (it no longer emits a new snapshot).
    • @tallyui/core@3.1.0

@tallyui/connector-woocommerce

Patch Changes

  • @tallyui/core@3.1.0

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.1.0

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.1.0

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@3.1.0

3.0.4

@tallyui/database

Patch Changes

  • @tallyui/core@3.0.4

@tallyui/components

Patch Changes

  • 4946325: Catalogue takes an optional pullError; while it is set, a catalogue that has never synced shows 'No products yet.' instead of 'Loading products…' (a failed first pull no longer reads as loading).
  • 5a2e037: RegisterPanel lists only cash under 'Expected in the drawer' and other tenders under 'Other tenders'; the external tender reads 'Card' in the panel, the count and the closure sheet.
    • @tallyui/pos@3.0.4
    • @tallyui/core@3.0.4
    • @tallyui/primitives@3.0.4
    • @tallyui/theme@3.0.4

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.0.4

@tallyui/pos

Patch Changes

  • @tallyui/core@3.0.4

@tallyui/connector-woocommerce

Patch Changes

  • @tallyui/core@3.0.4

@tallyui/connector-medusa

Patch Changes

  • b10c3e2: Faster first catalogue sync: 250-product admin pages and up to 3 concurrent store-API price requests per page (ADR-074).
    • @tallyui/core@3.0.4

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.0.4

@tallyui/connector-vendure

Patch Changes

  • 88e36d1: Customer search, creation and lookup (searchCustomers, createCustomer, getCustomer) over the Admin API in the session's channel; needs ReadCustomer and CreateCustomer.
    • @tallyui/core@3.0.4

3.0.3

@tallyui/database

Patch Changes

  • @tallyui/core@3.0.3

@tallyui/components

Patch Changes

  • 2215eae: orderReference is exported from the package root, so an app's own receipt can print the same order reference as OrdersList and Receipt.
  • 1d8cbc0: catalogueEntries accepts a trait context and no longer requires getVariants (a product without it sells as one variant from its own traits); Catalogue passes its currency; connector-woocommerce adds getVariants for non-variable products (variable products need their variations synced, a later release).

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.0.3

@tallyui/pos

Patch Changes

  • e7b980a: OrderBuilder.setUnitPrice and useSale.setUnitPrice edit a line's unit price at the till (discounts and tax recomputed; integer, >= 0); no stored-order change.
  • c05e216: useSale parks and resumes carts through a drafts collection (new drafts option, park() and resume(id)), using OrderManager's draft format; new exports orderDraftSchema, writeOrderDraft, restoreOrderDraft and parkedOrderSummaries$.
  • 1d8cbc0: catalogueEntries accepts a trait context and no longer requires getVariants (a product without it sells as one variant from its own traits); Catalogue passes its currency; connector-woocommerce adds getVariants for non-variable products (variable products need their variations synced, a later release).
    • @tallyui/core@3.0.3

@tallyui/connector-woocommerce

Patch Changes

  • 1d8cbc0: catalogueEntries accepts a trait context and no longer requires getVariants (a product without it sells as one variant from its own traits); Catalogue passes its currency; connector-woocommerce adds getVariants for non-variable products (variable products need their variations synced, a later release).
  • 843a06b: createWooCommandTransport sends the order outbox's order.create commands to WCPOS 1.10.x's wcpos/v2/push/orders as paid orders (one cash or card payment, tax-exclusive or untaxed stores; ADR-073).
  • 21823a4: Variable products carry their variations, read from WCPOS 1.10.x's flat wcpos/v2/variations route (no per-product route exists there), so getVariants returns them (titled from their attribute options). The products collection schema goes to version 1, so the catalogue resyncs once.
    • @tallyui/core@3.0.3

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.0.3

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.0.3

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@3.0.3

3.0.2

@tallyui/database

Patch Changes

  • @tallyui/core@3.0.2

@tallyui/components

Patch Changes

  • ccdaaf8: The empty cart's line is padded like the cart rows instead of sitting against the panel edge.
  • 16b5627: Catalogue shows 'Loading products…' on an empty grid until the first sync completes (new optional loading prop, defaulting to lastSyncedAt === null).
  • f6c511d: The receipt prints the finalized order's reference (its id's last 8 characters, plus the store's #number once synced) and time when given posOrder, and Orders shows the same reference, so a receipt matches its row. A receipt rendered without posOrder is marked '(draft)'. Apps pass useSale's receipt-stage posOrder to <Receipt>.
  • a862823: OrdersList rows expand on tap to show the sale's items and payments, and an empty list says 'No sales yet. Completed sales appear here.'
  • 7a0db5e: The receipt shows each discount once: the order discount appears only in the totals, and line discounts are summed once as 'Line discounts' instead of a combined 'Discount' row.
    • @tallyui/core@3.0.2
    • @tallyui/pos@3.0.2
    • @tallyui/primitives@3.0.2
    • @tallyui/theme@3.0.2

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.0.2

@tallyui/pos

Patch Changes

  • @tallyui/core@3.0.2

@tallyui/connector-woocommerce

Patch Changes

  • @tallyui/core@3.0.2

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.0.2

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.0.2

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@3.0.2

3.0.1

@tallyui/database

Patch Changes

  • @tallyui/core@3.0.1

@tallyui/primitives

Patch Changes

  • 2416b21: A Dialog now closes on an overlay press and, on web, on Escape (the topmost dialog only; closeOnPress={false} or onEscapeKeyDown + preventDefault() keep it open), and RegisterPanel has a close button, so the register panel can be dismissed on web.

@tallyui/components

Patch Changes

  • 2416b21: A Dialog now closes on an overlay press and, on web, on Escape (the topmost dialog only; closeOnPress={false} or onEscapeKeyDown + preventDefault() keep it open), and RegisterPanel has a close button, so the register panel can be dismissed on web.

@tallyui/storage-sqlite

Patch Changes

  • @tallyui/core@3.0.1

@tallyui/pos

Patch Changes

  • @tallyui/core@3.0.1

@tallyui/connector-woocommerce

Patch Changes

  • d29d97d: Read WCPOS 1.10.x product uuids from the _woocommerce_pos_uuid meta and barcodes from global_unique_id when the top-level fields are absent, so the connector syncs from the released WCPOS Free plugin (1.10.20).
    • @tallyui/core@3.0.1

@tallyui/connector-medusa

Patch Changes

  • @tallyui/core@3.0.1

@tallyui/connector-shopify

Patch Changes

  • @tallyui/core@3.0.1

@tallyui/connector-vendure

Patch Changes

  • @tallyui/core@3.0.1

3.0.0

@tallyui/core

Major Changes

  • 668f71f: Breaking: precheckCommand now takes the server's own supported versions as a required second argument, { orderCreate, register }, and checks against them; its unsupported_version message and data name the server's list, not core's (#297). Plugins MUST pass their supported versions: precheckCommand(envelope, { orderCreate: [1, 2, 3], register: [1] }); an empty list throws a TypeError. This is part of 3.0.0's breaking changes and adds no extra major. SUPPORTED_ORDER_CREATE_VERSIONS and SUPPORTED_REGISTER_VERSIONS stay exported as the till's capability (what toOrderCreateEnvelope can produce), not what a server supports.

Minor Changes

  • 4de75c2: A batch over 50 commands is answered 413 with { code: 'batch_too_large', maxCommands: 50, message: 'At most 50 commands are allowed' }, never 400 (ADR-038, Front desk ruling 18): @tallyui/core/server's validateBatch returns that body on its 413 failure so plugins send it as is. @tallyui/core/server now also exports MAX_COMMANDS_PER_BATCH, and @tallyui/core and @tallyui/core/server export the BatchTooLargeBody type.

  • 894b6ae: One catalogue reconcile runner replaces the id and fingerprint reconcile runners (#248, part A). startIdReconcile and startFingerprintReconcile remain as thin wrappers with their options and results.

    • startCatalogueReconcile (new) compares the backend's product listing with the till in one pass and hands what differs to the collection's pull. It:
      • stays within a request budget (30 a minute by default) instead of a page cap, so large catalogues never truncate;
      • keeps its daily gate and a resume cursor in RxDB local documents, so it does not run on every start, and it resumes after an interruption;
      • deletes only in an uninterrupted pass, and only what the connector confirms gone. The mass-delete brake is checked on the candidates before the connector is asked, and the connector is asked in chunks (confirmChunk, default 100), each within the budget;
      • stops or skips by errorKind;
      • logs what it did through an optional log callback.
    • Behaviour changes for the existing runners:
      • there is no pass 5 s after every start: the daily gate is checked at the start delay and then hourly;
      • maxPages is ignored;
      • requests are paced by the budget;
      • differences are refetched page by page;
      • apps that run more than one runner on the same collection pass a distinct stateId.
    • createReconcileFeed:
      • it takes an optional key to match fetched documents by the local primary key, so it works where doc.id is not the primary key; fetchByIds then receives the queued entries;
      • a tombstone entry is deleted without a fetch;
      • a fetched document keeps a _deleted the connector set.
    • @tallyui/core adds CatalogueReconcileAdapter and TallyConnector.reconcile.catalogue.
    • Connector collections enable RxDB local documents.
  • 04905ef: Catalogue now applies the provider's reconciled stock overlay itself (tiles, search and the variant chooser agree), and useStockOverlaid and useStockOverlayAsOf are new.

  • faa7cda: Expose ConnectorUnauthorizedError for expired or rejected stored credentials in Vendure and Medusa requests.

  • 9f34416: @tallyui/core/server adds the batch envelope check, the per-command version pre-check, the supported versions, totalWarnings and parseCommandResult (throwing CommandResultError), byte-identical to the medusapos plugin's.

  • fb57e1d: @tallyui/core/server adds the register payload check (registerPayloadErrors), the expected-cash derivation (deriveSessionFigures, deriveVariance) and the register conflict codes (RegisterConflictCode, RegisterOutcome), byte-identical to the medusapos plugin's.

  • 898e98b: Add @tallyui/core/server, the plugins' shared contract: money, fingerprint, the order.create payload shape and fiscal figures, byte-identical to the medusapos plugin's.

  • 75c5dce: @tallyui/core/server's envelope types now admit register commands and any validated version, and it exports BatchOutcome with inProgressOutcome and transientOutcome. It also exports CommandRejectionCode and platformErrorResult (a new platform_error code).

  • ba63f04: CommandWarning gains { code: 'customer_ignored'; customerId: string } (#266): a sale whose customerId doesn't resolve is kept as a guest sale. knownWarnings keeps it and parseCommandResult accepts it when customerId is 1 to 64 characters; the orders list renders it.

  • 0d04d13: Add neutral Customer, CustomerInput and CustomerServiceError exports and optional online-only customer search, create and get connector methods.

    Implement customer search, create and get for Medusa's admin-user connector.

  • 78d324e: Add useSale.setCustomer and ReceiptData.header.customer, customerTraits, CustomerPicker, generic CustomerSelect/CustomerCard with traits overrides, CustomerForm.showAddress, and the receipt's customer line.

    CustomerSelect rows are now pressable, so choosing a result works on the web (it previously did nothing).

  • 7fee0c1: A WooCommerce product whose uuid changed in the store is replaced on the till in one pass (#331). The till delivers it under its new uuid and removes the old copy. Before this fix, it removed the old copy and dropped the new one, so the product was missing until the next daily check, and it was removed without the usual by-id check.

    • The reconcile feed: when an entry that has a local copy is fetched back under a different primary key but the same remote id, the feed delivers that document as well as removing the old copy.
    • combinePullAdapters takes an optional key for resolving duplicates across its sub-adapters. It defaults to doc.id, as before. WooCommerce passes the uuid (its primary key): two documents that share a store id, such as a product's new copy and its old copy's removal, must both reach the collection.
  • 24b74fd: CommandWarning gains { code: 'figures_mismatch'; fields: Array<{ field: 'subtotalMinor' | 'taxMinor' | 'discountMinor' | (string & {}); tillMinor: number; serverMinor: number }> } (#257): one warning per sale listing each of the till's figures that differs from the server's own computation. parseCommandResult accepts it when fields is non-empty, each field is one of the three names with none repeated, and each entry's two values are different safe integers. knownWarnings applies the same rules but keeps a field name it doesn't know (any non-empty string), since a newer store may send one; the orders list renders it, an unknown field by its raw name.

  • eb5a032: A /tally/v1/info answer that says nothing about the store no longer means the default tax rounding (a follow-up to #339).

    • Unknown: a 2xx that is not JSON, and a taxRounding value that is present but malformed, now read as "unknown" (undefined), like a network failure or a 5xx. The till's store settings wait and retry instead of selling on a guessed rounding.
    • Unchanged: a 404 still means an older plugin (orderCreate: 1, the default rounding), and so does a well-formed body with no taxRounding key.
    • Type change: parseInfoCapabilities now returns ServerCapabilities | undefined. It is undefined when the body carries a malformed taxRounding.
  • 54ee98a: @tallyui/core/server adds the internal_error rejection code and internalErrorResult.

  • 27d736e: CommandWarning gains bridgeMinor on total_mismatch and a new tax_rate_mismatch code, and the till now ignores warning codes it doesn't know (knownWarnings), instead of showing them as a store total.

  • e59ebec: Each line is taxed at its product's tax class, not the store's default (#288). ProductTraits gains an optional getTaxClass(doc, variantId?), the backend's tax class id, a key of StoreSettings.taxRatesPpm. addProduct and addEntryToCart pass it to addLine through the new AddLineInput.taxClass, which the tax context resolves; a connector without the accessor is unchanged (the default rate). TaxProvider taxes a class with no rate at the default rate and warns once per class through the new taxLogger. connector-vendure replicates each variant's taxCategory { id } and implements the accessor, and its store settings give every tax category with no enabled rate in the default zone an explicit 0 rate, as Vendure charges; its product schema goes to version 2, so the products collection is dropped and downloaded again on the first sync after the upgrade.

  • 2ecaa36: A replication adapter can set pull.batchSize, and the Medusa connector pulls 500 products per page.

  • 901fa66: Add order.create envelope version 3, its display and tax-rate wire types, and the payload's sessionId and customer reference.

    At capability 3, finalizeOrder copies the receipt's display and taxByRate into the sale. Version 3 sends those figures and the sale's session (stamped or late) as sessionId. Older orders keep their existing envelope version.

    Move pos_orders to schema version 3 with a sessionId index and the optional sentVersion and downgradedFrom fields (declared for the outbox's version fallback, not yet written). Apps must open pos_orders with addPosOrderCollection, which migrates it.

  • bf2d805: order.create version 4 (#286): every discountMinor, the order's and each line's, is tax-exclusive, so their sum still holds. Core accepts version 4 with version 3's fields. The till's envelope builder (toOrderCreateEnvelope) produces version 4 when capped at 4 or more and the order's sentVersion doesn't hold it lower. The till doesn't send version 4 yet: the outbox doesn't pass the server's max, so it still sends version 3 or lower with the same figures, byte-identical.

  • ca0beac: Fall back to the server's supported order.create version while preserving stored fiscal figures and command IDs. Record the sent version and downgrade in the order audit, and expose command error details.

  • af623c9: The order.create string lengths move from payloadShapeErrors to the new payloadBoundErrors, which precheckCommand calls after the replay lookup, so an applied order resent with a long title replays as duplicate; payloadShapeErrors keeps the types, the customerId and sessionId bounds and the NUL check. useSale applies a tender before logging a dropped reference, and add() refuses a product whose id or v3 tax code finalize would refuse; the tender's reference field caps at 255 characters. finalizeOrder now freezes the sent form (names and discount labels cut, an unsendable customer email or id left out) and toOrderCreateEnvelope sends the stored order unchanged, so every resend is byte-identical.

  • ef2f64e: The shared order.create shape check bounds string lengths and refuses NUL, and so does the v3 fiscal-figures check for its display and tax-code strings. The till cuts long names when it stores the order, refuses over-long pass-through references at finalize (and a payment reference as it's entered), refuses a searched or parked customer whose email or id the server would refuse, and validates the customer email at entry. Tills should ship this clamp before plugins adopt the new bounds, so no till sends a sale the server would now refuse.

  • 457162d: One reconcile feed per store session (#307, a release gate). The WooCommerce and Medusa reconcile feeds were module-level singletons, so after a store switch in one runtime, store A's queued tombstones and refetches could reach store B's database.

    • New factories. createWooCommerceConnector(), createMedusaConnector() and createMedusaAdminUserConnector() each build their own feed; createVendureConnector(options) already did. Build a connector per store session, anew on each sign-in or store change.
    • Deprecated exports. woocommerceConnector, medusaConnector, medusaAdminUserConnector and vendureConnector are deprecated: one instance for the whole app can leak queued reconcile work across stores. They are removed in 4.0.
    • A development warning. startReplication warns once when the same adapter object replicates into two collections at once.
    • Refetch budget by requests. refetchBatchSize on the reconcile adapters makes a page that enqueues n refetches take ceil(n / refetchBatchSize) request-budget slots (WooCommerce 100, Medusa 100, Vendure 1,000).
    • WooCommerce 426 errors. A foreign (non-WCPOS) 426 keeps the store's code beside its message, and the message is capped at 200 characters.
  • 222543b: Add RegisterCommandType, RegisterCommandEnvelope and AnyCommandEnvelope, register payloads and results, and the register server capability. CommandType and CommandEnvelope are unchanged.

    Record the local register_commands ledger through reconcileRegisterCommands, gated in useRegisterSession by its new commands and capabilities options. Commands are recorded but not sent. Medusa reads the register contract.

  • 8141c1c: Guard register commands, movement reasons and register ids, exporting RegisterMovementReasonError and RegisterIdInvalidError. Harden register outbox result handling and batch limits.

    Make CommandBatchRequest generic while preserving its existing default envelope type.

  • ce4f796: Replication pull errors are handled according to who can fix them, instead of every error being retried every 5 s forever. A till repeating a rejected token is the traffic a store's security plugin blocks.

    • @tallyui/core:
      • An error class declares fixedBy: 'till' | 'store' with a string code; errorKind(error) returns 'till', 'store' or 'transient'.
      • SyncNotice ({ code, since, fixedBy, software?, minVersion?, fix? }) describes a stopped pull.
      • ConnectorUnauthorizedError is fixed by the till.
    • @tallyui/database startReplication handles the three kinds and returns RxDB's state plus notice$ and resume():
      • till: one request, one notice, then the pull stays stopped until the app calls resume(), after sign-in. The pull stays stopped even when RxDB restarts the loop on page visibility.
      • store: one notice, then one attempt every 5 minutes (or the error's retryAfterMs, up to 1 hour). The notice clears itself on the first success, so a till recovers within 5 minutes of the owner's fix.
      • transient: a doubling delay from retryTime to 5 minutes. It waits at least a valid retryAfterMs (a finite number of zero or more), capped at 1 hour.
    • @tallyui/components: SyncStatus takes an optional pullNotice and tells the cashier in plain words that they can keep selling and who needs to act. It never shows a code, a backend name or a version the notice doesn't carry.
    • @tallyui/connector-woocommerce:
      • WooDateFilterError is fixed by the store, and carries software and minVersion.
      • WooMissingUuidError gains code: 'missing_plugin' and is fixed by the store.
    • @tallyui/connector-vendure: a new VendureTimezoneConfigError (store_misconfigured, with a plain fix) replaces the plain error when the updatedAt probe shows a server that isn't in UTC.
  • 5ed6281: The till computes tax with the store's rounding strategy (#287, ADR-071). ServerCapabilities gains taxRounding (core exports TaxRounding): per_order, per_line_items or per_rate_group_items, each with half_away_from_zero or half_up, or custom. Absent, and custom, mean today's per_order with half away from zero. TaxProvider takes rounding and rateCodes (tax class → the backend's rate name, for per_rate_group_items); the order records the strategy as taxRounding, and taxLinesByRate takes it as a fourth argument. The algorithms are in docs/contract/field-kinds.md.

  • 5a204a9: StoreSettings gains a derived taxRounding. useStoreSettings fills it from the context's capabilities, or else from one read of the connector's capabilities() made before the settings are ready, so each sign-in emits the settings once with the rounding known and no later change holds a sale; a failed read or a connector without capabilities gives the default rounding. taxProviderProps passes it to TaxProvider as rounding, so the till rounds tax like the store with no app code (#324). custom passes no rounding, and an explicit rounding prop still wins.

  • 7d1bc98: Add parseTaxRounding and parseInfoCapabilities, which read /tally/v1/info including its top-level taxRounding (#287). The Medusa connector's capability read now carries the store's taxRounding.

  • 8cf3ea4: A till tells "sign in again" apart from "signed in, but not allowed" (found by the Medusa POS app's adoption).

    • ConnectorUnauthorizedError.status is now required, typed 401 | 403, and set by meaning at every connector.
      • 401: the credentials are not accepted, so sign in again. code: 'unauthorized', fixed by the till.
      • 403: the till is signed in but not allowed. code: 'forbidden', fixed by the store.
      • Vendure answers a signed-out session with 403 too. Its connector checks who is signed in first, so a confirmed sign-out is always 401.
    • A 403 on the pull gives the forbidden notice, never a sign-out. The pull retries on the store schedule and clears by itself once the store owner grants the permission. SyncStatus shows "Products aren't updating: your account isn't allowed to do this on this store." with "You can keep selling. Ask the store owner."
    • The customer picker shows "Your account isn't allowed to do this on this store. Ask the store owner." for a 403, instead of asking the cashier to sign in again.
  • e15f389: The Vendure connector supplies its tax rate names, so a per_rate_group_items store groups a sale's tax the way Vendure does (#324). Apps no longer fetch the names themselves.

    • StoreSettings.taxRateCodes (core, optional): the backend's tax rate name per tax class, keyed like taxRatesPpm, including default.
    • vendureStoreSettings reads each rate's name in the tax-rate query it already runs, so no extra request is made. Only the rates taxRatesPpm uses count, and default follows the same default-category rule. taxRateCodes is left out when no names come back.
    • taxProviderProps(settings) passes taxRateCodes to <TaxProvider> as rateCodes.
  • ddd9e85: The WooCommerce catalogue reconcile uses the WCPOS products fast path (#313). When wcpos/v2/status lists products_id_fast_path in capabilities, the whole catalogue is listed in one request (per_page=-1, _fields=id,date_modified_gmt,stock_quantity,stock_status) instead of pages of 100. A store that refuses it, or answers with something that is not a list, is listed page by page in the same pass.

    • Keyed on the remote id: both WooCommerce listings key on the numeric product id, never the till-local uuid.
    • CatalogueReconcileAdapter.matchKey (core, optional): an adapter whose listing carries no primary key declares how to match a local document. The catalogue runner indexes the local documents by it for each pass. Deletion is unchanged: confirmGone, then the mass-delete brake, by primary key.
    • remote on the keyed reconcile feed (core, optional): a listed product the till does not hold yet is matched back by its remote id, so it is delivered rather than dropped.

Patch Changes

  • 5c90aed: parseCommandResult now accepts a total_mismatch's bridgeMinor and the tax_rate_mismatch warning code, so a plugin replaying a stored v3 result no longer fails. knownWarnings is lenient about a bad optional bridgeMinor (dropping just that field, not the whole warning) and about a non-array warnings value. OrdersList's rounding line now reads "Store calculated …; a rounding line of … brought it to …". Catalogue keeps its input array's identity when the stock overlay changes nothing, and takes the latest of lastStockCheckAt, the provider's stockOverlayAsOf and lastSyncedAt for its "stock as of" time.

  • 6673faf: RxDB 17.5.0.

    • @tallyui/storage-sqlite:
      • Its rxdb-premium peer is now 17.5.0. Apps install rxdb-premium@17.5.0 together with rxdb@17.5.0.
      • Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
    • @tallyui/pos:
      • Its rxdb peer is now ~17.5.0.
      • Opening pos_orders rejects with PosOrderOpenClosedError when the database closes during a migration: RxDB 17.5.0 cancels the migration on close. The open first waits for any write already in flight, so none reaches a closed store.
      • An open that needs no migration resolves only once RxDB allows writes, so a sale saved straight after it is never refused with COL25.
    • @tallyui/database:
      • createTallyDatabase returns an RxDB 17 database.
      • In development it adds RxDB's dev-mode plugin when a database is created, not at import.
    • Stored data: a till's SQLite data written by RxDB 16.21.1 opens unchanged under 17.5.0, and migrates its schema versions.

    Upgrade notes

    • Storage is one-way. Once a till has opened this version, pos_orders is at schema version 4, and an older build (such as @tallyui/pos 2.0.0 on RxDB 16.21.1) opens it without an error but shows no orders, so it sends none of the pending ones until the till is upgraded again. Nothing is deleted: the next upgrade recovers every order, including a sale rung during the rollback. Never roll an app back across this version, and never re-ring sales it hides: a re-rung sale is a second sale, and the upgrade sends both. See ADR-069 in docs/DECISIONS.md.
    • Web apps ship the 17.5.0 storage worker with the 17.5.0 main thread. A cached 16.x worker with a 17.5.0 main thread is untested and unsupported.
    • Apps pin rxdb and rxdb-premium to exactly 17.5.0.
    • RxDB 17 defaults a replication's toggleOnDocumentVisible to true (16.21.1: false). It then resyncs when the tab becomes visible, and no longer simulates activity to keep a hidden tab awake, so a browser may throttle a hidden tab's pull. RxDB pauses a hidden tab's replication only when that tab isn't the leader; a single-instance database is always the leader (read in 17.5.0's plugins/replication source, not tested).
  • c48e1dd: Store settings follow-ups to #339 and #341 (#340):

    • A signed-out till is asked to sign in, not shown "Retrying…". When the capabilities read fails with an error only the till can fix, useStoreSettings gives error without nextRetryAt and doesn't retry by itself, so the app prompts. That covers a till-class error (a 401, or a till that needs updating) and a SignInError with code: 'invalid_credentials'; any other sign-in error still waits and retries. Every other failure still waits and retries.
    • A /tally/v1/info JSON body that isn't an object (null, an array or a scalar) is unknown, not the default rounding.
  • 1f4d0ab: isStorageWorkerStartError and isStorageWorkerFailure also recognise RxDB's RM1, a stale storage worker built on another RxDB version (for example a cached old worker after an upgrade), so apps show their reload advice for it. Both call the new isRxdbRemoteVersionMismatch in @tallyui/core, which recognises RM1 by structure only: an RxError's own code, or the remote storage's could not create instance wrapping of an RxError's JSON. @tallyui/storage-sqlite now has @tallyui/core as a peer dependency.

  • 3cf5452: Follow-ups to the 401/403 split (#345):

    • Vendure: a signed-in user missing a permission (confirmed by the session probe) is now ConnectorUnauthorizedError with status: 403, the forbidden notice, instead of a plain transient error.
    • WooCommerce: a 403 from the JWT-auth plugin (jwt_auth_*) reaches the till only with a valid token on WCPOS 1.10.0–1.10.7 (wcpos/woocommerce-pos#1863). It is now WooPluginUpdateRequiredError (unsupported_store, WCPOS 1.10.8): the store owner updates WCPOS, and the till is never sent into a sign-in loop.
    • ConnectorUnauthorizedError: only a 403 is forbidden. A caller that omits status gets unauthorized, as before 3.0.
    • Docs: the customer picker's onError, the replication guide's error classes, and the connector comments now say that only a 401 means sign in again.

@tallyui/database

Major Changes

  • 6673faf: RxDB 17.5.0.

    • @tallyui/storage-sqlite:
      • Its rxdb-premium peer is now 17.5.0. Apps install rxdb-premium@17.5.0 together with rxdb@17.5.0.
      • Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
    • @tallyui/pos:
      • Its rxdb peer is now ~17.5.0.
      • Opening pos_orders rejects with PosOrderOpenClosedError when the database closes during a migration: RxDB 17.5.0 cancels the migration on close. The open first waits for any write already in flight, so none reaches a closed store.
      • An open that needs no migration resolves only once RxDB allows writes, so a sale saved straight after it is never refused with COL25.
    • @tallyui/database:
      • createTallyDatabase returns an RxDB 17 database.
      • In development it adds RxDB's dev-mode plugin when a database is created, not at import.
    • Stored data: a till's SQLite data written by RxDB 16.21.1 opens unchanged under 17.5.0, and migrates its schema versions.

    Upgrade notes

    • Storage is one-way. Once a till has opened this version, pos_orders is at schema version 4, and an older build (such as @tallyui/pos 2.0.0 on RxDB 16.21.1) opens it without an error but shows no orders, so it sends none of the pending ones until the till is upgraded again. Nothing is deleted: the next upgrade recovers every order, including a sale rung during the rollback. Never roll an app back across this version, and never re-ring sales it hides: a re-rung sale is a second sale, and the upgrade sends both. See ADR-069 in docs/DECISIONS.md.
    • Web apps ship the 17.5.0 storage worker with the 17.5.0 main thread. A cached 16.x worker with a 17.5.0 main thread is untested and unsupported.
    • Apps pin rxdb and rxdb-premium to exactly 17.5.0.
    • RxDB 17 defaults a replication's toggleOnDocumentVisible to true (16.21.1: false). It then resyncs when the tab becomes visible, and no longer simulates activity to keep a hidden tab awake, so a browser may throttle a hidden tab's pull. RxDB pauses a hidden tab's replication only when that tab isn't the leader; a single-instance database is always the leader (read in 17.5.0's plugins/replication source, not tested).

Minor Changes

  • 894b6ae: One catalogue reconcile runner replaces the id and fingerprint reconcile runners (#248, part A). startIdReconcile and startFingerprintReconcile remain as thin wrappers with their options and results.

    • startCatalogueReconcile (new) compares the backend's product listing with the till in one pass and hands what differs to the collection's pull. It:
      • stays within a request budget (30 a minute by default) instead of a page cap, so large catalogues never truncate;
      • keeps its daily gate and a resume cursor in RxDB local documents, so it does not run on every start, and it resumes after an interruption;
      • deletes only in an uninterrupted pass, and only what the connector confirms gone. The mass-delete brake is checked on the candidates before the connector is asked, and the connector is asked in chunks (confirmChunk, default 100), each within the budget;
      • stops or skips by errorKind;
      • logs what it did through an optional log callback.
    • Behaviour changes for the existing runners:
      • there is no pass 5 s after every start: the daily gate is checked at the start delay and then hourly;
      • maxPages is ignored;
      • requests are paced by the budget;
      • differences are refetched page by page;
      • apps that run more than one runner on the same collection pass a distinct stateId.
    • createReconcileFeed:
      • it takes an optional key to match fetched documents by the local primary key, so it works where doc.id is not the primary key; fetchByIds then receives the queued entries;
      • a tombstone entry is deleted without a fetch;
      • a fetched document keeps a _deleted the connector set.
    • @tallyui/core adds CatalogueReconcileAdapter and TallyConnector.reconcile.catalogue.
    • Connector collections enable RxDB local documents.
  • 2ecaa36: A replication adapter can set pull.batchSize, and the Medusa connector pulls 500 products per page.

  • e77d552: A reconcile result now says whether its pass was complete, so a till never shows a partial pass's "0 not sold" as current (found by the Medusa POS app's 3.0.0-next.0 adoption).

    • complete on CatalogueReconcileSummary, FingerprintReconcileResult and IdReconcileResult: true when the pass ran from its first page to its last in one go, so unlisted and unreported are real counts. It is false for a resumed pass, whose counts are 0. For the fingerprint result, the pass must also have read at least one page.
    • lastCompleteAt on the runner's and the fingerprint wrapper's state: when the last complete pass finished. It is persisted with the runner's gate, and is available before the first pass after a restart.
    • A failed pass that finished no page is restarted rather than resumed. It re-reads from the first page anyway, so it now runs as a complete pass.
  • 457162d: One reconcile feed per store session (#307, a release gate). The WooCommerce and Medusa reconcile feeds were module-level singletons, so after a store switch in one runtime, store A's queued tombstones and refetches could reach store B's database.

    • New factories. createWooCommerceConnector(), createMedusaConnector() and createMedusaAdminUserConnector() each build their own feed; createVendureConnector(options) already did. Build a connector per store session, anew on each sign-in or store change.
    • Deprecated exports. woocommerceConnector, medusaConnector, medusaAdminUserConnector and vendureConnector are deprecated: one instance for the whole app can leak queued reconcile work across stores. They are removed in 4.0.
    • A development warning. startReplication warns once when the same adapter object replicates into two collections at once.
    • Refetch budget by requests. refetchBatchSize on the reconcile adapters makes a page that enqueues n refetches take ceil(n / refetchBatchSize) request-budget slots (WooCommerce 100, Medusa 100, Vendure 1,000).
    • WooCommerce 426 errors. A foreign (non-WCPOS) 426 keeps the store's code beside its message, and the message is capped at 200 characters.
  • ce4f796: Replication pull errors are handled according to who can fix them, instead of every error being retried every 5 s forever. A till repeating a rejected token is the traffic a store's security plugin blocks.

    • @tallyui/core:
      • An error class declares fixedBy: 'till' | 'store' with a string code; errorKind(error) returns 'till', 'store' or 'transient'.
      • SyncNotice ({ code, since, fixedBy, software?, minVersion?, fix? }) describes a stopped pull.
      • ConnectorUnauthorizedError is fixed by the till.
    • @tallyui/database startReplication handles the three kinds and returns RxDB's state plus notice$ and resume():
      • till: one request, one notice, then the pull stays stopped until the app calls resume(), after sign-in. The pull stays stopped even when RxDB restarts the loop on page visibility.
      • store: one notice, then one attempt every 5 minutes (or the error's retryAfterMs, up to 1 hour). The notice clears itself on the first success, so a till recovers within 5 minutes of the owner's fix.
      • transient: a doubling delay from retryTime to 5 minutes. It waits at least a valid retryAfterMs (a finite number of zero or more), capped at 1 hour.
    • @tallyui/components: SyncStatus takes an optional pullNotice and tells the cashier in plain words that they can keep selling and who needs to act. It never shows a code, a backend name or a version the notice doesn't carry.
    • @tallyui/connector-woocommerce:
      • WooDateFilterError is fixed by the store, and carries software and minVersion.
      • WooMissingUuidError gains code: 'missing_plugin' and is fixed by the store.
    • @tallyui/connector-vendure: a new VendureTimezoneConfigError (store_misconfigured, with a plain fix) replaces the plain error when the updatedAt probe shows a server that isn't in UTC.
  • ddd9e85: The WooCommerce catalogue reconcile uses the WCPOS products fast path (#313). When wcpos/v2/status lists products_id_fast_path in capabilities, the whole catalogue is listed in one request (per_page=-1, _fields=id,date_modified_gmt,stock_quantity,stock_status) instead of pages of 100. A store that refuses it, or answers with something that is not a list, is listed page by page in the same pass.

    • Keyed on the remote id: both WooCommerce listings key on the numeric product id, never the till-local uuid.
    • CatalogueReconcileAdapter.matchKey (core, optional): an adapter whose listing carries no primary key declares how to match a local document. The catalogue runner indexes the local documents by it for each pass. Deletion is unchanged: confirmGone, then the mass-delete brake, by primary key.
    • remote on the keyed reconcile feed (core, optional): a listed product the till does not hold yet is matched back by its remote id, so it is delivered rather than dropped.

Patch Changes

  • 539d2ff: The stock, id and fingerprint reconciles read and write in bounded chunks, so app queries don't wait behind a whole pass.

  • d225c58: Internal @tallyui/* peer dependencies are published as a caret range (for example ^2.1.0) instead of an exact version. The packages still release together at one version.

  • 6f83dc5: The catalogue reconcile's mass-delete brake now explains itself in plain words. Its kept event with reason: 'brake' carries a message a till can show to the store owner, for example: "12 products the online store no longer lists were kept on this till: removing that many at once needs a check. If they were hidden or removed on purpose, the person who manages this till can allow the removal." The console warning uses the same words, plus a hint for developers (allowMassDelete: true).

    The WooCommerce tests now model WCPOS's "POS only products" setting, and pin that a product hidden from the POS after sync is removed from the till by the next reconcile pass, while a bulk hide is held by the brake.

  • 1223353: A stale duplicate copy of a store product no longer stays on the till for good (#369). When two local products share one store id, the catalogue check now makes the copy its index did not pick a deletion candidate, and logs a duplicate event with the code duplicate_match_key. The copy is tombstoned only when confirmGone proves the store doesn't back it, and the mass-delete brake still applies. WooCommerce's confirmGone now also confirms a local whose id is live but whose uuid isn't the store's for that id. The store listing is the source of truth, and a later pull restores anything the store still backs.

  • a8b58a4: The catalogue and fingerprint reconciles keep lastCompleteAt honest (#338).

    • The fingerprint reconcile's state$ moves lastCompleteAt only on a pass whose result is complete. A pass that read no pages, which gives complete: false, no longer stamps it.
    • A new runner still shows the persisted value before its first pass.
    • The catalogue runner's start-up load now updates lastCompleteAt only when the stored value is newer, so a load that resolves after a pass has completed can't roll it back.
  • 20b6321: A catalogue pass that yields no pages at all no longer counts (#368). It is not complete, it moves neither lastCompleteAt nor the schedule's last completed time, and the gate runs it again at the next check. A page with no entries still counts: that is an adapter reporting an empty catalogue. Before this, a restarted fingerprint reconcile could show a zero-page pass's time as its last complete one.

  • 1f4d0ab: isStorageWorkerStartError and isStorageWorkerFailure also recognise RxDB's RM1, a stale storage worker built on another RxDB version (for example a cached old worker after an upgrade), so apps show their reload advice for it. Both call the new isRxdbRemoteVersionMismatch in @tallyui/core, which recognises RM1 by structure only: an RxError's own code, or the remote storage's could not create instance wrapping of an RxError's JSON. @tallyui/storage-sqlite now has @tallyui/core as a peer dependency.

  • 8cf3ea4: A till tells "sign in again" apart from "signed in, but not allowed" (found by the Medusa POS app's adoption).

    • ConnectorUnauthorizedError.status is now required, typed 401 | 403, and set by meaning at every connector.
      • 401: the credentials are not accepted, so sign in again. code: 'unauthorized', fixed by the till.
      • 403: the till is signed in but not allowed. code: 'forbidden', fixed by the store.
      • Vendure answers a signed-out session with 403 too. Its connector checks who is signed in first, so a confirmed sign-out is always 401.
    • A 403 on the pull gives the forbidden notice, never a sign-out. The pull retries on the store schedule and clears by itself once the store owner grants the permission. SyncStatus shows "Products aren't updating: your account isn't allowed to do this on this store." with "You can keep selling. Ask the store owner."
    • The customer picker shows "Your account isn't allowed to do this on this store. Ask the store owner." for a 403, instead of asking the cashier to sign in again.
  • 136343c: The WooCommerce connector gets a daily reconciliation pass (#248, part B), a safety net for edits the incremental pull can miss: the spring-forward hour, an over-excluding filter, a same-second edit, a shift without X-WP-Total, trashed or unpublished products, and stock written without a modified-time bump.

    • reconcile.catalogue lists the published catalogue with no date filter, comparing date, stock quantity and stock status. It re-reads deletion candidates by id and removes only those that are gone, trashed or unpublished. Everything else it re-pulls through the collection's own pull.
    • replication.products now combines the product pull with the reconcile feed, with legacyKey: 'products', so existing installs keep their checkpoint.
    • A product the store cannot be asked about (no numeric id) is never deleted.
    • The WCPOS bulk-ID fast path is read from wcpos/v2/status capabilities (products_id_fast_path). It stays dormant until wcpos/woocommerce-pos#2113 ships.
    • @tallyui/database: the catalogue runner's gate check has a 60-second floor, so a bad interval can no longer re-arm it on every tick.

@tallyui/components

Minor Changes

  • 04905ef: Catalogue now applies the provider's reconciled stock overlay itself (tiles, search and the variant chooser agree), and useStockOverlaid and useStockOverlayAsOf are new.

  • 78d324e: Add useSale.setCustomer and ReceiptData.header.customer, customerTraits, CustomerPicker, generic CustomerSelect/CustomerCard with traits overrides, CustomerForm.showAddress, and the receipt's customer line.

    CustomerSelect rows are now pressable, so choosing a result works on the web (it previously did nothing).

  • 130d28e: A store that keeps answering 404 is no longer silent. After 3 consecutive 404 answers the order and register outboxes set OutboxState.backendMissing: { since } (when the first of them arrived), and SyncStatus tells the cashier in plain words that sales aren't reaching the online store and are saved on the till, with a detail line for the store owner, instead of showing retrying (status_404); the stuck line shows the same words, with no raw code. SyncStatus takes an optional pluginName (default 'the POS plugin') for that detail. The outboxes keep retrying on their normal backoff, and orders stay pending, so a 404 during a deploy blip recovers on its own. The next answer that isn't a 404 clears it; an offline (network) retry changes nothing. Pass one createBackendNotFound() tracker as backendNotFound to both createOrderOutbox and createRegisterOutbox so their 404s count together and the notice shows once, whichever outbox meets it first; without it, each outbox keeps its own.

  • 9e1032f: One order the store keeps failing no longer stops every later sale. After 5 server-answered failures (offline never counts) the order outbox probes the pending queue one order per backoff interval, oldest first; once the store takes one, the orders whose probes failed are isolated and retried alone, and batching resumes. If no probe gets through, the store is down: nothing is isolated. Retries alternate between the batch (or the probe) and one due isolated order, one request per interval, so neither can starve the other, and isolated orders take turns. An order the store has kept failing for 15 minutes of answered time, on its own clock, is flagged as stuck and stays pending: OutboxState.stuck, with a per-order entry in stuck.orders, useOrderOutbox's stuckCommandIds, needsAttention's stuckCommandIds option, OrdersList's stuck prop (each order with its own time and reason), and SyncStatus's "Not syncing" line. An offline failure pauses every clock, and the store's next answer of any kind resumes them all; a flagged order stays flagged through an offline spell, since a paused clock keeps its answered time. The HTTP transport now reports a request that got no answer in time as timeout, which counts like a 503 and never pauses a clock, and keeps network for a store it could not reach.

  • a9cdfc0: Migrate pos_orders to version 4 with optional localWarnings and serverFailures. Record omitted customer details and dropped payment references on the stored order, and show these warnings in the orders list; serverFailures is declared for the next outbox update.

  • c92e96e: ProductGrid renders a virtualized FlatList, with its props unchanged.

  • ce4f796: Replication pull errors are handled according to who can fix them, instead of every error being retried every 5 s forever. A till repeating a rejected token is the traffic a store's security plugin blocks.

    • @tallyui/core:
      • An error class declares fixedBy: 'till' | 'store' with a string code; errorKind(error) returns 'till', 'store' or 'transient'.
      • SyncNotice ({ code, since, fixedBy, software?, minVersion?, fix? }) describes a stopped pull.
      • ConnectorUnauthorizedError is fixed by the till.
    • @tallyui/database startReplication handles the three kinds and returns RxDB's state plus notice$ and resume():
      • till: one request, one notice, then the pull stays stopped until the app calls resume(), after sign-in. The pull stays stopped even when RxDB restarts the loop on page visibility.
      • store: one notice, then one attempt every 5 minutes (or the error's retryAfterMs, up to 1 hour). The notice clears itself on the first success, so a till recovers within 5 minutes of the owner's fix.
      • transient: a doubling delay from retryTime to 5 minutes. It waits at least a valid retryAfterMs (a finite number of zero or more), capped at 1 hour.
    • @tallyui/components: SyncStatus takes an optional pullNotice and tells the cashier in plain words that they can keep selling and who needs to act. It never shows a code, a backend name or a version the notice doesn't carry.
    • @tallyui/connector-woocommerce:
      • WooDateFilterError is fixed by the store, and carries software and minVersion.
      • WooMissingUuidError gains code: 'missing_plugin' and is fixed by the store.
    • @tallyui/connector-vendure: a new VendureTimezoneConfigError (store_misconfigured, with a plain fix) replaces the plain error when the updatedAt probe shows a server that isn't in UTC.
  • a94b255: OutboxState gains rejected?: number: the order outbox publishes the count of pos_orders the store refused (syncStatus: 'rejected') wherever it publishes pending, so it rises when a batch result rejects an order and falls when requeue() sends one again. The register outbox leaves it unset. While rejected is above 0, SyncStatus never says "Sales are up to date.": its whole status line (label, polite live region and iOS announcement) is "1 sale needs attention · The online store refused it. Ask the store owner to look at the till's sync log." or "{n} sales need attention · The online store refused them. Ask the store owner to look at the till's sync log.", in place of the stuck and backend-missing sentences and the sending or retrying line. What else waits stays in the count: "1 sale needs attention, 5 waiting to sync · …" with other sales pending, "…, 2 till updates waiting to sync · …" with till updates, and "…, 5 sales and 2 till updates waiting to sync · …" with both. Below it, "Refused sales stay on this till under Needs attention, each with what to do next.", then the backend-missing detail when the store is missing. With rejected 0 or unset, nothing changes. When the store refused a whole batch (refused set, no sale carrying a code), the status line is the waiting count followed by " · The online store refused the last send. This till will try again with the next sale, or when the app is reopened." in place of the stuck or backend-missing sentence, and the sending or retrying line (which read "Retrying in 0 s.") is hidden; refused sales still outrank it. With only till updates waiting and the register outbox refused, it ends "…try again with the next till update." instead; with a sale waiting, the sales line wins.

  • df80ead: SyncStatus takes an optional registerState (the register outbox's state): waiting till updates are counted ("1 till update waiting to sync", or named beside the sales), so it never says the sales are up to date while any wait, and with no sale waiting the backend-missing sentence says till updates aren't reaching the online store, or, once registerState.stuck is set, "Till updates haven't reached the online store since {time}. …". The backend-missing detail now reads "This till couldn't find {pluginName} on the online store. …". With nothing waiting, the line is only "Sales are up to date." (it replaces "All sales synced"), with no sending, retrying or problem text after it; if the store is missing, the detail reads "This till couldn't find {pluginName} on the online store the last time it checked. …". The status line's accessibility label is the whole visible line instead of "Sync status". The order and register outboxes let go of a shared backendNotFound tracker on stop() and take it up again on start() or flush().

  • 8cf3ea4: A till tells "sign in again" apart from "signed in, but not allowed" (found by the Medusa POS app's adoption).

    • ConnectorUnauthorizedError.status is now required, typed 401 | 403, and set by meaning at every connector.
      • 401: the credentials are not accepted, so sign in again. code: 'unauthorized', fixed by the till.
      • 403: the till is signed in but not allowed. code: 'forbidden', fixed by the store.
      • Vendure answers a signed-out session with 403 too. Its connector checks who is signed in first, so a confirmed sign-out is always 401.
    • A 403 on the pull gives the forbidden notice, never a sign-out. The pull retries on the store schedule and clears by itself once the store owner grants the permission. SyncStatus shows "Products aren't updating: your account isn't allowed to do this on this store." with "You can keep selling. Ask the store owner."
    • The customer picker shows "Your account isn't allowed to do this on this store. Ask the store owner." for a 403, instead of asking the cashier to sign in again.

Patch Changes

  • ba63f04: CommandWarning gains { code: 'customer_ignored'; customerId: string } (#266): a sale whose customerId doesn't resolve is kept as a guest sale. knownWarnings keeps it and parseCommandResult accepts it when customerId is 1 to 64 characters; the orders list renders it.

  • 24b74fd: CommandWarning gains { code: 'figures_mismatch'; fields: Array<{ field: 'subtotalMinor' | 'taxMinor' | 'discountMinor' | (string & {}); tillMinor: number; serverMinor: number }> } (#257): one warning per sale listing each of the till's figures that differs from the server's own computation. parseCommandResult accepts it when fields is non-empty, each field is one of the three names with none repeated, and each entry's two values are different safe integers. knownWarnings applies the same rules but keeps a field name it doesn't know (any non-empty string), since a newer store may send one; the orders list renders it, an unknown field by its raw name.

  • d6a5073: The outbox freezes an order an older till stored before it first sends it (freezeSentForm, which finalizeOrder uses too):

    • line names, discount labels and payment references are cut to 255 characters, but ids never are;
    • a customer email or id that order.create would refuse is left out;
    • the frozen form is written back, so the receipt and the store see the same bytes.

    So an order stored before the upgrade and still unsent is never refused as invalid_payload.

    New type: SentOrder, an Order whose customer id may be missing. The receipt stage, buildReceiptData and Receipt take it, and a plain Order still fits.

  • 27d736e: CommandWarning gains bridgeMinor on total_mismatch and a new tax_rate_mismatch code, and the till now ignores warning codes it doesn't know (knownWarnings), instead of showing them as a store total.

  • fd882bc: The stuck line says "no answer from the store" for a timeout.

  • eb203b4: Review follow-ups with no behaviour change (#356, #358):

    • SyncStatus and OrdersList build their "since {time}" and "since about {time}" text with one shared helper.
    • useRegisterOutbox's docs now say when transport() is called, and that the latest isEnabled and onResult are used without restarting the outbox.
  • af623c9: The order.create string lengths move from payloadShapeErrors to the new payloadBoundErrors, which precheckCommand calls after the replay lookup, so an applied order resent with a long title replays as duplicate; payloadShapeErrors keeps the types, the customerId and sessionId bounds and the NUL check. useSale applies a tender before logging a dropped reference, and add() refuses a product whose id or v3 tax code finalize would refuse; the tender's reference field caps at 255 characters. finalizeOrder now freezes the sent form (names and discount labels cut, an unsendable customer email or id left out) and toOrderCreateEnvelope sends the stored order unchanged, so every resend is byte-identical.

  • ef2f64e: The shared order.create shape check bounds string lengths and refuses NUL, and so does the v3 fiscal-figures check for its display and tax-code strings. The till cuts long names when it stores the order, refuses over-long pass-through references at finalize (and a payment reference as it's entered), refuses a searched or parked customer whose email or id the server would refuse, and validates the customer email at entry. Tills should ship this clamp before plugins adopt the new bounds, so no till sends a sale the server would now refuse.

  • d225c58: Internal @tallyui/* peer dependencies are published as a caret range (for example ^2.1.0) instead of an exact version. The packages still release together at one version.

  • 6bbd1ba: Each sale records the tax rounding its figures were computed with (#287): finalizeOrder writes taxRounding on the stored order, the default (per_order, half_away_from_zero) included, and custom as { granularity: 'custom' }. It is the till's own record and is never sent in order.create. The Z report splits each sale's tax by rate with the strategy that sale recorded, so its rows are the receipts' rows, and its breakdowns.tax_rounding_mixed is true when a session's sales used more than one strategy (a custom sale counts as the default it applied); ClosureSheet then says so, and buildClosureDocument carries the same line ready to print as closure.tax_rounding_note (TAX_ROUNDING_MIXED_NOTE), for the apps' closure templates. PosOrder.taxRounding is now required in the type.

    pos_orders moves to schema version 6: taxRounding is required, and the migration records the default on every older sale, the only rounding any earlier build used. Like version 5, this storage is one-way: an older build opens it but shows no orders, so never roll an app back across it (ADR-069). Before 3.0.0 ships, #242's OPFS upgrade proof is rerun against version 6.

  • 5c90aed: parseCommandResult now accepts a total_mismatch's bridgeMinor and the tax_rate_mismatch warning code, so a plugin replaying a stored v3 result no longer fails. knownWarnings is lenient about a bad optional bridgeMinor (dropping just that field, not the whole warning) and about a non-array warnings value. OrdersList's rounding line now reads "Store calculated …; a rounding line of … brought it to …". Catalogue keeps its input array's identity when the stock overlay changes nothing, and takes the latest of lastStockCheckAt, the provider's stockOverlayAsOf and lastSyncedAt for its "stock as of" time.

  • c00e1ea: OrdersList shows a rejected sale's refusal in the cashier's words, one sentence per error code (#269), in both Needs attention and Recent, and never the store's own message. An unknown code, or a rejected sale with no error, shows platform_error's sentence: "The online store refused this sale. Ask the store owner to look at the till's sync log." An idempotency_mismatch shows its sentence ("… Don't send it again; ask the store owner to compare the two.") in place of the old "This sale needs checking against the store before it can be sent again." line, and still has no Retry. The order outbox logs every refusal once to the sync log as "Order refused by the store" with the order id, the code and the store's message: a warning, or an error for unsupported_version (whose log previously used the message itself as its text).

  • 6673faf: RxDB 17.5.0.

    • @tallyui/storage-sqlite:
      • Its rxdb-premium peer is now 17.5.0. Apps install rxdb-premium@17.5.0 together with rxdb@17.5.0.
      • Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
    • @tallyui/pos:
      • Its rxdb peer is now ~17.5.0.
      • Opening pos_orders rejects with PosOrderOpenClosedError when the database closes during a migration: RxDB 17.5.0 cancels the migration on close. The open first waits for any write already in flight, so none reaches a closed store.
      • An open that needs no migration resolves only once RxDB allows writes, so a sale saved straight after it is never refused with COL25.
    • @tallyui/database:
      • createTallyDatabase returns an RxDB 17 database.
      • In development it adds RxDB's dev-mode plugin when a database is created, not at import.
    • Stored data: a till's SQLite data written by RxDB 16.21.1 opens unchanged under 17.5.0, and migrates its schema versions.

    Upgrade notes

    • Storage is one-way. Once a till has opened this version, pos_orders is at schema version 4, and an older build (such as @tallyui/pos 2.0.0 on RxDB 16.21.1) opens it without an error but shows no orders, so it sends none of the pending ones until the till is upgraded again. Nothing is deleted: the next upgrade recovers every order, including a sale rung during the rollback. Never roll an app back across this version, and never re-ring sales it hides: a re-rung sale is a second sale, and the upgrade sends both. See ADR-069 in docs/DECISIONS.md.
    • Web apps ship the 17.5.0 storage worker with the 17.5.0 main thread. A cached 16.x worker with a 17.5.0 main thread is untested and unsupported.
    • Apps pin rxdb and rxdb-premium to exactly 17.5.0.
    • RxDB 17 defaults a replication's toggleOnDocumentVisible to true (16.21.1: false). It then resyncs when the tab becomes visible, and no longer simulates activity to keep a hidden tab awake, so a browser may throttle a hidden tab's pull. RxDB pauses a hidden tab's replication only when that tab isn't the leader; a single-instance database is always the leader (read in 17.5.0's plugins/replication source, not tested).
  • 0e4c9cc: The "since" a cashier reads is a real time (#253). OutboxState.stuck (both outboxes) gains firstFailedAt: the wall-clock time the first failure of the current stuck run was answered, so an offline gap no longer moves it. since keeps its meaning, the clock's virtual start, and still drives the 15-minute threshold. firstFailedAt is kept in memory only. After a restart it is absent, and SyncStatus and OrdersList show the stored time instead, worded "since about 2:49 AM".

  • d6079b4: SyncStatus inserts the plugin name and times literally (a $&, $1 or $$ in them is kept as written), and with only till updates waiting shows the register outbox's sending and retrying text and countdown. It shows no raw reason code: a stuck order now shows the "Sales haven't reached the online store since {time}." sentence (for till updates alone, "Till updates haven't …"), store missing or not. Sending and retrying are a short line of their own below the status line: "Sending…" or "Retrying in {n} s.". The status line and each pull-notice line are polite live regions (aria-live="polite" on web, accessibilityLiveRegion on Android) and on iOS are announced when their text changes, both in one announcement when they change together. What is announced is only the substance (counts, the sentence, the notice): the sending or retrying line is outside any live region, so it is never announced. OrdersList shows no reason code either: a stuck order reads "Hasn't reached the online store since {time}." with the hour numeric, and a rejected order shows the store's message alone (nothing when it has none), never its error code.

  • e51f1b7: Times shown to a cashier no longer force a leading zero on the hour (#252): ProductStockBadge's "as of" time and the catalogue's time label now read "2:49 AM", not "02:49 AM", on a 12-hour clock, like SyncStatus and the orders list.

  • 3cf5452: Follow-ups to the 401/403 split (#345):

    • Vendure: a signed-in user missing a permission (confirmed by the session probe) is now ConnectorUnauthorizedError with status: 403, the forbidden notice, instead of a plain transient error.
    • WooCommerce: a 403 from the JWT-auth plugin (jwt_auth_*) reaches the till only with a valid token on WCPOS 1.10.0–1.10.7 (wcpos/woocommerce-pos#1863). It is now WooPluginUpdateRequiredError (unsupported_store, WCPOS 1.10.8): the store owner updates WCPOS, and the till is never sent into a sign-in loop.
    • ConnectorUnauthorizedError: only a 403 is forbidden. A caller that omits status gets unauthorized, as before 3.0.
    • Docs: the customer picker's onError, the replication guide's error classes, and the connector comments now say that only a 401 means sign in again.
  • 6278d8d: The register outbox can start when its store opens, as the order outbox does (#290). The new useRegisterOutbox({ commands, transport, deviceId, isEnabled?, onResult?, backendNotFound? }) runs createRegisterOutbox over an already-open register_commands collection, and calls start() so that till updates left pending (after a refused batch, for instance) go out when the app reopens. It returns { state, flush }. A new collection or device id restarts the outbox, and commands: null leaves it idle. Apps that create the register outbox themselves should switch to this hook. SyncStatus's till-updates refusal line now ends "…with the next till update, or when the app is reopened.", matching the sales line.

  • cbf26fd: The WooCommerce connector sends WCPOS's protocol signal, so a WCPOS 2.0 store does not refuse it (#296). Every request carries X-WCPOS-Protocol: 2 and X-WCPOS-Client: tallyui/<connector version>. WCPOS's 2.0 gate refuses POS-marked wcpos/v2 requests without protocol 2, and protocol 2 is a pure declaration the connector already conforms to. The headers are harmless on WCPOS 1.x.

    If a store still answers 426 (wcpos_update_required), the new WooTillUpdateRequiredError (till_update_required, fixed by the till) stops the product pull after one request. SyncStatus then tells the cashier: "Products aren't updating: this till needs updating."

@tallyui/storage-sqlite

Major Changes

  • 6673faf: RxDB 17.5.0.

    • @tallyui/storage-sqlite:
      • Its rxdb-premium peer is now 17.5.0. Apps install rxdb-premium@17.5.0 together with rxdb@17.5.0.
      • Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
    • @tallyui/pos:
      • Its rxdb peer is now ~17.5.0.
      • Opening pos_orders rejects with PosOrderOpenClosedError when the database closes during a migration: RxDB 17.5.0 cancels the migration on close. The open first waits for any write already in flight, so none reaches a closed store.
      • An open that needs no migration resolves only once RxDB allows writes, so a sale saved straight after it is never refused with COL25.
    • @tallyui/database:
      • createTallyDatabase returns an RxDB 17 database.
      • In development it adds RxDB's dev-mode plugin when a database is created, not at import.
    • Stored data: a till's SQLite data written by RxDB 16.21.1 opens unchanged under 17.5.0, and migrates its schema versions.

    Upgrade notes

    • Storage is one-way. Once a till has opened this version, pos_orders is at schema version 4, and an older build (such as @tallyui/pos 2.0.0 on RxDB 16.21.1) opens it without an error but shows no orders, so it sends none of the pending ones until the till is upgraded again. Nothing is deleted: the next upgrade recovers every order, including a sale rung during the rollback. Never roll an app back across this version, and never re-ring sales it hides: a re-rung sale is a second sale, and the upgrade sends both. See ADR-069 in docs/DECISIONS.md.
    • Web apps ship the 17.5.0 storage worker with the 17.5.0 main thread. A cached 16.x worker with a 17.5.0 main thread is untested and unsupported.
    • Apps pin rxdb and rxdb-premium to exactly 17.5.0.
    • RxDB 17 defaults a replication's toggleOnDocumentVisible to true (16.21.1: false). It then resyncs when the tab becomes visible, and no longer simulates activity to keep a hidden tab awake, so a browser may throttle a hidden tab's pull. RxDB pauses a hidden tab's replication only when that tab isn't the leader; a single-instance database is always the leader (read in 17.5.0's plugins/replication source, not tested).

Minor Changes

  • 3332558: Tell the three start failures apart (#293), each with its own sentence for the cashier. Storage unavailable, as in a Safari private window where the browser gives the worker no usable OPFS, is the new StorageUnavailableError, recognised with isStorageUnavailableError. Another tab holding the database is recognised with the new isStorageHeldError. A stale worker stays isRxdbRemoteVersionMismatch from @tallyui/core (RM1). isStorageWorkerStartError still means any failed start except storage unavailable, and every start error carries its cause's name and message in its own message.

Patch Changes

  • 1f4d0ab: isStorageWorkerStartError and isStorageWorkerFailure also recognise RxDB's RM1, a stale storage worker built on another RxDB version (for example a cached old worker after an upgrade), so apps show their reload advice for it. Both call the new isRxdbRemoteVersionMismatch in @tallyui/core, which recognises RM1 by structure only: an RxError's own code, or the remote storage's could not create instance wrapping of an RxError's JSON. @tallyui/storage-sqlite now has @tallyui/core as a peer dependency.
  • f96d185: Make the SQLite handle type the minimal interface used by the adapter, accepting expo-sqlite 16's SQLiteDatabase.

@tallyui/pos

Major Changes

  • 6673faf: RxDB 17.5.0.

    • @tallyui/storage-sqlite:
      • Its rxdb-premium peer is now 17.5.0. Apps install rxdb-premium@17.5.0 together with rxdb@17.5.0.
      • Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
    • @tallyui/pos:
      • Its rxdb peer is now ~17.5.0.
      • Opening pos_orders rejects with PosOrderOpenClosedError when the database closes during a migration: RxDB 17.5.0 cancels the migration on close. The open first waits for any write already in flight, so none reaches a closed store.
      • An open that needs no migration resolves only once RxDB allows writes, so a sale saved straight after it is never refused with COL25.
    • @tallyui/database:
      • createTallyDatabase returns an RxDB 17 database.
      • In development it adds RxDB's dev-mode plugin when a database is created, not at import.
    • Stored data: a till's SQLite data written by RxDB 16.21.1 opens unchanged under 17.5.0, and migrates its schema versions.

    Upgrade notes

    • Storage is one-way. Once a till has opened this version, pos_orders is at schema version 4, and an older build (such as @tallyui/pos 2.0.0 on RxDB 16.21.1) opens it without an error but shows no orders, so it sends none of the pending ones until the till is upgraded again. Nothing is deleted: the next upgrade recovers every order, including a sale rung during the rollback. Never roll an app back across this version, and never re-ring sales it hides: a re-rung sale is a second sale, and the upgrade sends both. See ADR-069 in docs/DECISIONS.md.
    • Web apps ship the 17.5.0 storage worker with the 17.5.0 main thread. A cached 16.x worker with a 17.5.0 main thread is untested and unsupported.
    • Apps pin rxdb and rxdb-premium to exactly 17.5.0.
    • RxDB 17 defaults a replication's toggleOnDocumentVisible to true (16.21.1: false). It then resyncs when the tab becomes visible, and no longer simulates activity to keep a hidden tab awake, so a browser may throttle a hidden tab's pull. RxDB pauses a hidden tab's replication only when that tab isn't the leader; a single-instance database is always the leader (read in 17.5.0's plugins/replication source, not tested).

Minor Changes

  • 78d324e: Add useSale.setCustomer and ReceiptData.header.customer, customerTraits, CustomerPicker, generic CustomerSelect/CustomerCard with traits overrides, CustomerForm.showAddress, and the receipt's customer line.

    CustomerSelect rows are now pressable, so choosing a result works on the web (it previously did nothing).

  • 901fa66: Add order.create envelope version 3, its display and tax-rate wire types, and the payload's sessionId and customer reference.

    At capability 3, finalizeOrder copies the receipt's display and taxByRate into the sale. Version 3 sends those figures and the sale's session (stamped or late) as sessionId. Older orders keep their existing envelope version.

    Move pos_orders to schema version 3 with a sessionId index and the optional sentVersion and downgradedFrom fields (declared for the outbox's version fallback, not yet written). Apps must open pos_orders with addPosOrderCollection, which migrates it.

  • bf2d805: order.create version 4 (#286): every discountMinor, the order's and each line's, is tax-exclusive, so their sum still holds. Core accepts version 4 with version 3's fields. The till's envelope builder (toOrderCreateEnvelope) produces version 4 when capped at 4 or more and the order's sentVersion doesn't hold it lower. The till doesn't send version 4 yet: the outbox doesn't pass the server's max, so it still sends version 3 or lower with the same figures, byte-identical.

  • 130d28e: A store that keeps answering 404 is no longer silent. After 3 consecutive 404 answers the order and register outboxes set OutboxState.backendMissing: { since } (when the first of them arrived), and SyncStatus tells the cashier in plain words that sales aren't reaching the online store and are saved on the till, with a detail line for the store owner, instead of showing retrying (status_404); the stuck line shows the same words, with no raw code. SyncStatus takes an optional pluginName (default 'the POS plugin') for that detail. The outboxes keep retrying on their normal backoff, and orders stay pending, so a 404 during a deploy blip recovers on its own. The next answer that isn't a 404 clears it; an offline (network) retry changes nothing. Pass one createBackendNotFound() tracker as backendNotFound to both createOrderOutbox and createRegisterOutbox so their 404s count together and the notice shows once, whichever outbox meets it first; without it, each outbox keeps its own.

  • 9e1032f: One order the store keeps failing no longer stops every later sale. After 5 server-answered failures (offline never counts) the order outbox probes the pending queue one order per backoff interval, oldest first; once the store takes one, the orders whose probes failed are isolated and retried alone, and batching resumes. If no probe gets through, the store is down: nothing is isolated. Retries alternate between the batch (or the probe) and one due isolated order, one request per interval, so neither can starve the other, and isolated orders take turns. An order the store has kept failing for 15 minutes of answered time, on its own clock, is flagged as stuck and stays pending: OutboxState.stuck, with a per-order entry in stuck.orders, useOrderOutbox's stuckCommandIds, needsAttention's stuckCommandIds option, OrdersList's stuck prop (each order with its own time and reason), and SyncStatus's "Not syncing" line. An offline failure pauses every clock, and the store's next answer of any kind resumes them all; a flagged order stays flagged through an offline spell, since a paused clock keeps its answered time. The HTTP transport now reports a request that got no answer in time as timeout, which counts like a 503 and never pauses a clock, and keeps network for a store it could not reach.

  • ca0beac: Fall back to the server's supported order.create version while preserving stored fiscal figures and command IDs. Record the sent version and downgrade in the order audit, and expose command error details.

  • a9cdfc0: Migrate pos_orders to version 4 with optional localWarnings and serverFailures. Record omitted customer details and dropped payment references on the stored order, and show these warnings in the orders list; serverFailures is declared for the next outbox update.

  • 9ffa7c0: The till sends order.create version 4 (#286) to a server that advertises 4. Each order is resent at the version it first went out at: the outbox records sentVersion before an order's first send, so a retry after the store upgrades is byte-identical. With the server's max unknown, the till sends at most 3 and records that. requeue() clears sentVersion and downgradedFrom, since the new commandId chooses afresh.

    pos_orders moves to schema version 5: sentVersion and downgradedFrom accept 1 to 4, and the migration records each order without a sentVersion at its content version (3 with display and taxByRate, else 2 when discounted, else 1). Like version 4, this storage is one-way: an older build opens it but shows no orders (ADR-069).

  • 6bbd1ba: Each sale records the tax rounding its figures were computed with (#287): finalizeOrder writes taxRounding on the stored order, the default (per_order, half_away_from_zero) included, and custom as { granularity: 'custom' }. It is the till's own record and is never sent in order.create. The Z report splits each sale's tax by rate with the strategy that sale recorded, so its rows are the receipts' rows, and its breakdowns.tax_rounding_mixed is true when a session's sales used more than one strategy (a custom sale counts as the default it applied); ClosureSheet then says so, and buildClosureDocument carries the same line ready to print as closure.tax_rounding_note (TAX_ROUNDING_MIXED_NOTE), for the apps' closure templates. PosOrder.taxRounding is now required in the type.

    pos_orders moves to schema version 6: taxRounding is required, and the migration records the default on every older sale, the only rounding any earlier build used. Like version 5, this storage is one-way: an older build opens it but shows no orders, so never roll an app back across it (ADR-069). Before 3.0.0 ships, #242's OPFS upgrade proof is rerun against version 6.

  • 222543b: Add RegisterCommandType, RegisterCommandEnvelope and AnyCommandEnvelope, register payloads and results, and the register server capability. CommandType and CommandEnvelope are unchanged.

    Record the local register_commands ledger through reconcileRegisterCommands, gated in useRegisterSession by its new commands and capabilities options. Commands are recorded but not sent. Medusa reads the register contract.

  • 8141c1c: Guard register commands, movement reasons and register ids, exporting RegisterMovementReasonError and RegisterIdInvalidError. Harden register outbox result handling and batch limits.

    Make CommandBatchRequest generic while preserving its existing default envelope type.

  • c9798a3: The register outbox now sets OutboxState.stuck when the store has kept failing a sent register command for 15 minutes of answered time (STUCK_AFTER_MS, shared with the order outbox; offline gaps pause the clock), so the app can say since when till updates haven't reached the online store. The clock clears when the command is applied or rejected. It is kept in memory only: a restart starts it afresh.

  • 581472f: Add createRegisterOutbox to send stored register commands serially per register. The app starts it only for a store with the register capability.

  • c26ead6: A till no longer sells on a guessed tax rounding. When the store's capabilities read fails (it throws, or answers "unknown", as Vendure's does for a network error or a 5xx), useStoreSettings keeps the settings unresolved instead of falling back to the default rounding. It retries by itself after 5 seconds, then 10, doubling to at most 5 minutes. While it waits, the state is error with a nextRetryAt, and an app shows "Can't reach the store's settings yet. Retrying…". Only a store that reports no rounding, or a connector without capabilities, gets the default. Before this, a failed read on a Vendure store set to per_rate_group_items meant every sale raised figures_mismatch.

  • 0e4c9cc: The "since" a cashier reads is a real time (#253). OutboxState.stuck (both outboxes) gains firstFailedAt: the wall-clock time the first failure of the current stuck run was answered, so an offline gap no longer moves it. since keeps its meaning, the clock's virtual start, and still drives the 15-minute threshold. firstFailedAt is kept in memory only. After a restart it is absent, and SyncStatus and OrdersList show the stored time instead, worded "since about 2:49 AM".

  • a94b255: OutboxState gains rejected?: number: the order outbox publishes the count of pos_orders the store refused (syncStatus: 'rejected') wherever it publishes pending, so it rises when a batch result rejects an order and falls when requeue() sends one again. The register outbox leaves it unset. While rejected is above 0, SyncStatus never says "Sales are up to date.": its whole status line (label, polite live region and iOS announcement) is "1 sale needs attention · The online store refused it. Ask the store owner to look at the till's sync log." or "{n} sales need attention · The online store refused them. Ask the store owner to look at the till's sync log.", in place of the stuck and backend-missing sentences and the sending or retrying line. What else waits stays in the count: "1 sale needs attention, 5 waiting to sync · …" with other sales pending, "…, 2 till updates waiting to sync · …" with till updates, and "…, 5 sales and 2 till updates waiting to sync · …" with both. Below it, "Refused sales stay on this till under Needs attention, each with what to do next.", then the backend-missing detail when the store is missing. With rejected 0 or unset, nothing changes. When the store refused a whole batch (refused set, no sale carrying a code), the status line is the waiting count followed by " · The online store refused the last send. This till will try again with the next sale, or when the app is reopened." in place of the stuck or backend-missing sentence, and the sending or retrying line (which read "Retrying in 0 s.") is hidden; refused sales still outrank it. With only till updates waiting and the register outbox refused, it ends "…try again with the next till update." instead; with a sale waiting, the sales line wins.

  • 5ed6281: The till computes tax with the store's rounding strategy (#287, ADR-071). ServerCapabilities gains taxRounding (core exports TaxRounding): per_order, per_line_items or per_rate_group_items, each with half_away_from_zero or half_up, or custom. Absent, and custom, mean today's per_order with half away from zero. TaxProvider takes rounding and rateCodes (tax class → the backend's rate name, for per_rate_group_items); the order records the strategy as taxRounding, and taxLinesByRate takes it as a fourth argument. The algorithms are in docs/contract/field-kinds.md.

  • 5a204a9: StoreSettings gains a derived taxRounding. useStoreSettings fills it from the context's capabilities, or else from one read of the connector's capabilities() made before the settings are ready, so each sign-in emits the settings once with the rounding known and no later change holds a sale; a failed read or a connector without capabilities gives the default rounding. taxProviderProps passes it to TaxProvider as rounding, so the till rounds tax like the store with no app code (#324). custom passes no rounding, and an explicit rounding prop still wins.

  • 6278d8d: The register outbox can start when its store opens, as the order outbox does (#290). The new useRegisterOutbox({ commands, transport, deviceId, isEnabled?, onResult?, backendNotFound? }) runs createRegisterOutbox over an already-open register_commands collection, and calls start() so that till updates left pending (after a refused batch, for instance) go out when the app reopens. It returns { state, flush }. A new collection or device id restarts the outbox, and commands: null leaves it idle. Apps that create the register outbox themselves should switch to this hook. SyncStatus's till-updates refusal line now ends "…with the next till update, or when the app is reopened.", matching the sales line.

  • e15f389: The Vendure connector supplies its tax rate names, so a per_rate_group_items store groups a sale's tax the way Vendure does (#324). Apps no longer fetch the names themselves.

    • StoreSettings.taxRateCodes (core, optional): the backend's tax rate name per tax class, keyed like taxRatesPpm, including default.
    • vendureStoreSettings reads each rate's name in the tax-rate query it already runs, so no extra request is made. Only the rates taxRatesPpm uses count, and default follows the same default-category rule. taxRateCodes is left out when no names come back.
    • taxProviderProps(settings) passes taxRateCodes to <TaxProvider> as rateCodes.

Patch Changes

  • d6a5073: The outbox freezes an order an older till stored before it first sends it (freezeSentForm, which finalizeOrder uses too):

    • line names, discount labels and payment references are cut to 255 characters, but ids never are;
    • a customer email or id that order.create would refuse is left out;
    • the frozen form is written back, so the receipt and the store see the same bytes.

    So an order stored before the upgrade and still unsent is never refused as invalid_payload.

    New type: SentOrder, an Order whose customer id may be missing. The receipt stage, buildReceiptData and Receipt take it, and a plain Order still fits.

  • 27d736e: CommandWarning gains bridgeMinor on total_mismatch and a new tax_rate_mismatch code, and the till now ignores warning codes it doesn't know (knownWarnings), instead of showing them as a store total.

  • e59ebec: Each line is taxed at its product's tax class, not the store's default (#288). ProductTraits gains an optional getTaxClass(doc, variantId?), the backend's tax class id, a key of StoreSettings.taxRatesPpm. addProduct and addEntryToCart pass it to addLine through the new AddLineInput.taxClass, which the tax context resolves; a connector without the accessor is unchanged (the default rate). TaxProvider taxes a class with no rate at the default rate and warns once per class through the new taxLogger. connector-vendure replicates each variant's taxCategory { id } and implements the accessor, and its store settings give every tax category with no enabled rate in the default zone an explicit 0 rate, as Vendure charges; its product schema goes to version 2, so the products collection is dropped and downloaded again on the first sync after the upgrade.

  • eb203b4: Review follow-ups with no behaviour change (#356, #358):

    • SyncStatus and OrdersList build their "since {time}" and "since about {time}" text with one shared helper.
    • useRegisterOutbox's docs now say when transport() is called, and that the latest isEnabled and onResult are used without restarting the outbox.
  • 8cd7860: A sale the store refuses on its first send is sent once, not twice (found by the Medusa POS app's 3.0.0-next.0 adoption). Before it sends, the outbox stores the order's sent form and version (#300). That write had re-armed the flush, so a refused batch went out again. A write that only records the sent form, for a new sale or for an older one carried over by the pos_orders migrations, is no longer counted as new work. Any other change to a pending sale still sends it.

  • af623c9: The order.create string lengths move from payloadShapeErrors to the new payloadBoundErrors, which precheckCommand calls after the replay lookup, so an applied order resent with a long title replays as duplicate; payloadShapeErrors keeps the types, the customerId and sessionId bounds and the NUL check. useSale applies a tender before logging a dropped reference, and add() refuses a product whose id or v3 tax code finalize would refuse; the tender's reference field caps at 255 characters. finalizeOrder now freezes the sent form (names and discount labels cut, an unsendable customer email or id left out) and toOrderCreateEnvelope sends the stored order unchanged, so every resend is byte-identical.

  • ef2f64e: The shared order.create shape check bounds string lengths and refuses NUL, and so does the v3 fiscal-figures check for its display and tax-code strings. The till cuts long names when it stores the order, refuses over-long pass-through references at finalize (and a payment reference as it's entered), refuses a searched or parked customer whose email or id the server would refuse, and validates the customer email at entry. Tills should ship this clamp before plugins adopt the new bounds, so no till sends a sale the server would now refuse.

  • d225c58: Internal @tallyui/* peer dependencies are published as a caret range (for example ^2.1.0) instead of an exact version. The packages still release together at one version.

  • d329193: The order outbox stores each pending order's stuck clock and isolation in serverFailures and restores them when it starts, so after a restart an order the store keeps refusing no longer holds up the other sales, and its stuck flag keeps its start time.

  • c00e1ea: OrdersList shows a rejected sale's refusal in the cashier's words, one sentence per error code (#269), in both Needs attention and Recent, and never the store's own message. An unknown code, or a rejected sale with no error, shows platform_error's sentence: "The online store refused this sale. Ask the store owner to look at the till's sync log." An idempotency_mismatch shows its sentence ("… Don't send it again; ask the store owner to compare the two.") in place of the old "This sale needs checking against the store before it can be sent again." line, and still has no Retry. The order outbox logs every refusal once to the sync log as "Order refused by the store" with the order id, the code and the store's message: a warning, or an error for unsupported_version (whose log previously used the message itself as its text).

  • 8ae3c53: A register session transition's ledger key now includes its status (session.transition:<sessionId>:<status>:<at>), so a close in the same millisecond as the count before it is queued with its counted, closedBy and approvedBy instead of being skipped (#258).

  • 9885075: Match variant barcodes and SKUs in product search, and skip disabled Vendure variants when reading the product barcode.

  • c48e1dd: Store settings follow-ups to #339 and #341 (#340):

    • A signed-out till is asked to sign in, not shown "Retrying…". When the capabilities read fails with an error only the till can fix, useStoreSettings gives error without nextRetryAt and doesn't retry by itself, so the app prompts. That covers a till-class error (a 401, or a till that needs updating) and a SignInError with code: 'invalid_credentials'; any other sign-in error still waits and retries. Every other failure still waits and retries.
    • A /tally/v1/info JSON body that isn't an object (null, an array or a scalar) is unknown, not the default rounding.
  • df80ead: SyncStatus takes an optional registerState (the register outbox's state): waiting till updates are counted ("1 till update waiting to sync", or named beside the sales), so it never says the sales are up to date while any wait, and with no sale waiting the backend-missing sentence says till updates aren't reaching the online store, or, once registerState.stuck is set, "Till updates haven't reached the online store since {time}. …". The backend-missing detail now reads "This till couldn't find {pluginName} on the online store. …". With nothing waiting, the line is only "Sales are up to date." (it replaces "All sales synced"), with no sending, retrying or problem text after it; if the store is missing, the detail reads "This till couldn't find {pluginName} on the online store the last time it checked. …". The status line's accessibility label is the whole visible line instead of "Sync status". The order and register outboxes let go of a shared backendNotFound tracker on stop() and take it up again on start() or flush().

  • 37aad35: useSale never drops a line tapped while new store settings land (#301). The new sale that new tax settings or currency start on an idle cart now begins in a layout effect, inside the commit that brings those settings, and only when the sale is idle at that moment (no line, cart stage, no save in flight or pending), not as of the last render. Every sale change reads the current order builder, so a call from an older render never reaches a builder that newSale() has replaced. A line tapped once the new settings have committed lands on the new sale, priced with the new settings; a line that reaches the sale before its new sale starts keeps that sale, on its old settings.

  • 4122dc8: order.create v3 omits a malformed session ID (empty or longer than 36 characters) instead of sending it, so the plugin never refuses the sale for it. At capability 3, finalizeOrder refuses a sale whose display lines don't join the order's lines by id and count, or whose display tax mode differs from the order's.

@tallyui/connector-woocommerce

Minor Changes

  • 457162d: One reconcile feed per store session (#307, a release gate). The WooCommerce and Medusa reconcile feeds were module-level singletons, so after a store switch in one runtime, store A's queued tombstones and refetches could reach store B's database.

    • New factories. createWooCommerceConnector(), createMedusaConnector() and createMedusaAdminUserConnector() each build their own feed; createVendureConnector(options) already did. Build a connector per store session, anew on each sign-in or store change.
    • Deprecated exports. woocommerceConnector, medusaConnector, medusaAdminUserConnector and vendureConnector are deprecated: one instance for the whole app can leak queued reconcile work across stores. They are removed in 4.0.
    • A development warning. startReplication warns once when the same adapter object replicates into two collections at once.
    • Refetch budget by requests. refetchBatchSize on the reconcile adapters makes a page that enqueues n refetches take ceil(n / refetchBatchSize) request-budget slots (WooCommerce 100, Medusa 100, Vendure 1,000).
    • WooCommerce 426 errors. A foreign (non-WCPOS) 426 keeps the store's code beside its message, and the message is capped at 200 characters.
  • ce4f796: Replication pull errors are handled according to who can fix them, instead of every error being retried every 5 s forever. A till repeating a rejected token is the traffic a store's security plugin blocks.

    • @tallyui/core:
      • An error class declares fixedBy: 'till' | 'store' with a string code; errorKind(error) returns 'till', 'store' or 'transient'.
      • SyncNotice ({ code, since, fixedBy, software?, minVersion?, fix? }) describes a stopped pull.
      • ConnectorUnauthorizedError is fixed by the till.
    • @tallyui/database startReplication handles the three kinds and returns RxDB's state plus notice$ and resume():
      • till: one request, one notice, then the pull stays stopped until the app calls resume(), after sign-in. The pull stays stopped even when RxDB restarts the loop on page visibility.
      • store: one notice, then one attempt every 5 minutes (or the error's retryAfterMs, up to 1 hour). The notice clears itself on the first success, so a till recovers within 5 minutes of the owner's fix.
      • transient: a doubling delay from retryTime to 5 minutes. It waits at least a valid retryAfterMs (a finite number of zero or more), capped at 1 hour.
    • @tallyui/components: SyncStatus takes an optional pullNotice and tells the cashier in plain words that they can keep selling and who needs to act. It never shows a code, a backend name or a version the notice doesn't carry.
    • @tallyui/connector-woocommerce:
      • WooDateFilterError is fixed by the store, and carries software and minVersion.
      • WooMissingUuidError gains code: 'missing_plugin' and is fixed by the store.
    • @tallyui/connector-vendure: a new VendureTimezoneConfigError (store_misconfigured, with a plain fix) replaces the plain error when the updatedAt probe shows a server that isn't in UTC.
  • ad18929: The WooCommerce connector names its auth failures, so the app can tell "sign in again" apart from "store broken": a 401 or 403 from the product pull rejects with ConnectorUnauthorizedError (re-exported from the connector, as Medusa does), and auth.getHeaders without a WCPOS token throws WooMissingTokenError, a subclass of ConnectorUnauthorizedError, instead of sending Bearer undefined. Other HTTP errors keep their message and class.

  • 136343c: The WooCommerce connector gets a daily reconciliation pass (#248, part B), a safety net for edits the incremental pull can miss: the spring-forward hour, an over-excluding filter, a same-second edit, a shift without X-WP-Total, trashed or unpublished products, and stock written without a modified-time bump.

    • reconcile.catalogue lists the published catalogue with no date filter, comparing date, stock quantity and stock status. It re-reads deletion candidates by id and removes only those that are gone, trashed or unpublished. Everything else it re-pulls through the collection's own pull.
    • replication.products now combines the product pull with the reconcile feed, with legacyKey: 'products', so existing installs keep their checkpoint.
    • A product the store cannot be asked about (no numeric id) is never deleted.
    • The WCPOS bulk-ID fast path is read from wcpos/v2/status capabilities (products_id_fast_path). It stays dormant until wcpos/woocommerce-pos#2113 ships.
    • @tallyui/database: the catalogue runner's gate check has a 60-second floor, so a bad interval can no longer re-arm it on every tick.
  • ddd9e85: The WooCommerce catalogue reconcile uses the WCPOS products fast path (#313). When wcpos/v2/status lists products_id_fast_path in capabilities, the whole catalogue is listed in one request (per_page=-1, _fields=id,date_modified_gmt,stock_quantity,stock_status) instead of pages of 100. A store that refuses it, or answers with something that is not a list, is listed page by page in the same pass.

    • Keyed on the remote id: both WooCommerce listings key on the numeric product id, never the till-local uuid.
    • CatalogueReconcileAdapter.matchKey (core, optional): an adapter whose listing carries no primary key declares how to match a local document. The catalogue runner indexes the local documents by it for each pass. Deletion is unchanged: confirmGone, then the mass-delete brake, by primary key.
    • remote on the keyed reconcile feed (core, optional): a listed product the till does not hold yet is matched back by its remote id, so it is delivered rather than dropped.
  • fb4b983: A jwt_auth_* 403 is now WooTokenRefusedError (store_misconfigured, fixedBy: 'store', with a fix), replacing WooPluginUpdateRequiredError (#360). The old error told the store owner to update to WCPOS 1.10.8, but the same 403 also arrives on 1.10.8 and later, so the new one names no version: "The store refused the sign-in token (403). Ask the store owner to check the JWT Authentication plugin's settings, or pair the till again." SyncStatus shows "a setting on the online store needs changing" with the fix. Breaking for importers: WooPluginUpdateRequiredError is no longer exported.

  • 508876e: The WooCommerce connector now requires WooCommerce 5.8 or later (for modified_after on the products route; dates_are_gmt arrived in 5.4).

    • The GMT question goes to the store. The product pull asks the store whether anything changed since the last pass, in GMT: the mark request sends modified_after=<last mark>&dates_are_gmt=true, and an empty answer ends the poll. Before, the pull compared the first row of a local-time sort, so in a daylight-saving fall-back hour an edit could wait until the next one.
    • Stores that ignore the filter are refused. If a store returns a product outside the requested window (WooCommerce before 5.8, or a proxy that drops the parameter), the pull throws the new WooDateFilterError (code: 'unsupported_store') instead of trusting it.
    • Dates carry no offset. Dates are sent as GMT digits without an offset, because WordPress parses an offset-bearing date in the site's timezone before it compares it with the GMT column.
    • The connector has a README.
  • 3b206d6: The connector now authenticates with a WCPOS bearer token and the X-WCPOS: 1 header against <site>/wp-json/wcpos/v2 (WCPOS Free 1.10.0 or later); the consumer key and secret fields are removed; a pulled product without a uuid throws WooMissingUuidError.

  • cbf26fd: The WooCommerce connector sends WCPOS's protocol signal, so a WCPOS 2.0 store does not refuse it (#296). Every request carries X-WCPOS-Protocol: 2 and X-WCPOS-Client: tallyui/<connector version>. WCPOS's 2.0 gate refuses POS-marked wcpos/v2 requests without protocol 2, and protocol 2 is a pure declaration the connector already conforms to. The headers are harmless on WCPOS 1.x.

    If a store still answers 426 (wcpos_update_required), the new WooTillUpdateRequiredError (till_update_required, fixed by the till) stops the product pull after one request. SyncStatus then tells the cashier: "Products aren't updating: this till needs updating."

Patch Changes

  • 7fee0c1: A WooCommerce product whose uuid changed in the store is replaced on the till in one pass (#331). The till delivers it under its new uuid and removes the old copy. Before this fix, it removed the old copy and dropped the new one, so the product was missing until the next daily check, and it was removed without the usual by-id check.

    • The reconcile feed: when an entry that has a local copy is fetched back under a different primary key but the same remote id, the feed delivers that document as well as removing the old copy.
    • combinePullAdapters takes an optional key for resolving duplicates across its sub-adapters. It defaults to doc.id, as before. WooCommerce passes the uuid (its primary key): two documents that share a store id, such as a product's new copy and its old copy's removal, must both reach the collection.
  • d225c58: Internal @tallyui/* peer dependencies are published as a caret range (for example ^2.1.0) instead of an exact version. The packages still release together at one version.

  • 1223353: A stale duplicate copy of a store product no longer stays on the till for good (#369). When two local products share one store id, the catalogue check now makes the copy its index did not pick a deletion candidate, and logs a duplicate event with the code duplicate_match_key. The copy is tombstoned only when confirmGone proves the store doesn't back it, and the mass-delete brake still applies. WooCommerce's confirmGone now also confirms a local whose id is live but whose uuid isn't the store's for that id. The store listing is the source of truth, and a later pull restores anything the store still backs.

  • 6673faf: RxDB 17.5.0.

    • @tallyui/storage-sqlite:
      • Its rxdb-premium peer is now 17.5.0. Apps install rxdb-premium@17.5.0 together with rxdb@17.5.0.
      • Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
    • @tallyui/pos:
      • Its rxdb peer is now ~17.5.0.
      • Opening pos_orders rejects with PosOrderOpenClosedError when the database closes during a migration: RxDB 17.5.0 cancels the migration on close. The open first waits for any write already in flight, so none reaches a closed store.
      • An open that needs no migration resolves only once RxDB allows writes, so a sale saved straight after it is never refused with COL25.
    • @tallyui/database:
      • createTallyDatabase returns an RxDB 17 database.
      • In development it adds RxDB's dev-mode plugin when a database is created, not at import.
    • Stored data: a till's SQLite data written by RxDB 16.21.1 opens unchanged under 17.5.0, and migrates its schema versions.

    Upgrade notes

    • Storage is one-way. Once a till has opened this version, pos_orders is at schema version 4, and an older build (such as @tallyui/pos 2.0.0 on RxDB 16.21.1) opens it without an error but shows no orders, so it sends none of the pending ones until the till is upgraded again. Nothing is deleted: the next upgrade recovers every order, including a sale rung during the rollback. Never roll an app back across this version, and never re-ring sales it hides: a re-rung sale is a second sale, and the upgrade sends both. See ADR-069 in docs/DECISIONS.md.
    • Web apps ship the 17.5.0 storage worker with the 17.5.0 main thread. A cached 16.x worker with a 17.5.0 main thread is untested and unsupported.
    • Apps pin rxdb and rxdb-premium to exactly 17.5.0.
    • RxDB 17 defaults a replication's toggleOnDocumentVisible to true (16.21.1: false). It then resyncs when the tab becomes visible, and no longer simulates activity to keep a hidden tab awake, so a browser may throttle a hidden tab's pull. RxDB pauses a hidden tab's replication only when that tab isn't the leader; a single-instance database is always the leader (read in 17.5.0's plugins/replication source, not tested).
  • 3cf5452: Follow-ups to the 401/403 split (#345):

    • Vendure: a signed-in user missing a permission (confirmed by the session probe) is now ConnectorUnauthorizedError with status: 403, the forbidden notice, instead of a plain transient error.
    • WooCommerce: a 403 from the JWT-auth plugin (jwt_auth_*) reaches the till only with a valid token on WCPOS 1.10.0–1.10.7 (wcpos/woocommerce-pos#1863). It is now WooPluginUpdateRequiredError (unsupported_store, WCPOS 1.10.8): the store owner updates WCPOS, and the till is never sent into a sign-in loop.
    • ConnectorUnauthorizedError: only a 403 is forbidden. A caller that omits status gets unauthorized, as before 3.0.
    • Docs: the customer picker's onError, the replication guide's error classes, and the connector comments now say that only a 401 means sign in again.
  • 8cf3ea4: A till tells "sign in again" apart from "signed in, but not allowed" (found by the Medusa POS app's adoption).

    • ConnectorUnauthorizedError.status is now required, typed 401 | 403, and set by meaning at every connector.
      • 401: the credentials are not accepted, so sign in again. code: 'unauthorized', fixed by the till.
      • 403: the till is signed in but not allowed. code: 'forbidden', fixed by the store.
      • Vendure answers a signed-out session with 403 too. Its connector checks who is signed in first, so a confirmed sign-out is always 401.
    • A 403 on the pull gives the forbidden notice, never a sign-out. The pull retries on the store schedule and clears by itself once the store owner grants the permission. SyncStatus shows "Products aren't updating: your account isn't allowed to do this on this store." with "You can keep selling. Ask the store owner."
    • The customer picker shows "Your account isn't allowed to do this on this store. Ask the store owner." for a 403, instead of asking the cashier to sign in again.
  • d9ecbb8: Only WCPOS's own protocol gate counts as "this till needs updating" (#302):

    • The plugin's gate: a 426 whose body carries code: "wcpos_update_required" still raises WooTillUpdateRequiredError.
    • Any other 426 (from a proxy or another plugin, or with no or another body) is now a transient error, retried with backoff, so it never tells a cashier to update the till.

    The built connector now bundles only its version from package.json, not the whole file.

  • 154e552: The product pull sends dates_are_gmt=true with every modified_after, so WooCommerce compares the GMT checkpoint against post_modified_gmt instead of the store's local time; on a store west of UTC the next pull no longer skips edits made in between.

  • 87087f1: When the catalogue check's fast path fails, or answers with something that is not a list, the page-by-page fallback now starts with an empty page (#331). Its first request then takes its own request-budget slot, as the status read does, instead of sharing the failed fast-path request's slot. A pass that falls back reports one more page.

  • e0f0afb: The WooCommerce product pull makes one request per quiet poll in two more cases: after the most recently edited product is trashed (the store's newest product is then older than the pull's lower bound; it was 3 requests), and on a store with no products (it was 4). The stored restarts counter is gone: every shrink of the window restarts the pass, bounded by the per-call request budget. A stored checkpoint that still carries restarts keeps working.

  • a0256e1: The product pull no longer skips products that share a date_modified_gmt second across a page boundary. It pulls in passes, like the Medusa connector: each pass fixes an inclusive lower bound (modified_after one second earlier), pages that window by product id with an offset, restarts if X-WP-Total drops between pages (after three restarts, a fresh pass starts in the same call), ends on a short or empty page when a proxy strips X-WP-Total, and moves the lower bound to the newest date_modified_gmt in the store when the pass began. Because RxDB does not store the checkpoint of a pull that returns no documents, the handler never carries state in an empty result: a pass that ends on an empty page chains into the next pass in the same call, and each call makes at most four requests. When nothing has changed since the last pass, the pull makes one small request and returns nothing. WooProductCheckpoint is now { modified, offset, pass_mark?, pass_count?, restarts? }; a stored { id, modified } checkpoint is read as the start of a pass.

  • b8aba84: The product pull marks every product whose status is not publish (draft, pending, private, or none) as _deleted, so RxDB removes it from the POS catalogue, and a product that is published again comes back. The pull still reads every status through the modified-date cursor and sends no status parameter, so a product that goes from published to draft is seen and removed rather than left on the till.

@tallyui/connector-medusa

Minor Changes

  • faa7cda: Expose ConnectorUnauthorizedError for expired or rejected stored credentials in Vendure and Medusa requests.

  • 0d04d13: Add neutral Customer, CustomerInput and CustomerServiceError exports and optional online-only customer search, create and get connector methods.

    Implement customer search, create and get for Medusa's admin-user connector.

  • 457162d: One reconcile feed per store session (#307, a release gate). The WooCommerce and Medusa reconcile feeds were module-level singletons, so after a store switch in one runtime, store A's queued tombstones and refetches could reach store B's database.

    • New factories. createWooCommerceConnector(), createMedusaConnector() and createMedusaAdminUserConnector() each build their own feed; createVendureConnector(options) already did. Build a connector per store session, anew on each sign-in or store change.
    • Deprecated exports. woocommerceConnector, medusaConnector, medusaAdminUserConnector and vendureConnector are deprecated: one instance for the whole app can leak queued reconcile work across stores. They are removed in 4.0.
    • A development warning. startReplication warns once when the same adapter object replicates into two collections at once.
    • Refetch budget by requests. refetchBatchSize on the reconcile adapters makes a page that enqueues n refetches take ceil(n / refetchBatchSize) request-budget slots (WooCommerce 100, Medusa 100, Vendure 1,000).
    • WooCommerce 426 errors. A foreign (non-WCPOS) 426 keeps the store's code beside its message, and the message is capped at 200 characters.
  • 7d1bc98: Add parseTaxRounding and parseInfoCapabilities, which read /tally/v1/info including its top-level taxRounding (#287). The Medusa connector's capability read now carries the store's taxRounding.

Patch Changes

  • eb5a032: A /tally/v1/info answer that says nothing about the store no longer means the default tax rounding (a follow-up to #339).

    • Unknown: a 2xx that is not JSON, and a taxRounding value that is present but malformed, now read as "unknown" (undefined), like a network failure or a 5xx. The till's store settings wait and retry instead of selling on a guessed rounding.
    • Unchanged: a 404 still means an older plugin (orderCreate: 1, the default rounding), and so does a well-formed body with no taxRounding key.
    • Type change: parseInfoCapabilities now returns ServerCapabilities | undefined. It is undefined when the body carries a malformed taxRounding.
  • 2ecaa36: A replication adapter can set pull.batchSize, and the Medusa connector pulls 500 products per page.

  • d225c58: Internal @tallyui/* peer dependencies are published as a caret range (for example ^2.1.0) instead of an exact version. The packages still release together at one version.

  • 222543b: Add RegisterCommandType, RegisterCommandEnvelope and AnyCommandEnvelope, register payloads and results, and the register server capability. CommandType and CommandEnvelope are unchanged.

    Record the local register_commands ledger through reconcileRegisterCommands, gated in useRegisterSession by its new commands and capabilities options. Commands are recorded but not sent. Medusa reads the register contract.

  • 6673faf: RxDB 17.5.0.

    • @tallyui/storage-sqlite:
      • Its rxdb-premium peer is now 17.5.0. Apps install rxdb-premium@17.5.0 together with rxdb@17.5.0.
      • Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
    • @tallyui/pos:
      • Its rxdb peer is now ~17.5.0.
      • Opening pos_orders rejects with PosOrderOpenClosedError when the database closes during a migration: RxDB 17.5.0 cancels the migration on close. The open first waits for any write already in flight, so none reaches a closed store.
      • An open that needs no migration resolves only once RxDB allows writes, so a sale saved straight after it is never refused with COL25.
    • @tallyui/database:
      • createTallyDatabase returns an RxDB 17 database.
      • In development it adds RxDB's dev-mode plugin when a database is created, not at import.
    • Stored data: a till's SQLite data written by RxDB 16.21.1 opens unchanged under 17.5.0, and migrates its schema versions.

    Upgrade notes

    • Storage is one-way. Once a till has opened this version, pos_orders is at schema version 4, and an older build (such as @tallyui/pos 2.0.0 on RxDB 16.21.1) opens it without an error but shows no orders, so it sends none of the pending ones until the till is upgraded again. Nothing is deleted: the next upgrade recovers every order, including a sale rung during the rollback. Never roll an app back across this version, and never re-ring sales it hides: a re-rung sale is a second sale, and the upgrade sends both. See ADR-069 in docs/DECISIONS.md.
    • Web apps ship the 17.5.0 storage worker with the 17.5.0 main thread. A cached 16.x worker with a 17.5.0 main thread is untested and unsupported.
    • Apps pin rxdb and rxdb-premium to exactly 17.5.0.
    • RxDB 17 defaults a replication's toggleOnDocumentVisible to true (16.21.1: false). It then resyncs when the tab becomes visible, and no longer simulates activity to keep a hidden tab awake, so a browser may throttle a hidden tab's pull. RxDB pauses a hidden tab's replication only when that tab isn't the leader; a single-instance database is always the leader (read in 17.5.0's plugins/replication source, not tested).
  • 8cf3ea4: A till tells "sign in again" apart from "signed in, but not allowed" (found by the Medusa POS app's adoption).

    • ConnectorUnauthorizedError.status is now required, typed 401 | 403, and set by meaning at every connector.
      • 401: the credentials are not accepted, so sign in again. code: 'unauthorized', fixed by the till.
      • 403: the till is signed in but not allowed. code: 'forbidden', fixed by the store.
      • Vendure answers a signed-out session with 403 too. Its connector checks who is signed in first, so a confirmed sign-out is always 401.
    • A 403 on the pull gives the forbidden notice, never a sign-out. The pull retries on the store schedule and clears by itself once the store owner grants the permission. SyncStatus shows "Products aren't updating: your account isn't allowed to do this on this store." with "You can keep selling. Ask the store owner."
    • The customer picker shows "Your account isn't allowed to do this on this store. Ask the store owner." for a 403, instead of asking the cashier to sign in again.

@tallyui/connector-shopify

Patch Changes

  • d225c58: Internal @tallyui/* peer dependencies are published as a caret range (for example ^2.1.0) instead of an exact version. The packages still release together at one version.

  • 6673faf: RxDB 17.5.0.

    • @tallyui/storage-sqlite:
      • Its rxdb-premium peer is now 17.5.0. Apps install rxdb-premium@17.5.0 together with rxdb@17.5.0.
      • Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
    • @tallyui/pos:
      • Its rxdb peer is now ~17.5.0.
      • Opening pos_orders rejects with PosOrderOpenClosedError when the database closes during a migration: RxDB 17.5.0 cancels the migration on close. The open first waits for any write already in flight, so none reaches a closed store.
      • An open that needs no migration resolves only once RxDB allows writes, so a sale saved straight after it is never refused with COL25.
    • @tallyui/database:
      • createTallyDatabase returns an RxDB 17 database.
      • In development it adds RxDB's dev-mode plugin when a database is created, not at import.
    • Stored data: a till's SQLite data written by RxDB 16.21.1 opens unchanged under 17.5.0, and migrates its schema versions.

    Upgrade notes

    • Storage is one-way. Once a till has opened this version, pos_orders is at schema version 4, and an older build (such as @tallyui/pos 2.0.0 on RxDB 16.21.1) opens it without an error but shows no orders, so it sends none of the pending ones until the till is upgraded again. Nothing is deleted: the next upgrade recovers every order, including a sale rung during the rollback. Never roll an app back across this version, and never re-ring sales it hides: a re-rung sale is a second sale, and the upgrade sends both. See ADR-069 in docs/DECISIONS.md.
    • Web apps ship the 17.5.0 storage worker with the 17.5.0 main thread. A cached 16.x worker with a 17.5.0 main thread is untested and unsupported.
    • Apps pin rxdb and rxdb-premium to exactly 17.5.0.
    • RxDB 17 defaults a replication's toggleOnDocumentVisible to true (16.21.1: false). It then resyncs when the tab becomes visible, and no longer simulates activity to keep a hidden tab awake, so a browser may throttle a hidden tab's pull. RxDB pauses a hidden tab's replication only when that tab isn't the leader; a single-instance database is always the leader (read in 17.5.0's plugins/replication source, not tested).

@tallyui/connector-vendure

Minor Changes

  • faa7cda: Expose ConnectorUnauthorizedError for expired or rejected stored credentials in Vendure and Medusa requests.

  • 457162d: One reconcile feed per store session (#307, a release gate). The WooCommerce and Medusa reconcile feeds were module-level singletons, so after a store switch in one runtime, store A's queued tombstones and refetches could reach store B's database.

    • New factories. createWooCommerceConnector(), createMedusaConnector() and createMedusaAdminUserConnector() each build their own feed; createVendureConnector(options) already did. Build a connector per store session, anew on each sign-in or store change.
    • Deprecated exports. woocommerceConnector, medusaConnector, medusaAdminUserConnector and vendureConnector are deprecated: one instance for the whole app can leak queued reconcile work across stores. They are removed in 4.0.
    • A development warning. startReplication warns once when the same adapter object replicates into two collections at once.
    • Refetch budget by requests. refetchBatchSize on the reconcile adapters makes a page that enqueues n refetches take ceil(n / refetchBatchSize) request-budget slots (WooCommerce 100, Medusa 100, Vendure 1,000).
    • WooCommerce 426 errors. A foreign (non-WCPOS) 426 keeps the store's code beside its message, and the message is capped at 200 characters.
  • ce4f796: Replication pull errors are handled according to who can fix them, instead of every error being retried every 5 s forever. A till repeating a rejected token is the traffic a store's security plugin blocks.

    • @tallyui/core:
      • An error class declares fixedBy: 'till' | 'store' with a string code; errorKind(error) returns 'till', 'store' or 'transient'.
      • SyncNotice ({ code, since, fixedBy, software?, minVersion?, fix? }) describes a stopped pull.
      • ConnectorUnauthorizedError is fixed by the till.
    • @tallyui/database startReplication handles the three kinds and returns RxDB's state plus notice$ and resume():
      • till: one request, one notice, then the pull stays stopped until the app calls resume(), after sign-in. The pull stays stopped even when RxDB restarts the loop on page visibility.
      • store: one notice, then one attempt every 5 minutes (or the error's retryAfterMs, up to 1 hour). The notice clears itself on the first success, so a till recovers within 5 minutes of the owner's fix.
      • transient: a doubling delay from retryTime to 5 minutes. It waits at least a valid retryAfterMs (a finite number of zero or more), capped at 1 hour.
    • @tallyui/components: SyncStatus takes an optional pullNotice and tells the cashier in plain words that they can keep selling and who needs to act. It never shows a code, a backend name or a version the notice doesn't carry.
    • @tallyui/connector-woocommerce:
      • WooDateFilterError is fixed by the store, and carries software and minVersion.
      • WooMissingUuidError gains code: 'missing_plugin' and is fixed by the store.
    • @tallyui/connector-vendure: a new VendureTimezoneConfigError (store_misconfigured, with a plain fix) replaces the plain error when the updatedAt probe shows a server that isn't in UTC.
  • 7d1bc98: Read the store's capabilities and taxRounding from the Vendure plugin's /tally/v1/info (#287): vendureSignIn returns capabilities, and the connector gains capabilities(context) for a restored session or an API key.

  • e15f389: The Vendure connector supplies its tax rate names, so a per_rate_group_items store groups a sale's tax the way Vendure does (#324). Apps no longer fetch the names themselves.

    • StoreSettings.taxRateCodes (core, optional): the backend's tax rate name per tax class, keyed like taxRatesPpm, including default.
    • vendureStoreSettings reads each rate's name in the tax-rate query it already runs, so no extra request is made. Only the rates taxRatesPpm uses count, and default follows the same default-category rule. taxRateCodes is left out when no names come back.
    • taxProviderProps(settings) passes taxRateCodes to <TaxProvider> as rateCodes.

Patch Changes

  • eb5a032: A /tally/v1/info answer that says nothing about the store no longer means the default tax rounding (a follow-up to #339).

    • Unknown: a 2xx that is not JSON, and a taxRounding value that is present but malformed, now read as "unknown" (undefined), like a network failure or a 5xx. The till's store settings wait and retry instead of selling on a guessed rounding.
    • Unchanged: a 404 still means an older plugin (orderCreate: 1, the default rounding), and so does a well-formed body with no taxRounding key.
    • Type change: parseInfoCapabilities now returns ServerCapabilities | undefined. It is undefined when the body carries a malformed taxRounding.
  • e59ebec: Each line is taxed at its product's tax class, not the store's default (#288). ProductTraits gains an optional getTaxClass(doc, variantId?), the backend's tax class id, a key of StoreSettings.taxRatesPpm. addProduct and addEntryToCart pass it to addLine through the new AddLineInput.taxClass, which the tax context resolves; a connector without the accessor is unchanged (the default rate). TaxProvider taxes a class with no rate at the default rate and warns once per class through the new taxLogger. connector-vendure replicates each variant's taxCategory { id } and implements the accessor, and its store settings give every tax category with no enabled rate in the default zone an explicit 0 rate, as Vendure charges; its product schema goes to version 2, so the products collection is dropped and downloaded again on the first sync after the upgrade.

  • d225c58: Internal @tallyui/* peer dependencies are published as a caret range (for example ^2.1.0) instead of an exact version. The packages still release together at one version.

  • 6673faf: RxDB 17.5.0.

    • @tallyui/storage-sqlite:
      • Its rxdb-premium peer is now 17.5.0. Apps install rxdb-premium@17.5.0 together with rxdb@17.5.0.
      • Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
    • @tallyui/pos:
      • Its rxdb peer is now ~17.5.0.
      • Opening pos_orders rejects with PosOrderOpenClosedError when the database closes during a migration: RxDB 17.5.0 cancels the migration on close. The open first waits for any write already in flight, so none reaches a closed store.
      • An open that needs no migration resolves only once RxDB allows writes, so a sale saved straight after it is never refused with COL25.
    • @tallyui/database:
      • createTallyDatabase returns an RxDB 17 database.
      • In development it adds RxDB's dev-mode plugin when a database is created, not at import.
    • Stored data: a till's SQLite data written by RxDB 16.21.1 opens unchanged under 17.5.0, and migrates its schema versions.

    Upgrade notes

    • Storage is one-way. Once a till has opened this version, pos_orders is at schema version 4, and an older build (such as @tallyui/pos 2.0.0 on RxDB 16.21.1) opens it without an error but shows no orders, so it sends none of the pending ones until the till is upgraded again. Nothing is deleted: the next upgrade recovers every order, including a sale rung during the rollback. Never roll an app back across this version, and never re-ring sales it hides: a re-rung sale is a second sale, and the upgrade sends both. See ADR-069 in docs/DECISIONS.md.
    • Web apps ship the 17.5.0 storage worker with the 17.5.0 main thread. A cached 16.x worker with a 17.5.0 main thread is untested and unsupported.
    • Apps pin rxdb and rxdb-premium to exactly 17.5.0.
    • RxDB 17 defaults a replication's toggleOnDocumentVisible to true (16.21.1: false). It then resyncs when the tab becomes visible, and no longer simulates activity to keep a hidden tab awake, so a browser may throttle a hidden tab's pull. RxDB pauses a hidden tab's replication only when that tab isn't the leader; a single-instance database is always the leader (read in 17.5.0's plugins/replication source, not tested).
  • 9885075: Match variant barcodes and SKUs in product search, and skip disabled Vendure variants when reading the product barcode.

  • 3cf5452: Follow-ups to the 401/403 split (#345):

    • Vendure: a signed-in user missing a permission (confirmed by the session probe) is now ConnectorUnauthorizedError with status: 403, the forbidden notice, instead of a plain transient error.
    • WooCommerce: a 403 from the JWT-auth plugin (jwt_auth_*) reaches the till only with a valid token on WCPOS 1.10.0–1.10.7 (wcpos/woocommerce-pos#1863). It is now WooPluginUpdateRequiredError (unsupported_store, WCPOS 1.10.8): the store owner updates WCPOS, and the till is never sent into a sign-in loop.
    • ConnectorUnauthorizedError: only a 403 is forbidden. A caller that omits status gets unauthorized, as before 3.0.
    • Docs: the customer picker's onError, the replication guide's error classes, and the connector comments now say that only a 401 means sign in again.
  • 8cf3ea4: A till tells "sign in again" apart from "signed in, but not allowed" (found by the Medusa POS app's adoption).

    • ConnectorUnauthorizedError.status is now required, typed 401 | 403, and set by meaning at every connector.
      • 401: the credentials are not accepted, so sign in again. code: 'unauthorized', fixed by the till.
      • 403: the till is signed in but not allowed. code: 'forbidden', fixed by the store.
      • Vendure answers a signed-out session with 403 too. Its connector checks who is signed in first, so a confirmed sign-out is always 401.
    • A 403 on the pull gives the forbidden notice, never a sign-out. The pull retries on the store schedule and clears by itself once the store owner grants the permission. SyncStatus shows "Products aren't updating: your account isn't allowed to do this on this store." with "You can keep selling. Ask the store owner."
    • The customer picker shows "Your account isn't allowed to do this on this store. Ask the store owner." for a 403, instead of asking the cashier to sign in again.
  • 9cd4024: A GraphQL FORBIDDEN answer throws ConnectorUnauthorizedError only when a probe ({ activeAdministrator { id } }, same headers) finds nobody signed in (#274). With a live administrator it is a plain Error naming the missing permission, and a failed probe is a plain, transient Error, so a missing permission no longer signs the till out into a sign-in loop.

2.0.0

@tallyui/core

Minor Changes

  • #23 53af670 Thanks @kilbot! - Breaking: the cart and checkout components are presentational and take Money. CartLine takes name, quantity, unitPrice and lineTotal. CartTotal takes subtotal, taxLines, discount and total. CashTendered and ChangeDisplay take Money amounts. All of them format with formatMoney, so there is no getPrice, float arithmetic or hard-coded '$'. CartPanel is generic, and CartLineItem is removed. Totals come from @tallyui/pos; the components no longer compute tax. The cash input keeps the text as typed and emits integer minor units.

    @tallyui/core adds moneyFromDecimalString, which parses typed decimal text into Money using integer arithmetic.

  • #54 50317c8 Thanks @kilbot! - Connectors can sign a user in: ConnectorAuth gains an optional signIn(baseUrl, { email, password }, init?) that resolves to a SignInResult (token, optional ISO 8601 expiresAt) and rejects with a SignInError whose code is invalid_credentials, unsupported or failed. The app stores the token and passes it back to getHeaders as token.

    Vendure's auth gains a sign-in flow: it runs the Admin API login mutation and takes the token from the vendure-auth-token header (the server's tokenMethod must include 'bearer'). Its fields are now url, email, password and an optional channel_token. getHeaders sends credentials.api_key as vendure-api-key, otherwise credentials.token as a Bearer token, plus vendure-token when channel_token is set. The old auth_token credential is still accepted as a deprecated alias for token.

    Medusa's medusaAdminUserAuth signs in through POST /auth/user/emailpass and reads expiresAt from the JWT's exp. medusaSecretKeyAuth has no sign-in.

  • #58 3e09957 Thanks @kilbot! - Add combinePullAdapters to @tallyui/core: it combines several pull adapters into the one adapter a collection replicates with, calling them one after another with a checkpoint per sub-adapter. Two replications on one collection can skip each other's pulled versions, so run one per collection.

    Vendure's replication.products now includes a variant feed that re-delivers parent products whose variants changed. Vendure does not bump Product.updatedAt on a variant price or stock edit, so the product feed alone misses those changes. An existing install's product-feed checkpoint carries over; the variant feed runs one full pass on first sync.

  • #18 a219ae0 Thanks @kilbot! - Adds the TallyUI Sync Protocol command contract: the CommandEnvelope, CommandResult, CommandWarning and OrderCreatePayload types (with their line and payment types), the batch request and response types, the constants COMMANDS_PATH, PROTOCOL_HEADER, PROTOCOL_VERSION and MAX_COMMANDS_PER_BATCH, and the isCommandBatchResponse guard. These are the shapes pinned in ADR-038 and ADR-039, shared by the POS outbox and backend plugins.

  • #115 4df9be4 Thanks @kilbot! - Discounts are pre-tax (ADR-062). An order discount is allocated across the lines in proportion to their own-mode amounts (the new allocateOrderDiscount, largest-remainder rounding), each line carries its share in orderDiscountMinor and is taxed after it, so an order discount now lowers the tax instead of coming off the total after tax. A discounted order.create is version 2, with discountMinor on each discounted line and on the payload; a discount-free payload stays version 1, byte-identical. finalize still rejects discounts until the plugins honour version 2. Receipt lines show their discountMinor. Stacked percentage order discounts are additive, each computed on the pre-order-discount base rather than compounding on what an earlier discount leaves, and every discount (line or order, percentage or fixed) is clamped to 0 so a negative value can never raise a price.

  • #99 9649259 Thanks @kilbot! - ReconcileFeedEntry (core) gains refreshOnly?: boolean: a missing product is skipped instead of tombstoned when its entry is refresh-only, so only the id reconcile's braked entries can delete (ADR-060, backlog 43). Merging in enqueue keeps refreshOnly true only when every entry queued for that id was refresh-only, so a deletable id-reconcile entry is never downgraded by a later refresh-only one. The fingerprint runner (startFingerprintReconcile, database) now enqueues its entries this way; the id runner is unchanged.

    FingerprintReconcileState (database) gains lastResultAt/lastErrorAt, stamped from an injectable now (default Date.now), so a kept lastResult next to a newer lastError can be told apart from a current one. The new isFingerprintResultCurrent(state) helper does that comparison (backlog 46).

  • #85 609ebd8 Thanks @kilbot! - Add the fingerprint reconcile (ADR-060 amendment 8): a neutral runner that compares a remote fingerprint per product against the local documents and re-delivers products whose fingerprint differs, through the collection's pull. @tallyui/core adds the FingerprintReconcileAdapter contract (fetchPages, a pure fingerprint and enqueue) and an optional reconcile.prices on TallyConnector. @tallyui/database adds startFingerprintReconcile, which runs no pass at start by default and otherwise mirrors the id reconcile: a complete, successful pass only, state$ (running, lastResult, lastError), and stop(). @tallyui/connector-medusa adds reconcile.prices, a nightly base-price backstop (MEDUSA_PRICE_RECONCILE_INTERVAL_MS) for the variant feed (ADR-060 job D1): it fingerprints each product's base prices (variant id, currency and amount, sorted, price-list prices excluded) from /admin/product-variants. Nothing is written locally; corrections arrive only through the reconcile feed's pull.

  • #97 f8b0dac Thanks @kilbot! - A fresh install downloads the catalogue once. A pull adapter can now declare pull.seedCheckpoint; on a fresh install (no stored checkpoint) combinePullAdapters reads every seed before any feed runs and starts that feed from it. The Medusa and Vendure variant feeds seed their cursor at the newest variant's updated_at, so their first pass no longer re-delivers every product the product feed has just delivered, and a variant edit made during the product feed's first pass still arrives. An install upgrading from a stored checkpoint is never seeded and keeps the variant feed's full healing pass.

  • #65 a0b7981 Thanks @kilbot! - @tallyui/core adds resolvePriceRange(variants, currency?), the lowest and highest current price across a product's variants. ProductPrice uses it to show from <lowest price> when a product's variants are priced differently, instead of just the default variant's price. New showFromPrice (default true) and fromLabel (default 'from') props control and opt out of this.

  • #61 540044c Thanks @kilbot! - Add the id reconcile (ADR-060): a periodic pass that reads every live product id and its live variant ids, so a deleted product or a deleted variant (whose parent's updatedAt does not change) reaches the local copy. @tallyui/core adds the IdReconcileAdapter contract and createReconcileFeed, which turns queued corrections into a pull-only adapter meant as the last key of combinePullAdapters. @tallyui/database adds the startIdReconcile runner. @tallyui/connector-vendure implements the Vendure side and wires it into replication.products and reconcile.ids. Nothing is written locally into the replicated collection; corrections arrive only through the collection's own pull.

  • #92 945bb83 Thanks @kilbot! - Medusa prices as Medusa charges them (ADR-060 D2b). SyncContext gains an optional pricingContext (from storeSettings()), ProductPrice an optional taxInclusive, and TallyConnector.reconcile a calculatedPrices slot. With a pricing context, every Medusa product document build fills each variant's calculated_price from the store API (null when the sales channel or region does not sell it), and the traits price from it: sale lists as a sale against the original price, override lists as the base price, null as unsellable. reconcile.calculatedPrices re-delivers products whose calculated prices changed with no timestamp bump; run it every MEDUSA_CALCULATED_PRICE_RECONCILE_INTERVAL_MS (30 minutes) with maxPages: 1000. Without a pricing context, documents and prices are unchanged.

  • #11 f90e59d Thanks @kilbot! - Add backend-neutral price and stock traits. ProductTraits gains getPrices (a price list of integer minor-unit Money entries, base or sale, per currency) and getStock (in_stock | out_of_stock | backorder | unknown plus an optional quantity). Core adds resolvePrice, moneyFromMajor, moneyToMajor and minorUnitDigits. Every connector maps its own shape into them; WooCommerce's instock/outofstock/onbackorder strings now stay inside the WooCommerce connector. The string-price and WooCommerce-style stock accessors remain and are deprecated.

  • #11 2a05ecb Thanks @kilbot! - Build the product components on the neutral traits. ProductPrice resolves the price list and formats it with Intl in the price's own currency (new currency and locale props; currencySymbol is now only the fallback for an unknown currency). ProductStockBadge reads getStock. ProductImage gains showPlaceholder, an initial tile for products without images. Core adds formatMoney, a traitContext prop on ConnectorProvider for store-level facts like the store currency, and useTraitContext. @tallyui/pos adds searchProducts, name/SKU/barcode search through traits that works the same on every backend.

  • #120 e0062ce Thanks @kilbot! - A per-store order.create capability check replaces the global discount guard (ADR-062). @tallyui/core gains ServerCapabilities, SignInResult.capabilities, SyncContext.capabilities, TallyConnector.capabilities?() and resolveCapabilities(fresh, stored). @tallyui/connector-medusa reads the store's supported order.create versions from GET /tally/v1/info: a 404 or a malformed response means an old plugin (version 1), a network failure or a 5xx is unknown and keeps the last known value, and a 401 throws. medusaSignIn returns the read capabilities, and both Medusa connectors expose capabilities(context) for a restored session. finalizeOrder in @tallyui/pos now rejects a discount only when the store's capability is below 2, so a store whose plugin has caught up finalizes a discounted order as order.create version 2.

  • #95 f1af98c Thanks @kilbot! - OrderCreateLine gains an optional taxInclusive (ADR-038 amendment 2). It is the line's own tax mode, sent only when that mode differs from the order's pricesIncludeTax. Single-mode orders produce byte-identical payloads. finalize still rejects converted lines until the Medusa plugin honours the field.

  • #157 125c85a Thanks @kilbot! - readFresh, countFresh and watchFresh move to a new, side-effect-free subpath, @tallyui/core/rxdb. Core now lists rxdb (>=16) and rxjs (>=7) as optional peer dependencies, needed only by that subpath; core's main entry stays free of both. @tallyui/pos re-exports the helpers unchanged. The id and fingerprint reconciles in @tallyui/database read the local products with readFresh instead of a cached find(), so a product the pull inserts or deletes while a pass reads them no longer leaves every later pass reading a stale list (RxDB 16.21.1 bug 4): an inserted product is now checked, and tombstoned or re-fetched, on the next pass, and a deleted one is no longer re-enqueued or counted towards the mass-delete brake.

  • #164 24b0563 Thanks @kilbot! - Register screens (WCPOS next port, ADR-032), driven by useRegisterSession: RegisterPicker, OpenRegisterCard, RegisterBar (one status pill; "Register ›"), MovementSheet (labelled "Amount" and "Reason"; a reason for every movement; same-tick taps coalesced), RegisterPanel (expected in the drawer; Undo by reversal; blind mode hides amounts) and RegisterColumn. @tallyui/core adds currencySymbol(currency, locale?).

  • #11 bc0a224 Thanks @kilbot! - Add isSellable and getVariantCount product traits to core and all four connectors.

  • #57 55ae68f Thanks @kilbot! - SignInErrorCode splits the old failed in two: failed now means no response arrived (a network error), and the new server_error means a response arrived but was unusable (a bad status, a malformed body, or a missing token). SignInError gains an optional status from a third constructor argument. Callers that switch on code should handle server_error.

    Medusa's sign-in now treats mfa_required: true and verification_required: true the same as a location body: unsupported, and no token is ever returned from a body like that. A malformed response body, any other non-OK status and a missing or non-string token are now server_error with the HTTP status.

    Vendure's sign-in now treats NATIVE_AUTH_STRATEGY_ERROR as unsupported, since native email/password auth is disabled on the server. A malformed response body, a non-OK status, GraphQL errors, a missing data.login and any other ErrorResult are now server_error with the HTTP status.

  • #64 402ec36 Thanks @kilbot! - Both connectors now store a product's variants sorted by id, since neither Medusa nor Vendure guarantees variant order across requests: @tallyui/core adds compareIds, and the Medusa and Vendure product projections (toDocument, toProductDocument) sort variants with it before the document is stored. Traits that read variants[0] (getPrices, getSku, getPrice, getStockQuantity, getBarcode and others) now see a stable variant across runs.

    Already-stored documents take the new order the next time they are delivered. Vendure's variant feed re-delivers every product on its first pass anyway, so it heals immediately.

  • #55 350967d Thanks @kilbot! - Stock reads use the reconciled overlay (ADR-060) and show how fresh it is. @tallyui/core now holds withStockOverlay and getProductStock (@tallyui/pos re-exports them), adds STOCK_LEVELS_LAST_PASS, stockOverlay and stockOverlayAsOf props on ConnectorProvider, and a useProductStock(doc) hook that returns overlay stock plus asOf, or getStock(doc) when no overlay is given. @tallyui/database: startStockReconcile also returns state$ (running, truncated, lastError, lastCompletedAt), reconcileStock() resolves with completedAt, and each successful pass stores { completedAt } in the last-pass local document of stock_levels, which createTallyDatabase now creates with local documents (apps that create the collection themselves use the new stockLevelsCollection config; without local documents a pass rejects with a clear error); a restarted runner seeds lastCompletedAt from it. @tallyui/pos adds stockOverlayAsOf$. ProductStockBadge reads stock through useProductStock and appends " · as of <time>" when an overlay is given (showAsOf={false} hides it).

  • #53 e3b8686 Thanks @kilbot! - Add a stock reconcile pass (ADR-060). @tallyui/core adds the StockReconcileAdapter contract (fetchPages and a pure overlay) and an optional reconcile.stock on TallyConnector. @tallyui/database adds the local-only stock_levels collection (STOCK_LEVELS_COLLECTION, stockLevelsSchema), which createTallyDatabase creates for connectors with reconcile.stock, and startStockReconcile, which re-reads stock every 5 minutes (and on demand through reconcileStock()) into that collection: it writes only changed rows, removes keys the backend no longer returns, writes nothing after a failed, truncated or stopped read, and never writes the replicated products. @tallyui/pos adds stockOverlay$, withStockOverlay and getProductStock, which read stock from the overlay where it has an entry and from the replicated product otherwise. The Vendure connector reconciles variant stockLevels, and the Medusa connector reconciles inventory item location levels, so stock changes that bump no product timestamp reach the POS.

  • #87 ac2a24a Thanks @kilbot! - TallyConnector gains an optional storeSettings(context, choice?) (TV4): one read-only call for the store's currency, pricesIncludeTax, taxRatesPpm and an opaque connector-specific pricingContext, so the app can feed the connector's own tax-inclusivity option and the POS TaxProvider from a single source of truth instead of two hand-matched settings. Rejects with a StoreSettingsError (choice_required with choices, or failed).

    Vendure's storeSettings reads the active channel's currency and pricesIncludeTax, and the default tax zone's enabled, non-customer-group rates keyed by tax category id (rounded to integer ppm once, at the connector's edge). default is the isDefault category's rate, or, when none is flagged, the first category Vendure's own taxCategories lists — the same fallback Vendure uses for a variant created without a category — and is 0 when that category has no rate in the zone. createVendureConnector's pricesIncludeTax option is unchanged; pass settings.pricesIncludeTax from storeSettings instead of hand-matching it to the POS.

  • #19 8df0569 Thanks @kilbot! - Adds variant traits. VariantSummary (id, title, sku, barcode, prices, stock) and the optional ProductTraits.getVariants describe every purchasable variant of a product, and findVariantByCode finds a variant by barcode or SKU for scanning. The Medusa connector implements getVariants; its product-level getPrices and getStock results are unchanged.

Patch Changes

  • #94 373e438 Thanks @kilbot! - resolvePrice keeps a price's taxInclusive flag on current and was. Each order-builder line keeps its price's own tax mode (LineItem.taxInclusive, plus priceTaxModeConverted when it differs from the store's pricesIncludeTax), so a customer pays exactly the shelf price and an inclusive price in an exclusive store is no longer taxed twice. Orders whose prices carry no flag, or one that agrees with the store, total exactly as before. The receipt shows a converted line in the order's mode, by its share of the order's once-rounded tax, so the lines still add up.

    In priced mode, the Medusa traits' deprecated getPrice and getRegularPrice return the resolved calculated price instead of the admin prices, and isSellable is false when no variant yields a price (for example a calculated_price with null amounts).

  • #11 b1b6e30 Thanks @kilbot! - Report product-level stock across all variants, showing the total quantity only when every variant has tracked, known stock. Draw the search magnifier with an attached, rounded handle and a larger ring.

@tallyui/database

Major Changes

  • #71 14871a2 Thanks @kilbot! - Breaking: getStorage() on the web no longer returns Dexie. It throws with guidance to pass RxDB Premium's SQLite-wasm storage explicitly (@tallyui/storage-sqlite/web), bundling its worker entry — the web engine ADR-061 pins as createTallyDatabase's target. Any app that relied on the Dexie default breaks; switching is a cold resync, not a data migration.

    Breaking: multiInstance: true now throws for every storage (ADR-061): the pinned web engine (opfs-sahpool) cannot share exclusive OPFS handles between tabs, so multi-instance is unsupported until job 3 removes the option along with #42's outbox code.

    Breaking: the storage deadline is now a watchdog. withWriteDeadline, STORAGE_WRITE_DEADLINE_MS, StorageWorkerTimeoutError and isStorageWorkerTimeout are removed; isStorageWorkerFailure now recognises only StorageWorkerStartError. createTallyDatabase wraps a storage marked tallyEngine: 'sqlite-sahpool' with withStorageWatchdog, following WCPOS (ADR-061), and no storage call is ever settled on a clock, because a timed-out write may still commit:

    • A write pending longer than 10s (STORAGE_WRITE_STALL_MS) is flagged as stalled, never rejected; its promise stays pending until the worker answers, and the status returns to ok once no stalled writes remain.
    • Reads are watched: two consecutive silent 30s windows (STORAGE_READ_WATCHDOG_MS), with reads pending and no storage call settling, set the status to dead, which is sticky. The recovery is to reload.
    • Creating the storage has no deadline, since the worker and wasm can be slow to download.

    getStorageHealth(db) returns the Observable<StorageHealth> ({ status: 'ok' | 'stalled' | 'dead', stalledWrites, stalledSince? }) for a database on that storage, and undefined for any other, so an app can show "saving is slow…" or "storage stopped, reload".

Minor Changes

  • #99 9649259 Thanks @kilbot! - ReconcileFeedEntry (core) gains refreshOnly?: boolean: a missing product is skipped instead of tombstoned when its entry is refresh-only, so only the id reconcile's braked entries can delete (ADR-060, backlog 43). Merging in enqueue keeps refreshOnly true only when every entry queued for that id was refresh-only, so a deletable id-reconcile entry is never downgraded by a later refresh-only one. The fingerprint runner (startFingerprintReconcile, database) now enqueues its entries this way; the id runner is unchanged.

    FingerprintReconcileState (database) gains lastResultAt/lastErrorAt, stamped from an injectable now (default Date.now), so a kept lastResult next to a newer lastError can be told apart from a current one. The new isFingerprintResultCurrent(state) helper does that comparison (backlog 46).

  • #85 609ebd8 Thanks @kilbot! - Add the fingerprint reconcile (ADR-060 amendment 8): a neutral runner that compares a remote fingerprint per product against the local documents and re-delivers products whose fingerprint differs, through the collection's pull. @tallyui/core adds the FingerprintReconcileAdapter contract (fetchPages, a pure fingerprint and enqueue) and an optional reconcile.prices on TallyConnector. @tallyui/database adds startFingerprintReconcile, which runs no pass at start by default and otherwise mirrors the id reconcile: a complete, successful pass only, state$ (running, lastResult, lastError), and stop(). @tallyui/connector-medusa adds reconcile.prices, a nightly base-price backstop (MEDUSA_PRICE_RECONCILE_INTERVAL_MS) for the variant feed (ADR-060 job D1): it fingerprints each product's base prices (variant id, currency and amount, sorted, price-list prices excluded) from /admin/product-variants. Nothing is written locally; corrections arrive only through the reconcile feed's pull.

  • #61 540044c Thanks @kilbot! - Add the id reconcile (ADR-060): a periodic pass that reads every live product id and its live variant ids, so a deleted product or a deleted variant (whose parent's updatedAt does not change) reaches the local copy. @tallyui/core adds the IdReconcileAdapter contract and createReconcileFeed, which turns queued corrections into a pull-only adapter meant as the last key of combinePullAdapters. @tallyui/database adds the startIdReconcile runner. @tallyui/connector-vendure implements the Vendure side and wires it into replication.products and reconcile.ids. Nothing is written locally into the replicated collection; corrections arrive only through the collection's own pull.

  • #69 0ef1c7e Thanks @kilbot! - ADR-061: startLiveTab (@tallyui/database) coordinates exactly one live tab per store over a Web Lock and a BroadcastChannel. A new tab asks the live tab to hand over; the live tab may delay while busy, then parks and releases the lock; a tab that gets no acknowledgement is blocked and must be closed. LiveTabScreen (@tallyui/components) renders the parked and blocked screens, with translatable label props. On platforms without Web Locks (React Native, Node), a tab is simply live at once.

  • #92 945bb83 Thanks @kilbot! - Medusa prices as Medusa charges them (ADR-060 D2b). SyncContext gains an optional pricingContext (from storeSettings()), ProductPrice an optional taxInclusive, and TallyConnector.reconcile a calculatedPrices slot. With a pricing context, every Medusa product document build fills each variant's calculated_price from the store API (null when the sales channel or region does not sell it), and the traits price from it: sale lists as a sale against the original price, override lists as the base price, null as unsellable. reconcile.calculatedPrices re-delivers products whose calculated prices changed with no timestamp bump; run it every MEDUSA_CALCULATED_PRICE_RECONCILE_INTERVAL_MS (30 minutes) with maxPages: 1000. Without a pricing context, documents and prices are unchanged.

  • #63 d9fe1e3 Thanks @kilbot! - Fix the Medusa connector's incremental pull: Medusa 2.21 honours only the operator form updated_at[$gte], and silently ignored the connector's updated_at[gte], so every pass read the whole catalogue. Add the Medusa id reconcile (ADR-060), so a deleted product or a deleted variant (whose parent's updated_at does not change) now reaches the local copy through replication.products and reconcile.ids. @tallyui/database adds a mass-deletion brake to startIdReconcile: a pass that would tombstone more than maxDeleteShare (default 20%) of local products, and more than 10 of them, queues nothing and warns instead, unless allowMassDelete is set.

  • #102 7490a3f Thanks @kilbot! - A connector schema version bump now drops and resyncs its collection (ADR-060 amendment 9). createTallyDatabase adds RxDB's migration-schema plugin and gives each connector collection above version 0 a v => null strategy per earlier version, and startReplication appends -v<version> to the replication identifier above version 0, so the pull starts from no checkpoint. Version 0 collections keep their identifier and never resync. stock_levels and pos_orders are untouched.

    The Medusa products schema is now version 1 and declares variants[].calculated_price (object or null). The first sync after upgrading resyncs the Medusa catalogue: the stored products are dropped when the database opens and download again, once, on the first sync. A collection created with medusaProductSchema outside createTallyDatabase must use connectorCollection(medusaProductSchema) from @tallyui/database, which supplies the strategies and the migration plugin; otherwise RxDB throws COL12.

  • #74 0121559 Thanks @kilbot! - Removes the unreleased multi-tab database machinery in favour of one live tab per store (ADR-061): CreateDatabaseOptions.multiInstance (createTallyDatabase always passes multiInstance: false), the tally-outbox-flush and tally-outbox-state local documents, and follower forwarding between tabs are all gone. The outbox's public API (flush, requeue, start, stop, state$) and its single-instance behaviour are unchanged. Apps enforce one live tab with startLiveTab.

    @tallyui/storage-sqlite's worker now swallows the ready promise's rejection so a pool install failure before any createStorageInstance call doesn't surface as an unhandled rejection, and its files list no longer publishes test files, matching @tallyui/database and @tallyui/pos.

  • #55 350967d Thanks @kilbot! - Stock reads use the reconciled overlay (ADR-060) and show how fresh it is. @tallyui/core now holds withStockOverlay and getProductStock (@tallyui/pos re-exports them), adds STOCK_LEVELS_LAST_PASS, stockOverlay and stockOverlayAsOf props on ConnectorProvider, and a useProductStock(doc) hook that returns overlay stock plus asOf, or getStock(doc) when no overlay is given. @tallyui/database: startStockReconcile also returns state$ (running, truncated, lastError, lastCompletedAt), reconcileStock() resolves with completedAt, and each successful pass stores { completedAt } in the last-pass local document of stock_levels, which createTallyDatabase now creates with local documents (apps that create the collection themselves use the new stockLevelsCollection config; without local documents a pass rejects with a clear error); a restarted runner seeds lastCompletedAt from it. @tallyui/pos adds stockOverlayAsOf$. ProductStockBadge reads stock through useProductStock and appends " · as of <time>" when an overlay is given (showAsOf={false} hides it).

  • #53 e3b8686 Thanks @kilbot! - Add a stock reconcile pass (ADR-060). @tallyui/core adds the StockReconcileAdapter contract (fetchPages and a pure overlay) and an optional reconcile.stock on TallyConnector. @tallyui/database adds the local-only stock_levels collection (STOCK_LEVELS_COLLECTION, stockLevelsSchema), which createTallyDatabase creates for connectors with reconcile.stock, and startStockReconcile, which re-reads stock every 5 minutes (and on demand through reconcileStock()) into that collection: it writes only changed rows, removes keys the backend no longer returns, writes nothing after a failed, truncated or stopped read, and never writes the replicated products. @tallyui/pos adds stockOverlay$, withStockOverlay and getProductStock, which read stock from the overlay where it has an entry and from the replicated product otherwise. The Vendure connector reconciles variant stockLevels, and the Medusa connector reconciles inventory item location levels, so stock changes that bump no product timestamp reach the POS.

Patch Changes

  • #66 b029839 Thanks @kilbot! - The id reconcile's mass-delete brake now also trips when every local product would be tombstoned, whatever the count, unless allowMassDelete is set. Previously the brake applied only above MASS_DELETE_MINIMUM (10) would-be tombstones, so a wrong channel token that made a shop of 10 or fewer products look empty could tombstone its whole catalogue.

  • #11 184901f Thanks @kilbot! - createTallyDatabase now wraps its storage in the AJV schema validator in development. RxDB dev-mode refuses to create a database without one (error DVM1), so every app using the default options failed at startup.

  • #14 c9b0bb8 Thanks @kilbot! - createTallyDatabase now works in production builds. It passed ignoreDuplicate: true unconditionally, which RxDB rejects with error DB9 whenever dev mode is off, so no production app could open its database. The option is now only set in dev mode, where hot reload still re-creates a database with the same name.

  • #78 9168278 Thanks @kilbot! - The live tab's busy-defer now caps by wall-clock time elapsed since the hand-over ack, not by counting sleep(100) calls. The live tab is in the background exactly when a new tab asks it to hand over, and browsers throttle background timers to about 1 s or more, so a sleep count could stretch the intended maxDeferMs (10 s by default) far beyond that, leaving the new tab stuck in acquiring.

  • #157 125c85a Thanks @kilbot! - readFresh, countFresh and watchFresh move to a new, side-effect-free subpath, @tallyui/core/rxdb. Core now lists rxdb (>=16) and rxjs (>=7) as optional peer dependencies, needed only by that subpath; core's main entry stays free of both. @tallyui/pos re-exports the helpers unchanged. The id and fingerprint reconciles in @tallyui/database read the local products with readFresh instead of a cached find(), so a product the pull inserts or deletes while a pass reads them no longer leaves every later pass reading a stale list (RxDB 16.21.1 bug 4): an inserted product is now checked, and tombstoned or re-fetched, on the next pass, and a deleted one is no longer re-enqueued or counted towards the mass-delete brake.

  • #108 caa1fd2 Thanks @kilbot! - A reconcile trigger during a pass now runs one follow-up pass instead of being dropped.

@tallyui/primitives

Minor Changes

Patch Changes

@tallyui/components

Major Changes

  • #23 53af670 Thanks @kilbot! - Breaking: the cart and checkout components are presentational and take Money. CartLine takes name, quantity, unitPrice and lineTotal. CartTotal takes subtotal, taxLines, discount and total. CashTendered and ChangeDisplay take Money amounts. All of them format with formatMoney, so there is no getPrice, float arithmetic or hard-coded '$'. CartPanel is generic, and CartLineItem is removed. Totals come from @tallyui/pos; the components no longer compute tax. The cash input keeps the text as typed and emits integer minor units.

    @tallyui/core adds moneyFromDecimalString, which parses typed decimal text into Money using integer arithmetic.

Minor Changes

  • #136 0b1237f Thanks @kilbot! - CartPanel's footer (totals, pay button) now stays pinned to the bottom of the panel at every height, on web and native, instead of being pushed off screen by a tall list of lines. CartPanel also gains an afterItems slot, rendered inside the scrolling region after the last line, for content like discount chips.

  • #148 a80e053 Thanks @kilbot! - Catalogue takes an optional minCodeLength prop (a till's barcode-scanner setting). When set, Enter on a search query shorter than minCodeLength (after trimming) no longer does a barcode/SKU lookup — it leaves the typed text as a plain search instead of selecting an entry. Unset, behaviour is unchanged. A scanner's timing threshold stays the app's own concern, in its unfocused wedge listener.

  • #175 a9b77fe Thanks @kilbot! - One close in flight per register. useRegisterSession's closeSession joins a close already running for the same register, in any hook instance, and returns its closure (the joining call's counted, approvedBy and approvedByName are ignored), so a tap during a close no longer starts a second, overlapping one. The hook returns a new closing flag, true while that close is in flight. RegisterColumn keeps the count slot up while closing instead of flashing the Finish-closing card, whose button now has nativeID="register-column-finish-close-button". describeRegisterBarPill takes closing and returns the new 'Close not finished' pill for a closed session that isn't closing, right after 'Choose a register' and ahead of 'Offline'; RegisterBar passes register.closing.

  • #174 160252c Thanks @kilbot! - ClosureSheet shows who approved the close (Approved by {name}, falling back to the approver id without a name) under the figures, blind or not — it's provenance, not a counted figure. RegisterColumn offers "Finish closing" when useRegisterSession's session is closed but its closure row was never written (an interrupted close), resuming the close (the store keeps the count persisted on the session) instead of falling through to the cart, where openSession would otherwise refuse with RegisterCloseIncompleteError. buildClosureDocument's return type now carries closure.unsynced_count: number and each movement's id/reason as string, without a cast; no runtime output changed.

  • #107 f132a68 Thanks @kilbot! - ConnectorStatus gains unsoldCount, unsoldStale and formatUnsold props, showing how many products the sales channel doesn't sell (the calculated-price runner's unreported) below lastSync, using the warning token when current and muted-foreground when stale.

  • #149 1e2ee56 Thanks @kilbot! - A failed save can now end in Continue once its order is confirmed stored. useOrderOutbox gains isStored(order), and record now treats an order stored with the same id and money-bearing content (sameSale, new) as stored whatever its commandId, so a Retry after a requeue no longer fails forever; other content throws the new OrderContentMismatchError. useSale takes an optional isStored and exposes canContinue and continueSale(); Tender renders Continue when canContinue is true. newSale() is now refused while a failed or running save's order isn't confirmed stored; a refusal during a running save asks isStored again, so a hung save whose order is stored can still Continue. A confirmed order is never handed to onSaleCompleted again (#147's background re-hand is gone). saleLogger and outboxLogger are now exported.

  • #132 7c69fce Thanks @kilbot! - order.display gains lines and orderDiscountMinor (ADR-063). Each line shows its amount before any discount, with its own discounts as sub-rows, all in the display mode. The order discounts appear as one row, not allocated to the lines. Every discount row is its own-mode amount converted on its own, so it's exact. display.subtotalMinor is now derived from the total and the discount rows, so Σ lines === subtotalMinor and Σ sub-rows + orderDiscountMinor === discountMinor hold exactly. Single-mode carts show the same figures as before; mixed-mode carts can shift by about a cent, carried by the last converted line's amount.

    ReceiptLineItem gains displayAmountMinor and displayDiscounts, and ReceiptData gains orderDiscountMinor. Print these above the subtotal. lineTotalMinor is unchanged: it's after every discount and is kept for existing readers.

    CartTotal now orders its rows Subtotal / Discount / Tax / Total, matching the receipt, and takes an optional taxInclusive, which labels the tax rows "incl." instead of adding them.

  • #65 a0b7981 Thanks @kilbot! - @tallyui/core adds resolvePriceRange(variants, currency?), the lowest and highest current price across a product's variants. ProductPrice uses it to show from <lowest price> when a product's variants are priced differently, instead of just the default variant's price. New showFromPrice (default true) and fromLabel (default 'from') props control and opt out of this.

  • #141 6a4e80d Thanks @kilbot! - Lifted medusapos's product catalogue, receipt, print-style hook and sync status into @tallyui/components (Catalogue, Receipt, injectPrintStyle, SyncStatus), so every platform POS gets the same screens (ADR-052, TV6b). Catalogue takes an optional hour12?: boolean (undefined keeps the locale default) instead of reading expo-localization. Receipt takes store: { name: string; address?: string } instead of a Medusa-shaped settings type, an optional topInset?: number (default 0) instead of an app-local strip-height context, an optional formatDate?: (iso: string) => string defaulting to an Intl.DateTimeFormat formatter, and an optional taxLabel?: (ratePpm: number) => string with the same default as Cart's (TV6a), keeping the incl. prefix rule. searchProducts, catalogueEntries, findEntryByCode and variantPriceLabel join buildReceiptData on the pure-function allow-list components may import from @tallyui/pos (ADR-064).

  • #142 60a2218 Thanks @kilbot! - Lifted medusapos's neutral outbox core so every platform POS records and sends sales the same way (ADR-052, TV7). @tallyui/pos gains getDeviceId(storage, key), which keeps a UUIDv7 device id in web storage under the given key and falls back to one id per process; needsAttention(orders), which picks rejected and applied-with-warnings orders, newest first; and useOrderOutbox({ storeKey, open, transport, deviceId, onBusy?, onOpenError? }), which opens the order store for storeKey, runs its outbox and returns { orders, state, recent, record, flush, requeue }. @tallyui/components gains OrdersList, the "Needs attention" and "Recent" orders with a Retry button, taking orders, onRetry, an optional formatDate (default Intl.DateTimeFormat) and an optional footer. needsAttention joins the pure-function allow-list components may import from @tallyui/pos (ADR-064).

  • #139 3dd11f6 Thanks @kilbot! - Lifted medusapos's cart, phone cart bar, discount form and tender screen into @tallyui/components (Cart, CartBar, Tender, DiscountForm, DiscountChips, parseDiscount, discountLabel), so every platform POS gets the same sale-column UI (ADR-052, TV6a). Cart takes an optional taxLabel?: (ratePpm: number) => string (default `Tax ${ratePpm / 10000}%`), since VAT isn't universal. @tallyui/components gains a runtime dependency on @tallyui/pos, for types and the pure buildReceiptData only — components still render from props alone.

  • #69 0ef1c7e Thanks @kilbot! - ADR-061: startLiveTab (@tallyui/database) coordinates exactly one live tab per store over a Web Lock and a BroadcastChannel. A new tab asks the live tab to hand over; the live tab may delay while busy, then parks and releases the lock; a tab that gets no acknowledgement is blocked and must be closed. LiveTabScreen (@tallyui/components) renders the parked and blocked screens, with translatable label props. On platforms without Web Locks (React Native, Node), a tab is simply live at once.

  • #11 2a05ecb Thanks @kilbot! - Build the product components on the neutral traits. ProductPrice resolves the price list and formats it with Intl in the price's own currency (new currency and locale props; currencySymbol is now only the fallback for an unknown currency). ProductStockBadge reads getStock. ProductImage gains showPlaceholder, an initial tile for products without images. Core adds formatMoney, a traitContext prop on ConnectorProvider for store-level facts like the store currency, and useTraitContext. @tallyui/pos adds searchProducts, name/SKU/barcode search through traits that works the same on every backend.

  • #144 e692c40 Thanks @kilbot! - pos_orders goes to schema version 2 (ADR-032, ADR-065). It adds three optional fields: lateSessionId, and ADR-065's display and taxByRate, which nothing writes yet. Apps must adopt this release's addPosOrderCollection, which migrates pos_orders to version 2 from version 0 or 1 without dropping an order.

    A sale whose session refuses the stamp in useSale().complete() (the session closed or went missing) is no longer stopped, because the money has been taken. It goes on to onSaleCompleted and the receipt with lateSessionId set and no sessionId, so no closure counts it, and a late-sale register fact is recorded. needsAttention now also selects any order with lateSessionId, and OrdersList explains it: "Taken after the register closed. It is not in that register's closure."

  • #76 e225222 Thanks @kilbot! - ProductPrice gains a formatFrom prop, (price: string) => string, for languages whose word order puts the "from" label after the price (formatFrom={(p) => \${p} ab\}renders€10.00 ab); fromLabelstays as a deprecated alias. Visible change: every price — the regular price, the "from" range and the sale price — now uses the theme'stext-price(ortext-sale) token instead of text-foreground. Apps with screenshot tests covering ProductPrice will need to re-shoot them.

  • #167 62eef0f Thanks @kilbot! - Register-selection screen nits (ADR-032 amendment 1, medusapos adopting 451a0ca): RegisterPicker's rows now size to their content, with a minimum height, instead of clipping the "Not opened" second line at a fixed h-11; RegisterPicker and OpenRegisterCard no longer hard-code flex-1, taking their existing className from the caller instead (TallyUI's own RegisterColumn still passes flex-1 where it mounts them); RegisterPanel's sales count now pluralises correctly ("1 sale this session", not "1 sales"); and OpenRegisterCard's amount label names the currency, matching MovementSheet's "Amount (€)" ("Cash in the drawer to start (€)").

    Two new optional props for apps that need to put register controls elsewhere on the screen: RegisterBar takes an onPressPill?: () => void that turns its status pill into a button (opening the gate/picker or the panel), and Catalogue takes a statusAccessory?: ReactNode rendered at the end of its status line, alongside the status text, so a register control can sit there at phone width.

  • #164 24b0563 Thanks @kilbot! - Register screens (WCPOS next port, ADR-032), driven by useRegisterSession: RegisterPicker, OpenRegisterCard, RegisterBar (one status pill; "Register ›"), MovementSheet (labelled "Amount" and "Reason"; a reason for every movement; same-tick taps coalesced), RegisterPanel (expected in the drawer; Undo by reversal; blind mode hides amounts) and RegisterColumn. @tallyui/core adds currencySymbol(currency, locale?).

  • #166 c65da52 Thanks @kilbot! - RegisterCount and ClosureSheet (WCPOS next port, ADR-032 amendment 1): denomination tiles counted in minor units (tap adds one, a 400ms hold adds ten), typing a cash amount clears the tiles, a live variance line hidden while blind, and Close gated by an optional approve prop above varianceThreshold (refused with an exact message without one). ClosureSheet shows the local closure number and, unless blind, the counted figures and variance per tender.

  • #55 350967d Thanks @kilbot! - Stock reads use the reconciled overlay (ADR-060) and show how fresh it is. @tallyui/core now holds withStockOverlay and getProductStock (@tallyui/pos re-exports them), adds STOCK_LEVELS_LAST_PASS, stockOverlay and stockOverlayAsOf props on ConnectorProvider, and a useProductStock(doc) hook that returns overlay stock plus asOf, or getStock(doc) when no overlay is given. @tallyui/database: startStockReconcile also returns state$ (running, truncated, lastError, lastCompletedAt), reconcileStock() resolves with completedAt, and each successful pass stores { completedAt } in the last-pass local document of stock_levels, which createTallyDatabase now creates with local documents (apps that create the collection themselves use the new stockLevelsCollection config; without local documents a pass rejects with a clear error); a restarted runner seeds lastCompletedAt from it. @tallyui/pos adds stockOverlayAsOf$. ProductStockBadge reads stock through useProductStock and appends " · as of <time>" when an overlay is given (showAsOf={false} hides it).

  • #96 93658cd Thanks @kilbot! - StoreSettingsChoiceScreen: the picker the app shows when storeSettings rejects with choice_required (TV4), for a store with several regions, countries or sales channels — medusa-dev's one region with 7 countries always hits this. Renders a radio-row section per choice offered, pre-selects a single-option section or a matching initial value, and calls onSubmit with the picked fields once every shown section has a selection.

  • #12 fe65b33 Thanks @kilbot! - Add createSvgIcon and SearchIcon, and replace the SearchInput text glyph with an SVG magnifier. react-native-svg >=15 is now a peer dependency.

  • #104 bc46d99 Thanks @kilbot! - ProductGrid hides products this channel doesn't sell (traits.isSellable false, for example a Medusa product outside the sales channel) unless showUnsellable is set, and ProductCard shows such a product in a muted "Not sold here" state instead of its price. OrderBuilder.addProduct now refuses an unsellable product before looking up its price, instead of throwing the unrelated "No price in …" error.

Patch Changes

  • #168 670d3b8 Thanks @kilbot! - The register approval gate is enforced in useRegisterSession's closeSession, not only in RegisterCount: over varianceThreshold, a close without approvedBy throws the new RegisterApprovalRequiredError before any write, blind mode included. closeSession takes approvedBy and approvedByName, and they reach the Z (breakdowns.approved_by, approved_by_name); the store's closeSession takes approvedBy. useRegisterSession's register option accepts null while its host opens. closeNeedsApproval is the shared "over threshold" rule. RegisterCount passes approve()'s approvedBy and approvedByName to closeSession, and shows the hook's refusal with the same copy.

  • #137 314d1fc Thanks @kilbot! - CartPanel rows now default to keying by the item's id (string or number), falling back to index only for items without one, instead of always keying by index — so removing a line above another with an open inline form (e.g. a per-line discount editor) no longer remounts and loses that form's state. Pass keyExtractor to override.

  • #169 6c9a176 Thanks @kilbot! - Catalogue's status text now truncates to a single line (with an ellipsis) when statusAccessory is set, instead of wrapping to three lines at phone width and pushing the accessory (e.g. a register pill) out of place. Without statusAccessory, the status text still wraps as before.

  • #43 f1e2a02 Thanks @kilbot! - Status badges use foreground text on their tint (the dot carries the colour), since coloured text on a 15% tint of itself fails WCAG AA; the refunded order badge uses the destructive token instead of the undefined danger. Search, cart-note and customer inputs take their placeholder colour from the muted-foreground token.

  • #37 12b7723 Thanks @kilbot! - Order cards, receipt preview, register summary, settings groups, connector status, variant picker, cash-tendered input, cart note and customer form used the undefined bg-surface class and rendered transparent; they now use bg-card.

  • #88 5053527 Thanks @kilbot! - no longer publishes test files

  • #11 b1b6e30 Thanks @kilbot! - Report product-level stock across all variants, showing the total quantity only when every variant has tracked, known stock. Draw the search magnifier with an attached, rounded handle and a larger ring.

  • #36 d1bc892 Thanks @kilbot! - Light theme contrast: primary darkened to #5b5ef0 (white text 4.88:1), muted-foreground to #656c79 and input to #848a94 (control borders ≥ 3:1). Product cards and quick-tender buttons get borders, and components no longer use the undefined bg-surface-alt or text-muted text classes, so labels such as "Change Due" are legible.

@tallyui/storage-sqlite

Minor Changes

  • #33 a0d2b90 Thanks @kilbot! - getRxStorageSQLite(database) now returns RxDB Premium's SQLite storage instead of TallyUI's own engine, so writes are transactional and queries run on real SQLite. The call is unchanged: pass a synchronous SQLite handle such as expo-sqlite's openDatabaseSync(...). rxdb-premium@16.21.1 is now a peer dependency that your app installs under its own RxDB Premium licence. Use one handle per RxDB database; the storage never closes the handle, your app does.

  • #70 c15c04d Thanks @kilbot! - Adds the web storage (ADR-061): getRxStorageSQLiteWasm from @tallyui/storage-sqlite/web runs RxDB Premium's SQLite storage on @sqlite.org/sqlite-wasm's opfs-sahpool VFS, in one dedicated worker owned by the live tab, reached through premium's getRxStorageWorker in mode 'one'. The app supplies the worker input, for example () => new Worker(new URL('@tallyui/storage-sqlite/web-worker', import.meta.url), { type: 'module' }). @sqlite.org/sqlite-wasm is now a peer dependency that your app installs. The returned storage carries tallyEngine: 'sqlite-sahpool' so callers can recognise it. The root export is unchanged and does not pull in wasm.

  • #71 14871a2 Thanks @kilbot! - Added tallyui-build-sqlite-worker, a bin script that prebuilds the web-worker entry (with esbuild) and copies sqlite3.wasm next to it, for Metro/Expo web apps that can't bundle a module worker at runtime.

  • #100 94e1f09 Thanks @kilbot! - getRxStorageSQLiteWasm returns a storage with terminate(), which stops its worker and clears the cached channel, so a fresh open after the live-tab park no longer hangs.

Patch Changes

  • #74 0121559 Thanks @kilbot! - Removes the unreleased multi-tab database machinery in favour of one live tab per store (ADR-061): CreateDatabaseOptions.multiInstance (createTallyDatabase always passes multiInstance: false), the tally-outbox-flush and tally-outbox-state local documents, and follower forwarding between tabs are all gone. The outbox's public API (flush, requeue, start, stop, state$) and its single-instance behaviour are unchanged. Apps enforce one live tab with startLiveTab.

    @tallyui/storage-sqlite's worker now swallows the ready promise's rejection so a pool install failure before any createStorageInstance call doesn't surface as an unhandled rejection, and its files list no longer publishes test files, matching @tallyui/database and @tallyui/pos.

  • #72 91d9169 Thanks @kilbot! - The worker listens before start-up finishes, fixing a hang on every cold start in real browsers.

  • #91 fec2ee7 Thanks @kilbot! - The worker build bin no longer needs a built dist.

@tallyui/pos

Major Changes

  • #24 e7b2fa5 Thanks @kilbot! - Breaking: removes the floating-point money and rate paths.
    • calculateTax, extractTax, addTax, TaxResult and formatCurrency are deleted. Use the exact tax API (computeOrderTax, taxMicros) and formatMoney.
    • TaxContext.getTaxRate(), which returned a fraction, is replaced by getTaxRatePpm(), which returns integer parts per million.
    • TaxProvider takes ratesPpm and validates it.
    • useCurrencyFormatter() now formats Money, and useCurrencyCode() is added.

Minor Changes

  • #168 670d3b8 Thanks @kilbot! - The register approval gate is enforced in useRegisterSession's closeSession, not only in RegisterCount: over varianceThreshold, a close without approvedBy throws the new RegisterApprovalRequiredError before any write, blind mode included. closeSession takes approvedBy and approvedByName, and they reach the Z (breakdowns.approved_by, approved_by_name); the store's closeSession takes approvedBy. useRegisterSession's register option accepts null while its host opens. closeNeedsApproval is the shared "over threshold" rule. RegisterCount passes approve()'s approvedBy and approvedByName to closeSession, and shows the hook's refusal with the same copy.

  • #175 a9b77fe Thanks @kilbot! - One close in flight per register. useRegisterSession's closeSession joins a close already running for the same register, in any hook instance, and returns its closure (the joining call's counted, approvedBy and approvedByName are ignored), so a tap during a close no longer starts a second, overlapping one. The hook returns a new closing flag, true while that close is in flight. RegisterColumn keeps the count slot up while closing instead of flashing the Finish-closing card, whose button now has nativeID="register-column-finish-close-button". describeRegisterBarPill takes closing and returns the new 'Close not finished' pill for a closed session that isn't closing, right after 'Choose a register' and ahead of 'Offline'; RegisterBar passes register.closing.

  • #149 1e2ee56 Thanks @kilbot! - A failed save can now end in Continue once its order is confirmed stored. useOrderOutbox gains isStored(order), and record now treats an order stored with the same id and money-bearing content (sameSale, new) as stored whatever its commandId, so a Retry after a requeue no longer fails forever; other content throws the new OrderContentMismatchError. useSale takes an optional isStored and exposes canContinue and continueSale(); Tender renders Continue when canContinue is true. newSale() is now refused while a failed or running save's order isn't confirmed stored; a refusal during a running save asks isStored again, so a hung save whose order is stored can still Continue. A confirmed order is never handed to onSaleCompleted again (#147's background re-hand is gone). saleLogger and outboxLogger are now exported.

  • #115 4df9be4 Thanks @kilbot! - Discounts are pre-tax (ADR-062). An order discount is allocated across the lines in proportion to their own-mode amounts (the new allocateOrderDiscount, largest-remainder rounding), each line carries its share in orderDiscountMinor and is taxed after it, so an order discount now lowers the tax instead of coming off the total after tax. A discounted order.create is version 2, with discountMinor on each discounted line and on the payload; a discount-free payload stays version 1, byte-identical. finalize still rejects discounts until the plugins honour version 2. Receipt lines show their discountMinor. Stacked percentage order discounts are additive, each computed on the pre-order-discount base rather than compounding on what an earlier discount leaves, and every discount (line or order, percentage or fixed) is clamped to 0 so a negative value can never raise a price.

  • #132 7c69fce Thanks @kilbot! - order.display gains lines and orderDiscountMinor (ADR-063). Each line shows its amount before any discount, with its own discounts as sub-rows, all in the display mode. The order discounts appear as one row, not allocated to the lines. Every discount row is its own-mode amount converted on its own, so it's exact. display.subtotalMinor is now derived from the total and the discount rows, so Σ lines === subtotalMinor and Σ sub-rows + orderDiscountMinor === discountMinor hold exactly. Single-mode carts show the same figures as before; mixed-mode carts can shift by about a cent, carried by the last converted line's amount.

    ReceiptLineItem gains displayAmountMinor and displayDiscounts, and ReceiptData gains orderDiscountMinor. Print these above the subtotal. lineTotalMinor is unchanged: it's after every discount and is kept for existing readers.

    CartTotal now orders its rows Subtotal / Discount / Tax / Total, matching the receipt, and takes an optional taxInclusive, which labels the tax rows "incl." instead of adding them.

  • #127 2a0ca7f Thanks @kilbot! - Order gains display: DisplayTotals (ADR-063): the cart's subtotal before discounts, the discount, the tax and the total in the store's display mode, which add up on screen even in a mixed-mode cart. The settlement figures (subtotalMinor, discountMinor, taxMinor, totalMinor) and the order.create payload are unchanged; display is never sent to the server; a parked draft may carry it, but it is recomputed on resume.

  • #163 714b4bd Thanks @kilbot! - useSale's hung-save check guard is now scoped per completion instead of a shared boolean: a sale whose isStored never settles can no longer block a later sale's own hung-save poll from ever confirming and offering Continue (medusapos's #85 review).

    useOrderOutbox's isStored now logs "A stored order has this id with different content" at most once per order id for the hook's lifetime, instead of on every 5 s poll of a hung save.

    useOrderOutbox also exposes savesInFlight: number, the count of record() calls not yet settled, so an app can hold sign-out while a save is in flight.

  • #161 f4a4d74 Thanks @kilbot! - A hung save — one whose order is built and whose save neither resolves nor throws — now re-asks isStored by itself every 5 s while it stays unconfirmed, so useSale sets canContinue and Tender can offer Continue with no user action. This covers an app whose tender has no New sale control while saving (medusapos), which never triggered the existing refused-newSale() check. The poll clears when the save settles, on confirmation, on newSale()/continueSale() and on unmount; at most one runs at a time. SALE_SAVING is now exported from @tallyui/pos.

  • #142 60a2218 Thanks @kilbot! - Lifted medusapos's neutral outbox core so every platform POS records and sends sales the same way (ADR-052, TV7). @tallyui/pos gains getDeviceId(storage, key), which keeps a UUIDv7 device id in web storage under the given key and falls back to one id per process; needsAttention(orders), which picks rejected and applied-with-warnings orders, newest first; and useOrderOutbox({ storeKey, open, transport, deviceId, onBusy?, onOpenError? }), which opens the order store for storeKey, runs its outbox and returns { orders, state, recent, record, flush, requeue }. @tallyui/components gains OrdersList, the "Needs attention" and "Recent" orders with a Retry button, taking orders, onRetry, an optional formatDate (default Intl.DateTimeFormat) and an optional footer. needsAttention joins the pure-function allow-list components may import from @tallyui/pos (ADR-064).

  • #138 f09dbbc Thanks @kilbot! - @tallyui/pos gains useSale, addEntryToCart/CartError and catalogueEntries/findEntryByCode/variantPriceLabel (ADR-052, TV5), lifted from medusapos/app a1b981d's use-sale, lib/cart and lib/catalogue with the same behaviour. useSale takes an optional session, and stamps a completed sale with stampSession before onSaleCompleted; without it, behaviour is unchanged.

  • #151 c664d4b Thanks @kilbot! - New export watchFresh(collection, query): a live list on readFresh instead of a cached find().$, so a write during a query's storage read (RxDB 16.21.1 bug 4) still shows up once its change event arrives. useRegisterSession and useOrderOutbox's recent list now use it.

  • #11 2a05ecb Thanks @kilbot! - Build the product components on the neutral traits. ProductPrice resolves the price list and formats it with Intl in the price's own currency (new currency and locale props; currencySymbol is now only the fallback for an unknown currency). ProductStockBadge reads getStock. ProductImage gains showPlaceholder, an initial tile for products without images. Core adds formatMoney, a traitContext prop on ConnectorProvider for store-level facts like the store currency, and useTraitContext. @tallyui/pos adds searchProducts, name/SKU/barcode search through traits that works the same on every backend.

  • #120 e0062ce Thanks @kilbot! - A per-store order.create capability check replaces the global discount guard (ADR-062). @tallyui/core gains ServerCapabilities, SignInResult.capabilities, SyncContext.capabilities, TallyConnector.capabilities?() and resolveCapabilities(fresh, stored). @tallyui/connector-medusa reads the store's supported order.create versions from GET /tally/v1/info: a 404 or a malformed response means an old plugin (version 1), a network failure or a 5xx is unknown and keeps the last known value, and a 401 throws. medusaSignIn returns the read capabilities, and both Medusa connectors expose capabilities(context) for a restored session. finalizeOrder in @tallyui/pos now rejects a discount only when the store's capability is below 2, so a store whose plugin has caught up finalizes a discounted order as order.create version 2.

  • #17 47b9b4e Thanks @kilbot! - Adds an exact, integer-only tax API: ratePpmFromPercent, taxMicros, roundMicrosToMinor and computeOrderTax. Line tax is kept exactly in micro-minor-units (as a bigint) and rounded once, half away from zero, at the order total. This matches Medusa, which keeps line tax unrounded and rounds only at payment. The existing float tax functions are unchanged for now.

  • #21 64cb5e0 Thanks @kilbot! - Adds the PosOrder document, the neutral record of a completed sale. finalizeOrder turns a fully paid builder Order into a pending PosOrder: UUIDv7 ids, cash change allocated so that payments reconcile to the total exactly, and a refusal of discounted orders until the command contract supports discounts. toOrderCreateEnvelope maps it to the TallyUI Sync Protocol order.create command, posOrderSchema stores it in a pos_orders RxDB collection, and uuidv7 generates RFC 9562 ids.

  • #20 98ea990 Thanks @kilbot! - Breaking (pre-1.0): the order model now uses integer minor units throughout. Order, LineItem, Payment, discounts and ReceiptData money fields carry a Minor suffix (totalMinor, unitPriceMinor, amountMinor, ...). Tax is exact and rounded once per order (the tax/exact API). Lines carry stacked taxLines. The receipt's per-rate tax lines always sum to the charged tax (largest remainder). addProduct prices from getPrices and resolvePrice rather than the deprecated getPrice. The new addLine adds a specific variant at a given price with optional tax rates. Parked orders resume through addLine, with no synthetic traits.

  • #22 55d52fa Thanks @kilbot! - Adds the order outbox. createOrderOutbox sends pending PosOrder documents from the pos_orders collection through the TallyUI Sync Protocol, in batches of up to 10. It applies each result (applied, duplicate or rejected) with guarded patches and never drops a sale: transport failures and responses that make no progress retry forever, with jittered exponential backoff. createHttpCommandTransport posts to /tally/v1/commands with the protocol header, and classifies every non-200 or malformed reply as retryable.

  • #131 fbcaf59 Thanks @kilbot! - addPosOrderCollection(db) is now the way to open pos_orders. It resolves only once every version-0 order has migrated, and on DM4 it rejects after the migration has stopped, keeping every order. RxDB's own open path could report the collection ready before orders written after a rollback had moved, and after a DM4 it rejected at once while the migration carried on, so on SQLite a close could interrupt it on every open.

  • #144 e692c40 Thanks @kilbot! - pos_orders goes to schema version 2 (ADR-032, ADR-065). It adds three optional fields: lateSessionId, and ADR-065's display and taxByRate, which nothing writes yet. Apps must adopt this release's addPosOrderCollection, which migrates pos_orders to version 2 from version 0 or 1 without dropping an order.

    A sale whose session refuses the stamp in useSale().complete() (the session closed or went missing) is no longer stopped, because the money has been taken. It goes on to onSaleCompleted and the receipt with lateSessionId set and no sessionId, so no closure counts it, and a late-sale register fact is recorded. needsAttention now also selects any order with lateSessionId, and OrdersList explains it: "Taken after the register closed. It is not in that register's closure."

  • #39 f2f386c Thanks @kilbot! - The command outbox no longer retries every HTTP error forever. After 3 consecutive 401s it pauses and sets authRequired in its state so the app can ask the cashier to sign in, then resumes on the next flush(). A permanent refusal of a whole batch (400, 403, 413, 415, 422) changes no order: sending pauses with refused: { status, reason } in the state until the next flush(). requeue(orderIds?) moves rejected orders back to pending with a new commandId, except those rejected with idempotency_mismatch, which are left for reconciliation. TransportOutcome gains unauthorized and refused kinds.

  • #94 373e438 Thanks @kilbot! - resolvePrice keeps a price's taxInclusive flag on current and was. Each order-builder line keeps its price's own tax mode (LineItem.taxInclusive, plus priceTaxModeConverted when it differs from the store's pricesIncludeTax), so a customer pays exactly the shelf price and an inclusive price in an exclusive store is no longer taxed twice. Orders whose prices carry no flag, or one that agrees with the store, total exactly as before. The receipt shows a converted line in the order's mode, by its share of the order's once-rounded tax, so the lines still add up.

    In priced mode, the Medusa traits' deprecated getPrice and getRegularPrice return the resolved calculated price instead of the admin prices, and isSellable is false when no variant yields a price (for example a calculated_price with null amounts).

  • #130 516850f Thanks @kilbot! - ReceiptData.totals now comes from order.display (ADR-063), not the settlement fields: subtotalMinor is before discounts and discountMinor is every discount, both in the store's display mode, and a new taxInclusive flag says whether the tax is added or already included. taxMinor and totalMinor are unchanged in value. This is a behaviour change for anything that reads ReceiptData.totals: the receipt's invariant is now Σ lineTotalMinor === totals.subtotalMinor − totals.discountMinor, plus + totals.taxMinor === totals.totalMinor when exclusive, or === totals.totalMinor when inclusive. Receipt lines and each line's own discount row are unchanged, still in the line's own mode.

  • #125 0988fc3 Thanks @kilbot! - Adds the register closure's pure report maths (ADR-032, registers job b1), ported from WCPOS next at 3b5331b5c: settled figures after corrections (deriveSettled, Correction, RecordedFigures), a CSV export of the shown closures (exportCsv), the offline document label keys (labelKeys), and the closures list's scope clamp and row selector (clampClosureScope, selectClosureRows, ClosureScope). Money is a2's integer minor units throughout, and clampClosureScope's history window is a historyDays parameter (default 92, WCPOS's HISTORY_DAYS) instead of a @wcpos/sync-core import.

  • #134 1d13699 Thanks @kilbot! - Add the register's closure and X-report documents (buildClosureDocument, buildXReportDocument, formatClosureDate, ClosureContext) and register facts (RegisterFact, recordRegisterFact), ported from WCPOS next (ADR-032). The documents use WCPOS's own receipt-template envelope shape, so its shipped templates and renderer can be copied in later; a pinned key-tree snapshot against WCPOS's closure fixture guards that shape until then. Facts log through TallyUI's own logger (@tallyui/pos's logging module) instead of @wcpos/utils/logger. minorToDecimal moves out of exportCsv into a shared register helper so both reuse it.

  • #121 9441c26 Thanks @kilbot! - Adds @tallyui/pos's register maths (packages/pos/src/register), ported from WCPOS next at 3b5331b5c (ADR-032, registers job a1): typed-movement validation against the server's paid-in/paid-out/no-sale grammar (movementFieldError, normalizeAmount, isServerDecimal), the register count's variance, threshold, denomination and amount maths (countVariance, overThreshold, denominationTotal, varianceText, validAmount, parseMinor, denominations), and deriveExpected for the float, captured session payments and non-voided paid-in/paid-out cash movements. Refund attribution is deferred until TallyUI has a refund model, so deriveExpected does not yet net refunds against the drawer. All money is TallyUI's integer-minor-units convention, with a required exponent parameter wherever a cashier's typed text becomes minor units (0 for JPY, 2 for GBP, 3 for KWD).

  • #126 45e0b12 Thanks @kilbot! - stampSession(order, sessionId, sessions) is the only way to set a PosOrder's sessionId: it verifies the session is still open or counting before stamping, so a caller that skips requireOpenSession can no longer leave a sale off every Z with an unchecked, closed session id. finalizeOrder no longer takes a sessionId option; stamp its result with stampSession instead.

    recordMovement now takes the closures collection: recordMovement(sessions, movements, closures, input). After inserting a movement, it re-reads the session. If the session closed in the gap, the movement is removed and RegisterSessionClosedError is thrown only when the session's closure row is already frozen without it. If that closure row lists it, the movement is returned as counted. With no closure row yet, the movement is kept and the new, exported RegisterMovementStrandedError is thrown: it carries the movement's id and session_id, and its message can be shown to the cashier as it is. The caller must not record that movement again; registers job c's server resolves stranded movements. A failed remove() throws RegisterMovementStrandedError too, and a failed re-read returns the movement as recorded.

  • #123 a58fcca Thanks @kilbot! - Adds register sessions (ADR-032, registers job a2), ported from WCPOS next at 3b5331b5c: three local-only collections (registerSessionSchema with registerSessionCollection, cashMovementSchema, closureSchema), the session write path (openSession, startCounting, backToSelling, closeSession, recordMovement, voidMovement, requireOpenSession, writeClosure), and the register document for the till's identity, store binding and counters (ensureRegister, bindRegister, nextSaleCounter, mintClosureNumber, advancePerpetual). A PosOrder carries an optional sessionId, set by stampSession and never sent. posOrderSchema is now version 1 (the optional sessionId): create pos_orders with the new posOrderCollection(), which carries its identity migration; with posOrderSchema alone, RxDB refuses the collection.

    A closed session is final: nothing moves it out of closed (RegisterSessionClosedError), a repeat closeSession is a no-op, recordMovement and voidMovement take the sessions collection first and refuse a missing or closed session, and writeClosure refuses a session that is not closed.

  • #105 6281345 Thanks @kilbot! - Orders with a line in its own tax mode now finalize; the server charges each line in its own mode (ADR-038 amendment 2).

  • #74 0121559 Thanks @kilbot! - Removes the unreleased multi-tab database machinery in favour of one live tab per store (ADR-061): CreateDatabaseOptions.multiInstance (createTallyDatabase always passes multiInstance: false), the tally-outbox-flush and tally-outbox-state local documents, and follower forwarding between tabs are all gone. The outbox's public API (flush, requeue, start, stop, state$) and its single-instance behaviour are unchanged. Apps enforce one live tab with startLiveTab.

    @tallyui/storage-sqlite's worker now swallows the ready promise's rejection so a pool install failure before any createStorageInstance call doesn't surface as an unhandled rejection, and its files list no longer publishes test files, matching @tallyui/database and @tallyui/pos.

  • #55 350967d Thanks @kilbot! - Stock reads use the reconciled overlay (ADR-060) and show how fresh it is. @tallyui/core now holds withStockOverlay and getProductStock (@tallyui/pos re-exports them), adds STOCK_LEVELS_LAST_PASS, stockOverlay and stockOverlayAsOf props on ConnectorProvider, and a useProductStock(doc) hook that returns overlay stock plus asOf, or getStock(doc) when no overlay is given. @tallyui/database: startStockReconcile also returns state$ (running, truncated, lastError, lastCompletedAt), reconcileStock() resolves with completedAt, and each successful pass stores { completedAt } in the last-pass local document of stock_levels, which createTallyDatabase now creates with local documents (apps that create the collection themselves use the new stockLevelsCollection config; without local documents a pass rejects with a clear error); a restarted runner seeds lastCompletedAt from it. @tallyui/pos adds stockOverlayAsOf$. ProductStockBadge reads stock through useProductStock and appends " · as of <time>" when an overlay is given (showAsOf={false} hides it).

  • #53 e3b8686 Thanks @kilbot! - Add a stock reconcile pass (ADR-060). @tallyui/core adds the StockReconcileAdapter contract (fetchPages and a pure overlay) and an optional reconcile.stock on TallyConnector. @tallyui/database adds the local-only stock_levels collection (STOCK_LEVELS_COLLECTION, stockLevelsSchema), which createTallyDatabase creates for connectors with reconcile.stock, and startStockReconcile, which re-reads stock every 5 minutes (and on demand through reconcileStock()) into that collection: it writes only changed rows, removes keys the backend no longer returns, writes nothing after a failed, truncated or stopped read, and never writes the replicated products. @tallyui/pos adds stockOverlay$, withStockOverlay and getProductStock, which read stock from the overlay where it has an entry and from the replicated product otherwise. The Vendure connector reconciles variant stockLevels, and the Medusa connector reconciles inventory item location levels, so stock changes that bump no product timestamp reach the POS.

  • #106 e7d3033 Thanks @kilbot! - @tallyui/pos adds the neutral store-settings bootstrap every platform POS shares. resolveStoreSettings reads the app's stored choice, calls connector.storeSettings, returns choose with the choices on choice_required (the tried choice as initial), and saves a new pick only once it resolves. useStoreSettings wraps it as a hook that re-resolves on a store switch and discards stale results, with choose(choice) and retry(). withPricingContext and taxProviderProps map the settings into the replication's SyncContext and <TaxProvider>. The app keeps persistence through loadChoice and saveChoice.

  • #118 5bcabfb Thanks @kilbot! - Add the tender reducer, ported from WCPOS next at test parity: an integer-minor-unit keypad, cash change, quick tender amounts, and even/fixed/percentage/item split plans. tenderReducer, initTenderState, initialTenderState, appliedMinor, changeMinor, quickTenderedAmounts, evenSplitShareMinor, activePlan, planLegs and MAX_TENDER_MINOR are exported from @tallyui/pos, along with their state and action types. WCPOS's WooCommerce-only legacy tab (TenderTab, the tab field, set-tab) is dropped as platform-specific; PaymentTransport is redefined locally as the same hardware transport union. No screens: those come with the TV6 components lift and the app.

  • #104 bc46d99 Thanks @kilbot! - ProductGrid hides products this channel doesn't sell (traits.isSellable false, for example a Medusa product outside the sales channel) unless showUnsellable is set, and ProductCard shows such a product in a muted "Not sold here" state instead of its price. OrderBuilder.addProduct now refuses an unsellable product before looking up its price, instead of throwing the unrelated "No price in …" error.

  • #143 fb6c2e3 Thanks @kilbot! - Add useRegisterSession, the till's register session as React state with its actions (open, count, back to selling, close, cash movements, voids). The app supplies every input. Expected cash and the sales count are derived locally from pos_orders, and nothing is sent to a server. requireOpen() gates tender. RegisterTenderInProgressError stops counting or closing during a sale at tender, RegisterSessionAlreadyOpenError stops a second open, and RegisterCloseIncompleteError stops an open until an interrupted close is finished. A resumed close uses the count saved on the session.

Patch Changes

  • #155 96bf8f7 Thanks @kilbot! - addPosOrderCollection(db): when a close stops waiting (after POS_ORDER_MIGRATION_CLOSE_WAIT_MS) while the migration still runs, the migration no longer writes into the stores the close closes. On SQLite it used to fail with a raw SQLite.bulkWrite() already closed and an unhandled rejection, and left the SQLite handle unable to write until restart. The open now rejects with PosOrderOpenClosedError (code: 'POS_ORDER_OPEN_CLOSED'), and the next open on the same database migrates every order.

    The status writes such an open drops are logged at warn through the new exported posOrdersLogger (scope pos-orders), and a close that gives up once the migration is done, while the open reads its status, also rejects with PosOrderOpenClosedError.

  • #174 160252c Thanks @kilbot! - ClosureSheet shows who approved the close (Approved by {name}, falling back to the approver id without a name) under the figures, blind or not — it's provenance, not a counted figure. RegisterColumn offers "Finish closing" when useRegisterSession's session is closed but its closure row was never written (an interrupted close), resuming the close (the store keeps the count persisted on the session) instead of falling through to the cart, where openSession would otherwise refuse with RegisterCloseIncompleteError. buildClosureDocument's return type now carries closure.unsynced_count: number and each movement's id/reason as string, without a cast; no runtime output changed.

  • #147 cbda7e0 Thanks @kilbot! - useSale() follow-ups to #145's idempotent complete(): the sale now locks from complete()'s entry (saving true, every change refused with SALE_SAVING), not only once the order is built and stamped — so Back, an edit or cancelTender() during the session stamp is refused, and a finalizeOrder refusal before any order is built still unlocks the sale with the refusal's error, as before. newSale() now also clears the in-flight save's tracking and stamps a new generation: a hung save's late outcome can no longer make the next sale's complete() quietly share its promise, and an attempt still building or stamping when newSale() lands can no longer install its order as the new sale's pending completion — that order still reaches onSaleCompleted once it's built, since the money is already taken; only a throw from that background call is new, logged at error rather than shown to the new sale. The order outbox's run() now checks the stored order's commandId before marking it sent or rejected (not only its syncStatus), and reads it with a primary-key lookup straight on the storage instance instead of a full index scan, so an order requeued under a new commandId while its old command was in flight can't take the old result.

  • #145 e103c71 Thanks @kilbot! - useSale().complete() is idempotent for one tender. It builds the order once per tender attempt and keeps it as the pending completion. A retry after onSaleCompleted throws hands over the same order (the same id, commandId and createdAt, with no second session stamp or late-sale fact), so a save that failed after storing the order no longer queues a duplicate sale. A second complete() while one is in flight (a double tap) returns the first call's promise instead of building a second order, and complete() on the receipt does nothing. While a completion is pending, the new saving flag is true and the sale is locked: add, setQuantity, remove, applyDiscount, removeDiscount, setTender, startTender and cancelTender change nothing and set the error "This sale is being saved. Retry to finish it." newSale() abandons it, and leaves any order already stored in pos_orders untouched. useOrderOutbox().record treats an order already stored under the same commandId as stored, and still flushes; the same id under another commandId still rejects.

  • #129 350dd72 Thanks @kilbot! - Stacked line discounts now record what each one actually removed, capped at what the earlier discounts on the same line left, instead of the discount's raw computed amount. A line's discountMinor is unchanged; only the per-discount amountMinor breakdown the receipt will print is corrected (#63).

  • #152 7e489e0 Thanks @kilbot! - addPosOrderCollection(db): a close now waits for the whole open (up to POS_ORDER_MIGRATION_CLOSE_WAIT_MS), not only its migration. A close that landed while the open added the collection or reset the migration checkpoint used to close storage under it; on SQLite the open then failed with rxdb-premium's raw ReferenceError: context is not defined. An open called on a database whose close has begun, or one the close stopped waiting for, now stops before any further write and rejects with the new exported PosOrderOpenClosedError (code: 'POS_ORDER_OPEN_CLOSED'): reopen and call it again.

  • #133 f67535d Thanks @kilbot! - addPosOrderCollection(db) follow-ups from the #131 review: a close no longer waits forever on a stuck migration (it gives up after POS_ORDER_MIGRATION_CLOSE_WAIT_MS, 10s, leaving the worst case an ERROR status the next open safely resets and retries); it refuses a multiInstance database up front, before any reset, since the reset can race a second tab's migration (TallyUI is single-instance, ADR-061); and repeated DM4 retries on the same database no longer add another db.onClose handler each time, only ever one.

  • #135 d921415 Thanks @kilbot! - addPosOrderCollection no longer lets a failed migration run's replication outlive the run (RxDB's cancel() never stops it), so rapid DM4 retries on the same database raise no unhandled removed already rejection. A version-0 order whose version-1 copy is stale (for example, sent by a rolled-back build after a failed run copied it as pending) now migrates with its newer version-0 state instead of losing to the stale copy or looping in RxDB's conflict handling.

  • #95 f1af98c Thanks @kilbot! - OrderCreateLine gains an optional taxInclusive (ADR-038 amendment 2). It is the line's own tax mode, sent only when that mode differs from the order's pricesIncludeTax. Single-mode orders produce byte-identical payloads. finalize still rejects converted lines until the Medusa plugin honours the field.

  • #158 a7fdde8 Thanks @kilbot! - A sale stamped with a register session that then closed, and stored after that session's closure was frozen without it, no longer sits on no Z. The new sweepOrphanStamps turns each such order into a late sale: it removes sessionId, sets lateSessionId and logs one late-sale fact. It never changes the closure, an order the closure lists, an order whose session has no closure yet, a late order or another register's orders. useRegisterSession runs it on start, after each close's closure, and whenever a new closure appears. voidMovement takes an optional closures collection and re-reads the session after its writes. If the session closed meanwhile and no closure lists the reversal, it throws RegisterMovementStrandedError, and it always does so when closures isn't passed. The reversal is kept either way.

  • #146 5e5ba11 Thanks @kilbot! - The order outbox reads its pending batch, its pending count and the rejected orders to requeue straight from the storage, past RxDB's query cache. In RxDB 16.21.1 a sale inserted while a cached query's storage read was in flight never reached that query, so the outbox left it unsent until the app restarted. Before patching a sent order, the outbox now checks the order's stored state the same way, because a findOne(id) can go stale too. New exports readFresh(collection, query) and countFresh(collection, selector) do these reads.

  • #38 6444868 Thanks @kilbot! - uuidv7() with no arguments is now monotonic: ids made in the same millisecond, or after the clock steps back, still sort strictly after the previous one (RFC 9562 monotonic random counter). Calls with an explicit timestamp or random source are unchanged.

  • #51 7502d61 Thanks @kilbot! - addProduct charges the chosen variant's price (and SKU) instead of the first variant's; an unknown variant id throws. requeue() re-checks each order's status inside the write, so it never re-pends an order that is no longer rejected.

  • #157 125c85a Thanks @kilbot! - readFresh, countFresh and watchFresh move to a new, side-effect-free subpath, @tallyui/core/rxdb. Core now lists rxdb (>=16) and rxjs (>=7) as optional peer dependencies, needed only by that subpath; core's main entry stays free of both. @tallyui/pos re-exports the helpers unchanged. The id and fingerprint reconciles in @tallyui/database read the local products with readFresh instead of a cached find(), so a product the pull inserts or deletes while a pass reads them no longer leaves every later pass reading a stale list (RxDB 16.21.1 bug 4): an inserted product is now checked, and tombstoned or re-fetched, on the next pass, and a deleted one is no longer re-enqueued or counted towards the mass-delete brake.

  • #128 b32d1b4 Thanks @kilbot! - Resuming a parked order now keeps each line's own tax mode (taxInclusive) instead of falling back to the store's mode. Previously a parked mixed cart came back with every line priced in the store's mode, changing both the settlement figures (subtotalMinor, discountMinor, taxMinor, totalMinor) and the display figures from the ones the cashier parked.

  • #170 93ed2cc Thanks @kilbot! - useSale now stamps the session in force when the tender started (startTender), pinned for that tender, instead of reading its session option at complete() time. A session closed between startTender and complete() (so the app's saleSession went undefined) previously skipped the stamp entirely: the order got neither sessionId nor lateSessionId and no late-sale fact. It now becomes a late sale on the pinned session. A tender started with no session stays unstamped, even if a session appears before complete(). The pin is dropped by cancelTender() and newSale().

  • #156 244bb46 Thanks @kilbot! - stampSession, recordMovement and voidMovement check that the session is live with a primary-key storage read instead of a cached findOne, and so does recordMovement's re-read after its insert. A session closed by a write that skips that cached query, as a server sync would, is no longer taken as open until the app restarts.

  • #150 a9a4525 Thanks @kilbot! - useSale().newSale() now refuses (with the saving error, changing nothing) while a complete() attempt is still building or stamping its order — not only once a pending completion exists. Previously that window let newSale() abandon the attempt and start a new sale at once, handing the built order to onSaleCompleted in the background once it finished; a failure there was money taken with only an error log. Now the cashier waits for the short stamp, then gets Retry or Continue as usual, and abandoning a save is possible only once its order is confirmed stored (continueSale()) or from the receipt. The generation-mismatch hand-over this replaces, and handOverAbandoned, are removed. Also fixes three gaps the #149 review found no test caught: complete() now clears a stale canContinue at every new attempt's entry (including a Retry after Continue was offered), and a confirmation from isStored that arrives after the completion is no longer pending, or after a newer attempt has started, no longer sets canContinue.

  • #160 787cada Thanks @kilbot! - The orphan-stamp sweep (sweepOrphanStamps, ADR-032) is now bounded by a swept_closure_ids set on the register document: a closure it has already checked costs no pos_orders query, and the set needs no schema bump. It now takes register and storeKey, as writeClosure does. A closure joins the set only once it is older than the new SWEEP_GRACE_MS, so an insert racing a close still gets caught; useRegisterSession runs a full sweep (ignoring the set) once on start to repair anything a save that outlasts the grace missed. closeSession already awaited its own sweep before returning; that is now covered by a test. voidMovement's closure lookup is now a primary-key storage read, for consistency with readSession.

  • #172 3e63452 Thanks @kilbot! - useSale's startTender takes the confirmed session (startTender(method, { session })) and pins it instead of the rendered session option, which can lag a session opened just before the tender. useRegisterSession adds requireSaleSession(): requireOpen(), returning { id, sessions } to pass to startTender. A tender that pinned no session, with a session rendered by complete(), now stamps that current session and logs a warning, instead of leaving the order unstamped.

  • #166 07e0198 Thanks @kilbot! - varianceText puts the direction in the word only: "€100.00 short", "€5.00 over", "Exact", without a leading sign (a signed "−€100.00 short" read as a double negative).

  • #153 38df38a Thanks @kilbot! - watchFresh re-reads once per bulk write instead of once per document: it listens to collection.eventBulks$ rather than the per-document collection.$, so a bulkInsert of 100 documents costs one storage read, not 100. (RxDB Premium's SQLite storage splits a write into batches of 199 documents and emits one event per batch, so a larger write costs one read per batch.)

@tallyui/theme

Patch Changes

  • #88 5053527 Thanks @kilbot! - no longer publishes test files

  • #36 d1bc892 Thanks @kilbot! - Light theme contrast: primary darkened to #5b5ef0 (white text 4.88:1), muted-foreground to #656c79 and input to #848a94 (control borders ≥ 3:1). Product cards and quick-tender buttons get borders, and components no longer use the undefined bg-surface-alt or text-muted text classes, so labels such as "Change Due" are legible.

  • #37 12b7723 Thanks @kilbot! - Status colours pass WCAG AA with their foregrounds: light success #047857, warning #b45309, info #2563eb (and price #047857). Dark theme: input borders #636c76 (≥ 3:1), border #3d444d, and destructive text is dark (#0d1117) on the red. The contrast test now covers status colours and the dark theme.

  • #31 78cada7 Thanks @kilbot! - tokens.css now defines the light theme in a @variant light block, alongside @variant dark. Uniwind requires every theme to set the same variables, so apps using Uniwind no longer print 27 "Theme light is missing variable" errors per bundle. The file also declares the light custom variant, so it still compiles with plain Tailwind 4. Colour values are unchanged.

@tallyui/connector-woocommerce

Major Changes

  • #15 807d8da Thanks @kilbot! - Product replication adapters are now pull-only. The push handler is removed from medusaProductReplication, wooProductReplication, vendureProductReplication and shopifyProductReplication. Catalogue data is server-owned, so the POS never writes products. The old push handlers also turned every HTTP or network error into a fake conflict, which made RxDB silently revert local edits.

    This removes a public member. Nothing in TallyUI called it, but code that called adapter.push directly must stop doing so.

Minor Changes

  • #11 f90e59d Thanks @kilbot! - Add backend-neutral price and stock traits. ProductTraits gains getPrices (a price list of integer minor-unit Money entries, base or sale, per currency) and getStock (in_stock | out_of_stock | backorder | unknown plus an optional quantity). Core adds resolvePrice, moneyFromMajor, moneyToMajor and minorUnitDigits. Every connector maps its own shape into them; WooCommerce's instock/outofstock/onbackorder strings now stay inside the WooCommerce connector. The string-price and WooCommerce-style stock accessors remain and are deprecated.

  • #11 bc0a224 Thanks @kilbot! - Add isSellable and getVariantCount product traits to core and all four connectors.

Patch Changes

@tallyui/connector-medusa

Major Changes

  • #15 807d8da Thanks @kilbot! - Product replication adapters are now pull-only. The push handler is removed from medusaProductReplication, wooProductReplication, vendureProductReplication and shopifyProductReplication. Catalogue data is server-owned, so the POS never writes products. The old push handlers also turned every HTTP or network error into a fake conflict, which made RxDB silently revert local edits.

    This removes a public member. Nothing in TallyUI called it, but code that called adapter.push directly must stop doing so.

Minor Changes

  • #54 50317c8 Thanks @kilbot! - Connectors can sign a user in: ConnectorAuth gains an optional signIn(baseUrl, { email, password }, init?) that resolves to a SignInResult (token, optional ISO 8601 expiresAt) and rejects with a SignInError whose code is invalid_credentials, unsupported or failed. The app stores the token and passes it back to getHeaders as token.

    Vendure's auth gains a sign-in flow: it runs the Admin API login mutation and takes the token from the vendure-auth-token header (the server's tokenMethod must include 'bearer'). Its fields are now url, email, password and an optional channel_token. getHeaders sends credentials.api_key as vendure-api-key, otherwise credentials.token as a Bearer token, plus vendure-token when channel_token is set. The old auth_token credential is still accepted as a deprecated alias for token.

    Medusa's medusaAdminUserAuth signs in through POST /auth/user/emailpass and reads expiresAt from the JWT's exp. medusaSecretKeyAuth has no sign-in.

  • #85 609ebd8 Thanks @kilbot! - Add the fingerprint reconcile (ADR-060 amendment 8): a neutral runner that compares a remote fingerprint per product against the local documents and re-delivers products whose fingerprint differs, through the collection's pull. @tallyui/core adds the FingerprintReconcileAdapter contract (fetchPages, a pure fingerprint and enqueue) and an optional reconcile.prices on TallyConnector. @tallyui/database adds startFingerprintReconcile, which runs no pass at start by default and otherwise mirrors the id reconcile: a complete, successful pass only, state$ (running, lastResult, lastError), and stop(). @tallyui/connector-medusa adds reconcile.prices, a nightly base-price backstop (MEDUSA_PRICE_RECONCILE_INTERVAL_MS) for the variant feed (ADR-060 job D1): it fingerprints each product's base prices (variant id, currency and amount, sorted, price-list prices excluded) from /admin/product-variants. Nothing is written locally; corrections arrive only through the reconcile feed's pull.

  • #35 63f11fa Thanks @kilbot! - Add a Bearer credential type for Medusa admin users: medusaAdminUserAuth sends the JWT from emailpass sign-in as Authorization: Bearer <jwt>, and medusaAdminUserConnector is medusaConnector with that auth. The secret-key auth is now also exported as medusaSecretKeyAuth; medusaConnector is unchanged.

  • #92 945bb83 Thanks @kilbot! - Medusa prices as Medusa charges them (ADR-060 D2b). SyncContext gains an optional pricingContext (from storeSettings()), ProductPrice an optional taxInclusive, and TallyConnector.reconcile a calculatedPrices slot. With a pricing context, every Medusa product document build fills each variant's calculated_price from the store API (null when the sales channel or region does not sell it), and the traits price from it: sale lists as a sale against the original price, override lists as the base price, null as unsellable. reconcile.calculatedPrices re-delivers products whose calculated prices changed with no timestamp bump; run it every MEDUSA_CALCULATED_PRICE_RECONCILE_INTERVAL_MS (30 minutes) with maxPages: 1000. Without a pricing context, documents and prices are unchanged.

  • #63 d9fe1e3 Thanks @kilbot! - Fix the Medusa connector's incremental pull: Medusa 2.21 honours only the operator form updated_at[$gte], and silently ignored the connector's updated_at[gte], so every pass read the whole catalogue. Add the Medusa id reconcile (ADR-060), so a deleted product or a deleted variant (whose parent's updated_at does not change) now reaches the local copy through replication.products and reconcile.ids. @tallyui/database adds a mass-deletion brake to startIdReconcile: a pass that would tombstone more than maxDeleteShare (default 20%) of local products, and more than 10 of them, queues nothing and warns instead, unless allowMassDelete is set.

  • #102 7490a3f Thanks @kilbot! - A connector schema version bump now drops and resyncs its collection (ADR-060 amendment 9). createTallyDatabase adds RxDB's migration-schema plugin and gives each connector collection above version 0 a v => null strategy per earlier version, and startReplication appends -v<version> to the replication identifier above version 0, so the pull starts from no checkpoint. Version 0 collections keep their identifier and never resync. stock_levels and pos_orders are untouched.

    The Medusa products schema is now version 1 and declares variants[].calculated_price (object or null). The first sync after upgrading resyncs the Medusa catalogue: the stored products are dropped when the database opens and download again, once, on the first sync. A collection created with medusaProductSchema outside createTallyDatabase must use connectorCollection(medusaProductSchema) from @tallyui/database, which supplies the strategies and the migration plugin; otherwise RxDB throws COL12.

  • #89 4c2cf8f Thanks @kilbot! - medusaConnector.storeSettings (TV4b) reads Medusa's admin API only: the resolved region's currency and price-preference tax inclusivity, the resolved country's tax region default rate (rounded to integer ppm once, at the connector's edge; 0 with no tax region or no default rate, matching what Medusa's system provider itself charges), and a pricingContext (region_id, currency_code, publishable_key) for pricing through the store API. Region, then country, then channel (the publishable key, excluding revoked ones): the first ambiguity reports every choice known at that point, as StoreSettingsError('choice_required'), so the app asks once; a store with no publishable key at all rejects with StoreSettingsError('failed'). The publishable key is a public credential and may sit in pricingContext, but never appears in an error message, choices, or console output.

  • #81 03cd385 Thanks @kilbot! - Medusa's replication.products now includes a variant feed, so price edits arrive incrementally. Medusa 2.21 bumps a variant's updated_at on a price-only edit but not its product's, so the product feed alone missed those changes. The variant feed pages changed variants and re-delivers their parent products. The first sync after upgrading re-delivers every product once.

  • #11 f90e59d Thanks @kilbot! - Add backend-neutral price and stock traits. ProductTraits gains getPrices (a price list of integer minor-unit Money entries, base or sale, per currency) and getStock (in_stock | out_of_stock | backorder | unknown plus an optional quantity). Core adds resolvePrice, moneyFromMajor, moneyToMajor and minorUnitDigits. Every connector maps its own shape into them; WooCommerce's instock/outofstock/onbackorder strings now stay inside the WooCommerce connector. The string-price and WooCommerce-style stock accessors remain and are deprecated.

  • #120 e0062ce Thanks @kilbot! - A per-store order.create capability check replaces the global discount guard (ADR-062). @tallyui/core gains ServerCapabilities, SignInResult.capabilities, SyncContext.capabilities, TallyConnector.capabilities?() and resolveCapabilities(fresh, stored). @tallyui/connector-medusa reads the store's supported order.create versions from GET /tally/v1/info: a 404 or a malformed response means an old plugin (version 1), a network failure or a 5xx is unknown and keeps the last known value, and a 401 throws. medusaSignIn returns the read capabilities, and both Medusa connectors expose capabilities(context) for a restored session. finalizeOrder in @tallyui/pos now rejects a discount only when the store's capability is below 2, so a store whose plugin has caught up finalizes a discounted order as order.create version 2.

  • #11 bc0a224 Thanks @kilbot! - Add isSellable and getVariantCount product traits to core and all four connectors.

  • #57 55ae68f Thanks @kilbot! - SignInErrorCode splits the old failed in two: failed now means no response arrived (a network error), and the new server_error means a response arrived but was unusable (a bad status, a malformed body, or a missing token). SignInError gains an optional status from a third constructor argument. Callers that switch on code should handle server_error.

    Medusa's sign-in now treats mfa_required: true and verification_required: true the same as a location body: unsupported, and no token is ever returned from a body like that. A malformed response body, any other non-OK status and a missing or non-string token are now server_error with the HTTP status.

    Vendure's sign-in now treats NATIVE_AUTH_STRATEGY_ERROR as unsupported, since native email/password auth is disabled on the server. A malformed response body, a non-OK status, GraphQL errors, a missing data.login and any other ErrorResult are now server_error with the HTTP status.

  • #64 402ec36 Thanks @kilbot! - Both connectors now store a product's variants sorted by id, since neither Medusa nor Vendure guarantees variant order across requests: @tallyui/core adds compareIds, and the Medusa and Vendure product projections (toDocument, toProductDocument) sort variants with it before the document is stored. Traits that read variants[0] (getPrices, getSku, getPrice, getStockQuantity, getBarcode and others) now see a stable variant across runs.

    Already-stored documents take the new order the next time they are delivered. Vendure's variant feed re-delivers every product on its first pass anyway, so it heals immediately.

  • #53 e3b8686 Thanks @kilbot! - Add a stock reconcile pass (ADR-060). @tallyui/core adds the StockReconcileAdapter contract (fetchPages and a pure overlay) and an optional reconcile.stock on TallyConnector. @tallyui/database adds the local-only stock_levels collection (STOCK_LEVELS_COLLECTION, stockLevelsSchema), which createTallyDatabase creates for connectors with reconcile.stock, and startStockReconcile, which re-reads stock every 5 minutes (and on demand through reconcileStock()) into that collection: it writes only changed rows, removes keys the backend no longer returns, writes nothing after a failed, truncated or stopped read, and never writes the replicated products. @tallyui/pos adds stockOverlay$, withStockOverlay and getProductStock, which read stock from the overlay where it has an entry and from the replicated product otherwise. The Vendure connector reconciles variant stockLevels, and the Medusa connector reconciles inventory item location levels, so stock changes that bump no product timestamp reach the POS.

  • #19 8df0569 Thanks @kilbot! - Adds variant traits. VariantSummary (id, title, sku, barcode, prices, stock) and the optional ProductTraits.getVariants describe every purchasable variant of a product, and findVariantByCode finds a variant by barcode or SKU for scanning. The Medusa connector implements getVariants; its product-level getPrices and getStock results are unchanged.

Patch Changes

  • #48 6b1b0b7 Thanks @kilbot! - Product replication no longer loses updates inside RxDB's replication loop: a pass ends on the list count, the next pass starts from a high-water mark read at the pass start, an unchanged mark ends the loop, and a pass restarts if rows vanish mid-pass.

  • #97 f8b0dac Thanks @kilbot! - A fresh install downloads the catalogue once. A pull adapter can now declare pull.seedCheckpoint; on a fresh install (no stored checkpoint) combinePullAdapters reads every seed before any feed runs and starts that feed from it. The Medusa and Vendure variant feeds seed their cursor at the newest variant's updated_at, so their first pass no longer re-delivers every product the product feed has just delivered, and a variant edit made during the product feed's first pass still arrives. An install upgrading from a stored checkpoint is never seeded and keeps the variant feed's full healing pass.

  • #98 9cd78cd Thanks @kilbot! - medusaStoreSettings's choice_required channel choices are named after the publishable key's sales channel(s) (joined with ", " when there is more than one), not the key's own developer-facing title. A key with no sales channel, or only blank channel names, still falls back to its title.

  • #11 4e6261f Thanks @kilbot! - Fix product replication skipping a page of products per batch: the checkpoint now keeps its updated_at filter fixed while paging and only advances it at the end of a pass.

  • #11 ffa9f19 Thanks @kilbot! - Fix the Medusa connector against a real Medusa v2 (2.21) backend: send the secret API key over HTTP Basic auth (Medusa rejects it as a Bearer token), read prices as major units (v2 does not store cents), derive stock from inventory levels (the Admin API does not compute inventory_quantity), and pull products in updated_at order so the checkpoint is valid.

  • #111 35a3fba Thanks @kilbot! - A chosen country outside the region is reported as choice_required instead of silently using the region's only country.

  • #11 60230f0 Thanks @kilbot! - Make the Medusa product schema load under RxDB dev-mode (indexed handle and status are now required with a maxLength), keep pulled documents to the schema's fields so new Medusa API fields never fail validation, and page each replication pass in id order, since many products share an updated_at.

  • #88 5053527 Thanks @kilbot! - no longer publishes test files

  • #94 373e438 Thanks @kilbot! - resolvePrice keeps a price's taxInclusive flag on current and was. Each order-builder line keeps its price's own tax mode (LineItem.taxInclusive, plus priceTaxModeConverted when it differs from the store's pricesIncludeTax), so a customer pays exactly the shelf price and an inclusive price in an exclusive store is no longer taxed twice. Orders whose prices carry no flag, or one that agrees with the store, total exactly as before. The receipt shows a converted line in the order's mode, by its share of the order's once-rounded tax, so the lines still add up.

    In priced mode, the Medusa traits' deprecated getPrice and getRegularPrice return the resolved calculated price instead of the admin prices, and isSellable is false when no variant yields a price (for example a calculated_price with null amounts).

  • #11 b1b6e30 Thanks @kilbot! - Report product-level stock across all variants, showing the total quantity only when every variant has tracked, known stock. Draw the search magnifier with an attached, rounded handle and a larger ring.

@tallyui/connector-shopify

Major Changes

  • #15 807d8da Thanks @kilbot! - Product replication adapters are now pull-only. The push handler is removed from medusaProductReplication, wooProductReplication, vendureProductReplication and shopifyProductReplication. Catalogue data is server-owned, so the POS never writes products. The old push handlers also turned every HTTP or network error into a fake conflict, which made RxDB silently revert local edits.

    This removes a public member. Nothing in TallyUI called it, but code that called adapter.push directly must stop doing so.

Minor Changes

  • #11 f90e59d Thanks @kilbot! - Add backend-neutral price and stock traits. ProductTraits gains getPrices (a price list of integer minor-unit Money entries, base or sale, per currency) and getStock (in_stock | out_of_stock | backorder | unknown plus an optional quantity). Core adds resolvePrice, moneyFromMajor, moneyToMajor and minorUnitDigits. Every connector maps its own shape into them; WooCommerce's instock/outofstock/onbackorder strings now stay inside the WooCommerce connector. The string-price and WooCommerce-style stock accessors remain and are deprecated.

  • #11 bc0a224 Thanks @kilbot! - Add isSellable and getVariantCount product traits to core and all four connectors.

Patch Changes

  • #88 5053527 Thanks @kilbot! - no longer publishes test files

  • #11 b1b6e30 Thanks @kilbot! - Report product-level stock across all variants, showing the total quantity only when every variant has tracked, known stock. Draw the search magnifier with an attached, rounded handle and a larger ring.

@tallyui/connector-vendure

Major Changes

  • #15 807d8da Thanks @kilbot! - Product replication adapters are now pull-only. The push handler is removed from medusaProductReplication, wooProductReplication, vendureProductReplication and shopifyProductReplication. Catalogue data is server-owned, so the POS never writes products. The old push handlers also turned every HTTP or network error into a fake conflict, which made RxDB silently revert local edits.

    This removes a public member. Nothing in TallyUI called it, but code that called adapter.push directly must stop doing so.

Minor Changes

  • #54 50317c8 Thanks @kilbot! - Connectors can sign a user in: ConnectorAuth gains an optional signIn(baseUrl, { email, password }, init?) that resolves to a SignInResult (token, optional ISO 8601 expiresAt) and rejects with a SignInError whose code is invalid_credentials, unsupported or failed. The app stores the token and passes it back to getHeaders as token.

    Vendure's auth gains a sign-in flow: it runs the Admin API login mutation and takes the token from the vendure-auth-token header (the server's tokenMethod must include 'bearer'). Its fields are now url, email, password and an optional channel_token. getHeaders sends credentials.api_key as vendure-api-key, otherwise credentials.token as a Bearer token, plus vendure-token when channel_token is set. The old auth_token credential is still accepted as a deprecated alias for token.

    Medusa's medusaAdminUserAuth signs in through POST /auth/user/emailpass and reads expiresAt from the JWT's exp. medusaSecretKeyAuth has no sign-in.

  • #45 14620d9 Thanks @kilbot! - Fix Vendure product pagination with fixed timestamp windows and ID ordering. Add an opt-in barcode field and stock-location configuration, use available stock from stockLevels, and support the Admin API in the mock.

    Complete pull passes using totalItems, restart empty mid-pass pages, and use a pass-start high-water mark with idle detection to preserve updates in RxDB replication. Include GraphQL error messages on failed HTTP responses. Existing users must set barcodeField to read barcodes: getBarcode now returns undefined unless barcodeField is configured.

    Guard each pull pass against skewed Vendure updatedAt filters and add updatedAtSkewMs to widen lower bounds when the server cannot run with TZ=UTC.

  • #58 3e09957 Thanks @kilbot! - Add combinePullAdapters to @tallyui/core: it combines several pull adapters into the one adapter a collection replicates with, calling them one after another with a checkpoint per sub-adapter. Two replications on one collection can skip each other's pulled versions, so run one per collection.

    Vendure's replication.products now includes a variant feed that re-delivers parent products whose variants changed. Vendure does not bump Product.updatedAt on a variant price or stock edit, so the product feed alone misses those changes. An existing install's product-feed checkpoint carries over; the variant feed runs one full pass on first sync.

  • #50 2424107 Thanks @kilbot! - Add variant summaries for barcode scanning and variant pickers. Add a pricesIncludeTax option, defaulting to false, so product and variant prices use net amounts by default and gross amounts for tax-inclusive channels.

  • #61 540044c Thanks @kilbot! - Add the id reconcile (ADR-060): a periodic pass that reads every live product id and its live variant ids, so a deleted product or a deleted variant (whose parent's updatedAt does not change) reaches the local copy. @tallyui/core adds the IdReconcileAdapter contract and createReconcileFeed, which turns queued corrections into a pull-only adapter meant as the last key of combinePullAdapters. @tallyui/database adds the startIdReconcile runner. @tallyui/connector-vendure implements the Vendure side and wires it into replication.products and reconcile.ids. Nothing is written locally into the replicated collection; corrections arrive only through the collection's own pull.

  • #11 f90e59d Thanks @kilbot! - Add backend-neutral price and stock traits. ProductTraits gains getPrices (a price list of integer minor-unit Money entries, base or sale, per currency) and getStock (in_stock | out_of_stock | backorder | unknown plus an optional quantity). Core adds resolvePrice, moneyFromMajor, moneyToMajor and minorUnitDigits. Every connector maps its own shape into them; WooCommerce's instock/outofstock/onbackorder strings now stay inside the WooCommerce connector. The string-price and WooCommerce-style stock accessors remain and are deprecated.

  • #11 bc0a224 Thanks @kilbot! - Add isSellable and getVariantCount product traits to core and all four connectors.

  • #57 55ae68f Thanks @kilbot! - SignInErrorCode splits the old failed in two: failed now means no response arrived (a network error), and the new server_error means a response arrived but was unusable (a bad status, a malformed body, or a missing token). SignInError gains an optional status from a third constructor argument. Callers that switch on code should handle server_error.

    Medusa's sign-in now treats mfa_required: true and verification_required: true the same as a location body: unsupported, and no token is ever returned from a body like that. A malformed response body, any other non-OK status and a missing or non-string token are now server_error with the HTTP status.

    Vendure's sign-in now treats NATIVE_AUTH_STRATEGY_ERROR as unsupported, since native email/password auth is disabled on the server. A malformed response body, a non-OK status, GraphQL errors, a missing data.login and any other ErrorResult are now server_error with the HTTP status.

  • #64 402ec36 Thanks @kilbot! - Both connectors now store a product's variants sorted by id, since neither Medusa nor Vendure guarantees variant order across requests: @tallyui/core adds compareIds, and the Medusa and Vendure product projections (toDocument, toProductDocument) sort variants with it before the document is stored. Traits that read variants[0] (getPrices, getSku, getPrice, getStockQuantity, getBarcode and others) now see a stable variant across runs.

    Already-stored documents take the new order the next time they are delivered. Vendure's variant feed re-delivers every product on its first pass anyway, so it heals immediately.

  • #53 e3b8686 Thanks @kilbot! - Add a stock reconcile pass (ADR-060). @tallyui/core adds the StockReconcileAdapter contract (fetchPages and a pure overlay) and an optional reconcile.stock on TallyConnector. @tallyui/database adds the local-only stock_levels collection (STOCK_LEVELS_COLLECTION, stockLevelsSchema), which createTallyDatabase creates for connectors with reconcile.stock, and startStockReconcile, which re-reads stock every 5 minutes (and on demand through reconcileStock()) into that collection: it writes only changed rows, removes keys the backend no longer returns, writes nothing after a failed, truncated or stopped read, and never writes the replicated products. @tallyui/pos adds stockOverlay$, withStockOverlay and getProductStock, which read stock from the overlay where it has an entry and from the replicated product otherwise. The Vendure connector reconciles variant stockLevels, and the Medusa connector reconciles inventory item location levels, so stock changes that bump no product timestamp reach the POS.

  • #87 ac2a24a Thanks @kilbot! - TallyConnector gains an optional storeSettings(context, choice?) (TV4): one read-only call for the store's currency, pricesIncludeTax, taxRatesPpm and an opaque connector-specific pricingContext, so the app can feed the connector's own tax-inclusivity option and the POS TaxProvider from a single source of truth instead of two hand-matched settings. Rejects with a StoreSettingsError (choice_required with choices, or failed).

    Vendure's storeSettings reads the active channel's currency and pricesIncludeTax, and the default tax zone's enabled, non-customer-group rates keyed by tax category id (rounded to integer ppm once, at the connector's edge). default is the isDefault category's rate, or, when none is flagged, the first category Vendure's own taxCategories lists — the same fallback Vendure uses for a variant created without a category — and is 0 when that category has no rate in the zone. createVendureConnector's pricesIncludeTax option is unchanged; pass settings.pricesIncludeTax from storeSettings instead of hand-matching it to the POS.

  • #112 8a3f323 Thanks @kilbot! - Adds a nightly price reconcile pass (reconcile.prices), a fingerprint backstop for tax-rate changes: a zone's rate change for a category moves every affected variant's priceWithTax without bumping the variant's updatedAt, so neither the product feed nor the variant feed re-delivers it (ADR-060).

  • #110 b814bf3 Thanks @kilbot! - Fixes three Vendure stock gaps (backlog 28, from the #45 stock review): a variant with trackInventory FALSE, or INHERIT with the global setting off, is now always in stock; outOfStockThreshold (per variant, or the global one through useGlobalOutOfStockThreshold) is now subtracted from available stock, matching Vendure's own saleable rule; getStockStatus and getStockQuantity now aggregate every variant, as getStock already did, instead of reading variant 0 only.

    Adds vendureGlobalStockSettings(context) for the channel's stock defaults, and createVendureConnector options globalTrackInventory and globalOutOfStockThreshold.

    The Vendure product schema is now version 1, declaring variants[].trackInventory, outOfStockThreshold, useGlobalOutOfStockThreshold and enabled. The first sync after upgrading resyncs the Vendure catalogue once: a schema version bump drops the stored products and downloads them again (ADR-060 amendment 9). A collection created with vendureProductSchema outside createTallyDatabase must use connectorCollection(vendureProductSchema) from @tallyui/database.

Patch Changes

  • #97 f8b0dac Thanks @kilbot! - A fresh install downloads the catalogue once. A pull adapter can now declare pull.seedCheckpoint; on a fresh install (no stored checkpoint) combinePullAdapters reads every seed before any feed runs and starts that feed from it. The Medusa and Vendure variant feeds seed their cursor at the newest variant's updated_at, so their first pass no longer re-delivers every product the product feed has just delivered, and a variant edit made during the product feed's first pass still arrives. An install upgrading from a stored checkpoint is never seeded and keeps the variant feed's full healing pass.

  • #88 5053527 Thanks @kilbot! - no longer publishes test files

  • #11 b1b6e30 Thanks @kilbot! - Report product-level stock across all variants, showing the total quantity only when every variant has tracked, known stock. Draw the search magnifier with an attached, rounded handle and a larger ring.

  • #113 5885373 Thanks @kilbot! - A variant disabled in Vendure (enabled: false, replicated since #110) is no longer offered, priced or counted: getVariants, getPrices, getPrice, getRegularPrice, getStock and getVariantCount now consider live variants only, and isSellable also requires at least one when the product has variants at all. A product with none left is not sellable, so addProduct refuses it (#104).

  • #114 51d4818 Thanks @kilbot! - Vendure pull robustness (backlog 29, 30, 31). The high-water mark and both skew probes now select only id updatedAt, not the full product query. A mid-pass checkpoint in the shape saved before #45's pass-state fields (skip and updatedAt alone) is recognised and normalised into a clean restart of the pass from offset 0, instead of resuming at an offset that no longer lines up with this pull's fixed-window paging. The skew guard's probe re-reads the high-water mark once before throwing, so a product deleted between the mark read and the probe settles into a clean pass instead of an error RxDB then has to retry.

1.0.0

@tallyui/database

Minor Changes

@tallyui/components

Minor Changes

@tallyui/connector-woocommerce

Minor Changes

@tallyui/connector-medusa

Minor Changes

@tallyui/connector-shopify

Minor Changes

@tallyui/connector-vendure

Minor Changes

0.2.0

@tallyui/core

Minor Changes

@tallyui/storage-sqlite

Minor Changes

@tallyui/theme

Minor Changes

On this page

4.1.0@tallyui/databasePatch Changes@tallyui/primitivesPatch Changes@tallyui/componentsMinor ChangesPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes4.0.1@tallyui/databasePatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes4.0.0@tallyui/coreMajor ChangesMinor ChangesPatch Changes@tallyui/databaseMinor ChangesPatch Changes@tallyui/primitivesMinor ChangesPatch Changes@tallyui/componentsMinor ChangesPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posMajor ChangesMinor ChangesPatch Changes@tallyui/themeMinor Changes@tallyui/connector-woocommerceMinor ChangesPatch Changes@tallyui/connector-medusaMinor ChangesPatch Changes@tallyui/connector-shopifyMinor Changes@tallyui/connector-vendureMinor ChangesPatch Changes3.20.1@tallyui/databasePatch Changes@tallyui/componentsPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.20.0@tallyui/coreMinor Changes@tallyui/componentsMinor Changes@tallyui/posMinor ChangesPatch Changes@tallyui/themeMinor Changes@tallyui/connector-woocommerceMinor Changes3.19.0@tallyui/coreMinor Changes@tallyui/databaseMinor Changes@tallyui/primitivesMinor Changes@tallyui/componentsMinor ChangesPatch Changes@tallyui/posMinor Changes@tallyui/themePatch Changes@tallyui/connector-woocommerceMinor ChangesPatch Changes3.18.0@tallyui/coreMinor Changes@tallyui/posMinor Changes@tallyui/connector-woocommerceMinor Changes3.17.0@tallyui/databasePatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posMinor ChangesPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.16.0@tallyui/databasePatch Changes@tallyui/componentsMinor Changes@tallyui/storage-sqlitePatch Changes@tallyui/posPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.15.0@tallyui/coreMinor Changes@tallyui/databasePatch Changes@tallyui/componentsMinor Changes3.14.0@tallyui/coreMinor Changes@tallyui/databaseMinor Changes@tallyui/componentsMinor ChangesPatch Changes@tallyui/posMinor ChangesPatch Changes@tallyui/connector-woocommerceMinor Changes3.13.0@tallyui/coreMinor ChangesPatch Changes@tallyui/databasePatch Changes@tallyui/componentsMinor Changes@tallyui/posMinor Changes@tallyui/themeMinor ChangesPatch Changes@tallyui/connector-woocommerceMinor ChangesPatch Changes@tallyui/connector-medusaMinor Changes@tallyui/connector-vendureMinor Changes3.12.0@tallyui/coreMinor Changes@tallyui/componentsMinor ChangesPatch Changes@tallyui/posMinor ChangesPatch Changes@tallyui/connector-woocommerceMinor Changes3.11.0@tallyui/corePatch Changes@tallyui/primitivesPatch Changes@tallyui/componentsMinor Changes@tallyui/posMinor ChangesPatch Changes@tallyui/themePatch Changes@tallyui/connector-shopifyPatch Changes3.10.0@tallyui/coreMinor ChangesPatch Changes@tallyui/database@tallyui/primitives@tallyui/componentsPatch Changes@tallyui/storage-sqlite@tallyui/posMinor Changes@tallyui/theme@tallyui/connector-woocommerceMinor Changes@tallyui/connector-medusa@tallyui/connector-shopify@tallyui/connector-vendurePatch Changes3.9.2@tallyui/corePatch Changes@tallyui/posPatch Changes3.9.1@tallyui/databasePatch Changes@tallyui/componentsPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.9.0@tallyui/coreMinor ChangesPatch Changes@tallyui/databasePatch Changes@tallyui/primitivesPatch Changes@tallyui/componentsPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posMinor ChangesPatch Changes@tallyui/themePatch Changes@tallyui/connector-woocommerceMinor ChangesPatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendureMinor ChangesPatch Changes3.8.0@tallyui/coreMinor Changes@tallyui/posMinor Changes@tallyui/connector-woocommerceMinor Changes3.7.1@tallyui/databasePatch Changes@tallyui/primitivesPatch Changes@tallyui/componentsPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.7.0@tallyui/databasePatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posMinor ChangesPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.6.0@tallyui/coreMinor Changes@tallyui/componentsMinor ChangesPatch Changes@tallyui/posMinor ChangesPatch Changes3.5.3@tallyui/databasePatch Changes@tallyui/componentsPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.5.2@tallyui/databasePatch Changes@tallyui/componentsPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.5.1@tallyui/databasePatch Changes@tallyui/componentsPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.5.0@tallyui/coreMinor Changes@tallyui/componentsMinor Changes@tallyui/posMinor Changes@tallyui/connector-woocommerceMinor Changes@tallyui/connector-medusaMinor Changes@tallyui/connector-shopifyMinor Changes@tallyui/connector-vendureMinor Changes3.4.0@tallyui/databasePatch Changes@tallyui/componentsMinor Changes@tallyui/storage-sqlitePatch Changes@tallyui/posMinor ChangesPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.3.0@tallyui/coreMinor ChangesPatch Changes@tallyui/posMinor ChangesPatch Changes@tallyui/connector-woocommercePatch Changes3.2.1@tallyui/databasePatch Changes@tallyui/componentsPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.2.0@tallyui/databasePatch Changes@tallyui/componentsMinor ChangesPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posMinor ChangesPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendureMinor ChangesPatch Changes3.1.1@tallyui/corePatch Changes@tallyui/connector-woocommercePatch Changes3.1.0@tallyui/databasePatch Changes@tallyui/componentsPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posMinor ChangesPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.0.4@tallyui/databasePatch Changes@tallyui/componentsPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.0.3@tallyui/databasePatch Changes@tallyui/componentsPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.0.2@tallyui/databasePatch Changes@tallyui/componentsPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.0.1@tallyui/databasePatch Changes@tallyui/primitivesPatch Changes@tallyui/componentsPatch Changes@tallyui/storage-sqlitePatch Changes@tallyui/posPatch Changes@tallyui/connector-woocommercePatch Changes@tallyui/connector-medusaPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendurePatch Changes3.0.0@tallyui/coreMajor ChangesMinor ChangesPatch Changes@tallyui/databaseMajor ChangesMinor ChangesPatch Changes@tallyui/componentsMinor ChangesPatch Changes@tallyui/storage-sqliteMajor ChangesMinor ChangesPatch Changes@tallyui/posMajor ChangesMinor ChangesPatch Changes@tallyui/connector-woocommerceMinor ChangesPatch Changes@tallyui/connector-medusaMinor ChangesPatch Changes@tallyui/connector-shopifyPatch Changes@tallyui/connector-vendureMinor ChangesPatch Changes2.0.0@tallyui/coreMinor ChangesPatch Changes@tallyui/databaseMajor ChangesMinor ChangesPatch Changes@tallyui/primitivesMinor ChangesPatch Changes@tallyui/componentsMajor ChangesMinor ChangesPatch Changes@tallyui/storage-sqliteMinor ChangesPatch Changes@tallyui/posMajor ChangesMinor ChangesPatch Changes@tallyui/themePatch Changes@tallyui/connector-woocommerceMajor ChangesMinor ChangesPatch Changes@tallyui/connector-medusaMajor ChangesMinor ChangesPatch Changes@tallyui/connector-shopifyMajor ChangesMinor ChangesPatch Changes@tallyui/connector-vendureMajor ChangesMinor ChangesPatch Changes1.0.0@tallyui/databaseMinor Changes@tallyui/componentsMinor Changes@tallyui/connector-woocommerceMinor Changes@tallyui/connector-medusaMinor Changes@tallyui/connector-shopifyMinor Changes@tallyui/connector-vendureMinor Changes0.2.0@tallyui/coreMinor Changes@tallyui/storage-sqliteMinor Changes@tallyui/themeMinor Changes