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:
PortalHostkeys each portal by name, so a closing dialog no longer remounts a dialog opened while it animates out.
@tallyui/components
Minor Changes
-
32852af:
OrdersListtakesonReopenandonResume. WithonReopen, a sale the store refused withcoupon_invalidortotal_mismatchshows "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 whenonResumeis 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
DisplaySignallingor callcreateTillPairingorcreateTillDisplayService.Migration:
DisplaySignalling's nine till methods takeTillDevice { deviceId, deviceKey }in place ofdeviceId. Implement the newregisterDevice, and handle thedevice_refusedrefusal.createTillPairingandcreateTillDisplayServicetakedevice(fromcreateTillDevice) in place ofdeviceId.- 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/coreaddsMoneyFormatProvider,useFormatMoneyanduseCurrencySymbol.@tallyui/pos'sCurrencyProviderrenders the provider, and every@tallyui/componentsmoney amount and money-input symbol now reads the store's money format when one is provided. Without a provider, nothing changes.discountLabeltakes an optional formatter as its third argument. -
028c0e3:
ProductCategorytakes an optionalimageUrl, 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'sCurrencyProvidernow formats through it, and itsCurrencyFormattype isMoneyFormat. -
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). NewwireMethodOfandlegMethodIdhelpers. -
1f40158:
ratePpmFromPercentis exported from@tallyui/coreand@tallyui/core/server(moved from@tallyui/pos, which still re-exports it), so servers can convert rate percentages without vendoring pos. -
bc9a686:
reopenPayloadErrorsandupdatePayloadErrorsaccept abaseRevisionof 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/servernow ships a CommonJS build beside the ESM one, so CommonJS backend plugins canrequire('@tallyui/core/server'). The./serverexport map gains arequirecondition (dist/server/index.cjs, typesdist/server/index.d.cts);importresolves exactly as before. The main entry and./rxdbstay ESM-only. -
b6e936c: Breaking for DisplaySignalling implementers
- The nine till methods take
TillDevice { deviceId, deviceKey }in place ofdeviceId, andregisterDeviceand thedevice_refusedrefusal are new. createTillPairingandcreateTillDisplayServicetakedevice(fromcreateTillDevice) in place ofdeviceId.- 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.
- The nine till methods take
-
d034d9f: A store can report the lines whose figures it computed differently with the new
line_figures_mismatchwarning, whichparseCommandResultandknownWarningsaccept.moneyDivergence(order)gives a sale's differing order figures and line ids, and the orders list counts the differing lines. -
82ec063:
ServerCapabilities.pluginContractcarries/tally/v1/info's top-levelpluginContract. The Medusa connector'slistOrderssends register filters and 1-6 digit searches (display numbers) through the MedusaPOS plugin'sGET /tally/v1/ordersat 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:
minorToMajoris exported from the@tallyui/coreroot andminorUnitDigitsfrom@tallyui/core/server, so each money converter has one name everywhere.currencyDecimals,moneyToMajorand@tallyui/pos'sminorToDecimalare deprecated in their favour; nothing is removed. -
ccb28e1:
normalizeMoneyText(text, format?)reads a typed amount in the store's separators, anduseMoneyFormat()returns the nearest MoneyFormatProvider's format (#672). -
1821a2c: order.create version 11: version 10 plus the customer's
billing/shippingon a sale with notaxAddress, as informational fields.SUPPORTED_ORDER_CREATE_VERSIONSand the version types gain 11;precheckCommandaccepts untaxed addresses at 11 and still refuses them at 9 and 10. -
74191f9:
@tallyui/core: order.create version 12 is 11 pluscustomer.taxIds, a catalogue line'sskuand ordermeta, as informational fields, with their shape and bound checks inprecheckCommandand theORDER_TAX_IDS_MAX,ORDER_TAX_ID_TYPE_MAX,ORDER_TAX_ID_VALUE_MAX,ORDER_META_MAX,ORDER_META_KEY_MAXandORDER_LINE_SKU_MAXconstants (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, nowORDER_CREATE_MAX_VERSION) only when the store's cap allows it, andpos_ordersgoes to schema 18 (identity migration, one-way like 17) to store them andattentionHandledFor.markAttentionHandled(orders, orderId)marks a refused or warned order handled, andneedsAttentionleaves 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_VERSIONSadds 9,precheckCommand,payloadShapeErrorsandpayloadBoundErrorscheck it (docs/contract/order-create-v9.md), and version 9 needs notaxAddress. -
f5a739f:
order.reopenversion 1 (ADR-090), an online command that reopens a store order for editing.@tallyui/coreadds the envelope, payload and result types,reopenPayloadErrors(the strict shape check), theorder.reopentype invalidateBatch, an optionalorderReopenlist inprecheckCommand, thereopenresult inparseCommandResult, the refusal codes (payment_in_motion,order_state,revision_conflict,forbidden),SUPPORTED_ORDER_REOPEN_VERSIONSand theorderReopencapability from/tally/v1/info. Nothing sends it yet. -
3b25108:
order.updatev1 (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, theorderUpdatecapability andSUPPORTED_ORDER_UPDATE_VERSIONS. Nothing sends it yet. -
7a6075b:
@tallyui/coreadds theProductTermtype and an optionalgetTermsproduct 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/posaddsproductTerms,listTermGroups(each group and term once, sorted by name likelistCategories) andhasTerm. -
2cb63cb: ServerCapabilities.receiptEmail: parseInfoCapabilities reads
/tally/v1/info'sreceiptEmail: { v: n }(a safe integer above 0); a malformed value is left out with one warning. -
6e191c9: New exports the platform apps copied before:
deriveSessionFiguresandderiveVarianceon@tallyui/core's browser-safe main entry;tenderLabeland a newsyncStatusQuietpredicate (true whenSyncStatuswould show only "Sales are up to date.") on@tallyui/components. -
2bdae98: Adds an optional, online
closuresconnector surface (ADR-093): read the store's Z closures, append a recount and record a reprint.CorrectionandApproverCredentialsmove to core (pos and the Woo connector re-export them);Correctiongainslate_refund, whichderiveSettledcounts 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, anidon each fee, shipping line and payment record, and the recordedtaxStatuson a fee or shipping line, a fee'staxClassand a shipping line'smethodId. 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 carriespaymentRecordUnreadable. -
28ba50e: StoreTaxRate gains optional
rulesfor a backend's override-rate conditions. -
cc6f6cf:
StoreSettingsgainspreventOversellingandStockLevelgainsbackorders(no|notify|yes). The WooCommerce connector reads the store'sprevent_oversellingand each product's and variation'sbackorders, which WCPOS v2's stock guard needs. The product schema goes to version 3, so a till resyncs its products once. -
23a6813:
StoreSettings.moneyFormatcarries the store's own money format (core'sMoneyFormat). 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 toCurrencyProvider'sformat.
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
DisplaySignallingdocs now say the till'sdeviceIdis 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.takingsByMethodreturns an object with no prototype; read it withObject.hasOwn, nothasOwnProperty. -
c9201a2: Internal tidy:
precheckCommandbuilds its rejections through one helper, core usesOrderCreatePayloadinternally (the deprecatedOrderCreatePayloadV3alias stays exported), and the order.create version docs now list version 6. Behaviour unchanged. -
a171cf5:
precheckCommandrefuses an order.create 9 payload that carries a customer address withouttaxAddress(#790).The order outbox treats an
unsupported_versiondowngrade 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;signalcancels it. - 8db2528:
startSyncCadencenow returns aSyncCadenceTicker: aSyncCadenceRunnerthat also exposes its last finished tick (lastTick$,lastTick(): the time, and ok or error), for WCPOS v2's "last check X ago" line.SyncCadenceRunneritself is unchanged, so existing fakes still type-check. A target may return a promise fromreSync(); a rejection marks the tick as an error. - 7e19b89:
resetCollectionclears a pulled collection and downloads it again from the start, under a new replication generation. ReadreplicationGeneration(collection)and pass it asstartReplication'sgenerationon 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_ENGINEkeys onWEB_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
Contentnow honour theironEscapeKeyDownprop, and ComboboxContentgains it; callevent.preventDefault()there to keep the list open. Native is unchanged. - 3dea768: On web, an open
Popover.Contentcloses on Escape and on a pointerdown outside its content and trigger, and callsonEscapeKeyDownandonPointerDownOutsidefirst (preventDefault()keeps it open). Only the topmost open popover or dialog reacts. With aPopover.Overlaymounted, 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'sclassNamenow goes to the inner padded view (defaultpb-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 oroverflow-*, say) now styles the padded view inside the fold, and a padding class now replacespb-4 pt-0. No in-repo caller passedclassName. - 3c4b81b:
AccordionTriggerdraws WCPOS v2's 18px down chevron, on the right by default or before the label withchevronPosition="left", and takesheaderClassNamefor the outer header (merged afterflex). The chevron turns 180° and dims to 0.8 opacity over 250ms as the item opens and back over 200ms as it closes;AccordionContentfolds open and shut over 200ms on v2's ease, and stays mounted until the fold ends. Under reduced motion both are instant, andforceMountcontent 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 throughonChangeas 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 aCartColumnSettingsvalue forCart'scolumns. - 1c5d2f7: The cart's
columnssetting gains v2's columnorder, theprice.onSaleswitch for the struck regular price, a read-onlyregularPricecolumn, a translated Split link and SKU head, and the newly exportedCartColumnIdtype. - 64d2391:
CarttakesorderDiscountChips(defaulttrue): passfalseto leave out the applied order discounts' chips under the lines when the app draws them itself, e.g. as a removable Discount row inafterSubtotal. - dea8966:
Carttakes an optionalpickerfor 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.CartColumnHeadsandCartLinetake an optionalpicking, which heads the quantity column "This payment" and widens it for the stepper;Cartsets it whilepickeris on. - 3b2f99a:
Cart'slineCommit="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 andonPriceChange. A price refused on such a close shows under its line until that line's next price write.LinePopovertakesonCloseRefused, called with the refusal when acommit="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" whentaxInclusiveistrue, "Excluding tax" when it isfalse, and no tag when it is absent. The oldincl.label prefix is gone. Each tax row has the test idcart-total-tax-<index>. - 24f2f88:
CartTotaltakesfeesandshippingand shows a Fees and a Shipping row between Discount and the tax rows when each is not 0, andCartpasses the order's fee and shipping lines, so the cart's totals add up to its total, as in WCPOS v2. - ae1b243:
CashierSheetgains v2's drawer door: the opt-indrawerprop (CashierSheetDrawer) draws "In the drawer" under "Your sales today" with the app's figure, the opener line and the register verbs, and callsdrawer.onOpenwhen pressed. - 530744b:
CashierSheetgains v2's "Hand the till to" and hold notices: the opt-inhandToprop (CashierSheetHandTo,CashierSheetCashier) lists the other cashiers with their open carts and callshandTo.onHandTo(id)when a row is pressed;payingshows "Finish the payment first" and holds the rows;awaitingStoreshows the "Awaiting store" notice. - bef8aeb:
CashierSheetgains v2's Store and Register rows: the opt-instoreandregisterprops (CashierSheetPlace) draw the name with a "Switch" verb that callsonSwitchso the app opens its own picker, and aheldReasonline 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 throughSwitchConfirmfirst. - dedcdd3: Catalogue: optional inStockKeepsBackorder keeps backorder products in the grid while the In Stock pill is on (default off, unchanged).
- 0bdf81c:
CataloguetakesrowsSlot(aReactNode, default none): WCPOS v2's rows between the filter chips and the products (itsListColumnrows), 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:
CataloguetakessearchAccessory(aReactNode, default none), rendered at the end of the search row as WCPOS v2 puts the Product settings button beside its search; the Grid/TableViewToggle(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 emitsgridColumnsfor the catalogue view state and aTileFieldsforCatalogue'stileFields. - de520e5: Catalogue: optional
termPillsshows a searchable single-select term pill per term group (e.g. per Vendure facet) and filters the grid by the picks. - 704a0d1:
Cataloguetakes optionaltileFields(v2's Tile Fields), which hides or shows a grid tile's name, price, on-sale strike, SKU, barcode, categories and stock.ProductPricetakes optionalshowWas. 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:
ViewToggletakesvariant: 'icon', WCPOS v2's single view-mode button: one press switches to the other view (testIDview-toggleon the control andview-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 atmax-w-160on 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 (CategoryTilegainsbackandaccessibilityLabel), and a search typed inside a category leaves it and searches every product, as in WCPOS v2. - c5fd7f0:
CategoryTiletakesstackedandmarkand falls back to the initial when its photo fails to load, and theCataloguecategory 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:
ChargeFormtakesallowPercent(a currency-or-% unit toggle on fees) andpricesIncludeTax(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;Cartpasses 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:
CartFoottakesnote?: { text, onPress }andCarttakescheckout.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 callsonPressso the app opens its note editor. - 028c0e3:
CataloguetakescategoryBrowse: 'chips' | 'tiles'(default'chips'). With'tiles'andshowCategoryNav, the catalogue opens on WCPOS v2's browse root: All products, then each category as aCategoryTileposter 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 atrigger, or is controlled withopenandonOpenChange. 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)andsearch(query, page)load the next 50 at the end of the list, as v2 (absent support: one page, as before). - 3f73c6f: CustomerDropdown: optional
browselists 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:
ListRowgainssize="sm"(the row height token, 44 at Regular) andselected, v2's current-row mark: the row is paintedbg-mutedwith 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 andtrailingslots, the press and fine-pointer hover wash, the disabled dim, and abuttonrole only when it has an action. - fae1b1a:
@tallyui/coreaddsMoneyFormatProvider,useFormatMoneyanduseCurrencySymbol.@tallyui/pos'sCurrencyProviderrenders the provider, and every@tallyui/componentsmoney amount and money-input symbol now reads the store's money format when one is provided. Without a provider, nothing changes.discountLabeltakes 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-smword with no tinted pill behind it (thebg-*/15wash, rounded corners and padding are gone).classNamestill 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
awaitingStorecounts 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-cashandclosure-variance-cashnow hold the figure alone (e.g. "€63.30", "−€36.70"); other tenders are unchanged. - 502090c:
RegisterPaneltakes an optionalopenedBy: { 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 whenonExportCsvis given. ASalesCardshead that opens a panel is now 44 pt tall, dims on press and shows a chevron after its figure; withoutonOpenCardthe 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), sizessm44,default56 andlg96, and aniconoverride. Adds theCheckIcon,AlertTriangleIcon,AlertCircleIconandInfoCircleIconglyphs. Needs@tallyui/themewith 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:
CustomerPickertakesshowAvatarto draw v2's initials on each result row, andwithGuestto draw a Guest row above the results that picksnull, as v2's customer select does. Both default tofalse. - 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/closeLabelon DialogContent andborderedon DialogFooter draw v2's corner close and footer divider; defaults unchanged. - fca7e93: DiscountForm:
layout="dialog"gains v2's Quick discount / Coupon tabs whenonApplyCouponis passed. The Coupon tab picks one of the app'scoupons(the newDiscountCoupontype) from a searchable list and applies it; a refusal shows inline and the dialog stays open. WithoutonApplyCouponthe dialog renders as before. - f9d9e6b: DiscountForm
layout="dialog"(v2 Add Discount) and an optionaltitle; the default rendering is unchanged. - 9a7a39f: DiscountForm: the Coupon tab gains v2's "New coupon" (+) button through
onNewCoupon, disabled with a reason throughnewCouponDisabledReason. - 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",Cataloguedraws 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 acartLinesline's new optionalvariantId. - 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
termGroupsadds 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_mismatchwarning, whichparseCommandResultandknownWarningsaccept.moneyDivergence(order)gives a sale's differing order figures and line ids, and the orders list counts the differing lines. - 42e1517:
LinePopovergainscommit="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 whenonRemoveis given. Escape closes without writing, and any other close writes what was typed.Cartopts its quantity popover into it withlineCommit="close"(withlineEditor="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.
parsePriceandparseDiscounttake 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 takesmovementReasonsto replace the reason chips per movement type. - d5bfbaa: MovementSheet: v2's reason chips fill the reason field;
reasonsreplaces 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
Noticeband (bad, warning, info) for form errors and attention lines, ported from WCPOS v2. - b084d5a:
OpenSaleTabsshows how long a parked sale has waited, in hours and in the warning colour, once it has waited an hour;OpenSalegainsparkedAt. - 563e970:
OpenSaleTabstakes aclassName, 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,onReceiptandreopenDisableddraw 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 isbg-muted-foregroundand its word stays in the foreground colour, so the Cancelled dot is visible;'trash'(Trash) and'checkout-draft'(Draft) joinOrderStatus; 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:
OrderSyncNoticesis exported: the per-sale sync noticesOrdersListshows (refusal, stuck since, late session, local warnings, note not sent, the store's warnings), withchildrenat Retry's place, for an app's own order screen.OrdersListrenders 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.takingsByMethodreturns an object with no prototype; read it withObject.hasOwn, nothasOwnProperty. - f6e680d: POSLayout:
tabBar="bottom"draws v2's phone tab bar (Products / Cart with a count) and keeps both panes mounted. - 46d6dce:
POSLayouttakesrenderCheckout, 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:
PrintingSettingsroutes each receipt, report and closure template to a printer: new optionaltemplates,routingandonRoutingChangeprops, with an Auto choice that shows the printerresolvePrinterpicks. Withouttemplatesit 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
termsturns Category, Tag and Brand into v2's searchable picker pills;onTermPressstill 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:
ProductTabletakescartQuantity(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 fromcartLines, as its grid tiles show them. - 4b605c3:
ProductTabletakesshowThumbnailandshowAddButton, andCataloguetakestableRow: { 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 callsonSelectexactly as a row press does, once. Both default off.PlusIconandChevronRightIconare new exports. - 9f3e83e: New
productsScreenColumnsanduseProductsScreenColumnsgiveProductTablethe 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:
Receipttakesactions: a node that replaces Print receipt and New sale (never printed), orfalsefor no buttons;newSaleis then optional. - a51d4b2:
ReceiptSheettakes an optionalemailprop (ReceiptSheetEmail) that draws WCPOS v2's receipt email form inside the sheet: "Email Receipt" opens an "Email Address" field prefilled fromdefaultAddress, 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 callsonSend, which sends or queues in the app and returns a refusal to show ornullto close the form. Withemailgiven,onEmailis not called; without it the sheet is unchanged. - deb2d16: ReceiptSheet: after
email.onSendgives null, the sheet says 'Email sent', or 'Receipt email queued' when offline (v2's copy, through the components catalogue). - ac15b7a:
Receipttakes an optionalprintedprop: its Print button then reads 'Print again', asReceiptSheetdoes. - 6d922f9:
ReceiptSheettakes optionalprinters,printerId,autoPrinterNameandonPrinterChange, v2's printer switcher, with Auto first. Withoutprintersthe Printer row showsprinterLabelas 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
onPrintprop makes Close read "Close & print" and prints the Z report after the close lands. - bd6fa29:
RegisterCountfolds 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_paidwhen 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:
SalesCardstakeshide(andSalesRoomtakeshideCards) 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:
deriveSessionFiguresandderiveVarianceon@tallyui/core's browser-safe main entry;tenderLabeland a newsyncStatusQuietpredicate (true whenSyncStatuswould show only "Sales are up to date.") on@tallyui/components. - 26f09ed:
AppShelltakesnavFooter, drawn at the foot of the nav rail and the phone drawer (NavRailandNavDrawertake it asfooter), for a line such as the app version; without it nothing changes. - d29c19c:
SkeletonandskeletonCount(withSKELETON_MAX_ROWS), ported from WCPOS v2: a still, muted placeholder in the shape of what is loading, withrow,tileandchipheights from the scale.Cataloguenow 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.ProductTablegains aloadingprop: with no items, it draws its real header and one line placeholder per column cell instead ofemptyState. - cf276f5:
TenderandTenderPanetakeback={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:
TenderPanedraws 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_balanceandpos_checkout.full_balance_label. - 9432192: Cart's
tenderLedgershows the payments ledger (legs, Total, Paid, Remaining) under the cart totals during tender, as WCPOS v2's checkout cart;TenderandTenderPanetakeledger={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,Tenderand Cart'stenderLedgertake an opt-inconfirmVoid. 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}"), andsale.voidTenderruns only on confirm; Cancel writes nothing. Defaultfalse: 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'stileFieldsnow also drives the drill's variant tiles (name and chips, price, SKU, barcode, stock) and the loading skeleton's tile height. WithouttileFieldsthey render as before. - ab8a86d: Add Shipping and Edit shipping offer No tax on a store that taxes shipping itself when
shippingNoTaxis 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:
CustomerDropdownclears 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:
CustomerPickerselects 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 fixesOrderNoteSheet. -
b6e936c: Breaking for DisplaySignalling implementers
- The nine till methods take
TillDevice { deviceId, deviceKey }in place ofdeviceId, andregisterDeviceand thedevice_refusedrefusal are new. createTillPairingandcreateTillDisplayServicetakedevice(fromcreateTillDevice) in place ofdeviceId.- 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.
- The nine till methods take
-
64e8323:
@tallyui/posnow exportstillLegsTheStoreRefuses, the ids of the till legs a reopened sale may not keep once the store's own locked legs cover its total, the same rulefinalizeOrderrefuses 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_duekey. -
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
showCloseandbordered; 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:
Switchlays 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.fromis deprecated and read only for a plan withoutbefore(#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/posnow exportslockedRefundDueMinor(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).addTenderrefuses 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'sisPartlyPaidinstead 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 dropsaccessibilityHint.
@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_ENGINEkeys onWEB_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
DisplaySignallingor callcreateTillPairingorcreateTillDisplayService.Migration:
DisplaySignalling's nine till methods takeTillDevice { deviceId, deviceKey }in place ofdeviceId. Implement the newregisterDevice, and handle thedevice_refusedrefusal.createTillPairingandcreateTillDisplayServicetakedevice(fromcreateTillDevice) in place ofdeviceId.- 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 asthreshold/minChars/prefixpatches;replayWedgeDetectoralso reportsminAvgGapMs. -
c91ae8c:
app_settingskeepscart.columns(the Cart's columns, shows, display options and order; unknown columns, fields and ids are dropped) andcart.openOrdersPosition(toporbottom, defaultbottom), 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:
addTendertakestenderedMinorfor 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 (
percentonaddFeeandupdateFee). 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:
toCustomerInputandtoCustomerPatchturn customer form values into whatcreateCustomerandupdateCustomertake, 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 ofdeviceId, andregisterDeviceand thedevice_refusedrefusal are new. createTillPairingandcreateTillDisplayServicetakedevice(fromcreateTillDevice) in place ofdeviceId.- 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.
- The nine till methods take
-
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:
restoreOrderDraftno longer merges equal lines.AddLineInput.separateadds a line that is never merged. -
d0c69d6:
openDrawerJob(profile, id)builds a cash-drawer kick job (kind'drawer') for an ESC/POS printer, andcanOpenDrawer(profile)says whether a printer can take one. -
1d13ca2:
escpos()gainsunderline,invert,barcode(CODE128 and EAN13) andqrcode, with the newEscPosBarcodeOptionsandEscPosQrOptionstypes.barcodeandqrcodethrow aRangeErrorbefore writing anything when a value cannot be encoded. Existing commands andencodeEscPosoutput are unchanged. -
e4d9851:
renderEscposandencodeThermalTemplateprint 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/posnow exportstillLegsTheStoreRefuses, the ids of the till legs a reopened sale may not keep once the store's own locked legs cover its total, the same rulefinalizeOrderrefuses 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_duekey. -
d034d9f: A store can report the lines whose figures it computed differently with the new
line_figures_mismatchwarning, whichparseCommandResultandknownWarningsaccept.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, throughcreateEscPosTransport.createEpsonEposSinkandcreateStarWebPrntSinkbuild the sinks directly. -
b084d5a:
OpenSaleTabsshows how long a parked sale has waited, in hours and in the warning colour, once it has waited an hour;OpenSalegainsparkedAt. -
1821a2c: The till sends a sale's untaxed customer addresses at order.create 11 (
UNTAXED_ADDRESS_ORDER_CREATE_VERSION, nowORDER_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.finalizeOrderstores the customer's non-empty addresses on every order.pos_ordersgoes to schema 17 (identity migration, one-way like 16):sentVersionanddowngradedFrommay be 11. -
74191f9:
@tallyui/core: order.create version 12 is 11 pluscustomer.taxIds, a catalogue line'sskuand ordermeta, as informational fields, with their shape and bound checks inprecheckCommandand theORDER_TAX_IDS_MAX,ORDER_TAX_ID_TYPE_MAX,ORDER_TAX_ID_VALUE_MAX,ORDER_META_MAX,ORDER_META_KEY_MAXandORDER_LINE_SKU_MAXconstants (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, nowORDER_CREATE_MAX_VERSION) only when the store's cap allows it, andpos_ordersgoes to schema 18 (identity migration, one-way like 17) to store them andattentionHandledFor.markAttentionHandled(orders, orderId)marks a refused or warned order handled, andneedsAttentionleaves 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,
finalizeOrderstores the split (PosOrderCoupon.lines,PosOrderCouponLine), and the till sends it ascoupons[].lineswhen the server advertises 9. Below 9 every payload is byte for byte as before.pos_ordersgoes to schema version 13 (identity migration, one-way) andORDER_CREATE_MAX_VERSIONis 9. -
1f3eae7: The order outbox sends a reopened sale (a
pos_ordersrow withstoreOrderId) asorder.updatev1, neverorder.create(ADR-090 decision 4). NewtoOrderUpdateEnvelope;toOrderCreateEnvelopethrows for such a row.OrderOutboxOptions.transportanduseOrderOutbox'stransporttakeOrderCreateEnvelope | OrderUpdateEnvelope. Nothing writesstoreOrderIdyet. -
b153da4:
OrderOutbox.discard(orderId)anduseOrderOutbox().discardremove one rejected sale. -
383f99c:
createClosureContext({ currency, store, … })builds theClosureContextforbuildClosureDocumentandbuildXReportDocument. 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:
reopenRefusedOrdertakesclosures; 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 andcountedInClosureOf.finalizeOrderrefusesAFTER_CLOSE_PAYMENTS_CHANGEDwhen such a sale's payment legs, fees, shipping or tax changed, or its total is not the legs' sum;useSaleholds those legs.stampSessionreturns an order withcountedInClosureOfunchanged, 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.
reopenRefusedOrdercarries a refused sale's coupons at the amounts charged, refuses withcoupon_carry_inexactandtoCollectMinorwhen it cannot, and takes{ withoutCoupons: true }as the explicit drop. Receipts show a carried coupon as a row on each line it priced, labelledcoupon <code> not accepted at send.isCarriedCouponLabeltells 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 }refusescarried_draft_existswhen a carried draft is already parked. A plainreopenRefusedOrderno longer drops a coupon sale's coupons: passcapabilities(order.create 4 or later) for the carry, and{ withoutCoupons: true }for the old drop. -
048fbcf:
pos_ordersgoes to schema version 14 (identity migration, one-way, ADR-090 decision 5): a reopened sale'sstoreOrderIdandbaseRevision, a line's, fee's and shipping line'sstoreLineId, and a payment'sstorePaymentId. Nothing writes them yet, andorder.createnever sends them. -
bc9a686:
pos_ordersgoes to schema version 15 (identity migration, one-way, ADR-090):baseRevisionmay be 128 characters, and a sale may storerefundDueMinor. Nothing writesrefundDueMinoryet. The store-order rebuild accepts a revision of up to 128 characters, down from 255. -
fed2ec4:
pos_ordersgoes to schema 16 (identity migration, one-way): a payment may storemethodId.addTender/setTendertake an optionalmethodId, 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. NewtakingsByMethod;reportOrderFromPosOrderkeys a leg with a methodId by its kind and id (legMethodId; optionalmethodTitlelabels it by its own id). Register rows and payloads are unchanged. -
602a062: The order outbox no longer sends a reopened sale whose
order.updateit cannot build. It keeps the row pending, holds that store order's later rows behind it, and shows it in Needs attention (UPDATE_UNSENDABLE). NewisRequeueableOrder(order):requeue()no longer resends a reopened sale refused withreopen_requiredorrevision_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
reopenStoreOrderreopens 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().holdsStoreOrderasopenHere.Otherwise it sends
order.reopenwith 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 asresendto retry with the same command id.New
useSale().openStoreOrderloads the result into an empty sale. Locked store payments no longer stopcloseSaleorswitchSale.isReopenOfferednow also needsorderCreate5 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
Ordercan 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:
useBarcodeScannertakes an optionalfieldPolicy. 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
useBarcodeScannertake an optionalgapRule. 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:
useBarcodeScannertakesfieldPolicy: 'hold-money': as'ignore-editable', except that a money field (an input withinputmode="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:
sendOrderReopensends an onlineorder.reopenv1 command, at most one per order in flight, andisReopenOfferedsays when Re-open is offered (ADR-090). -
17a248e: The tender reducer takes WCPOS v2 split V1 additively:
thenWayson the fixed plan,entryModewithset-entry-mode,percentOfMinor, and puretenderFigures.SplitTabis deprecated. -
8d6fa8b:
useSaletakes an optionaltenderGate, awaited before a tender starts; a refusal stays on the cart and shows its message. Without itstartTenderis unchanged. -
5b1ac68:
toOrderUpdateEnvelopebuilds at order.create version 5 or more, so a reopened sale never drops the store's fees and shipping; a store capped below 5 getsUnsupportedOrderVersionError(5, cap). It refuses a row withoutbaseRevisionor without figures, and it pairs kept items' store ids by client id rather than by position (ADR-090).toOrderCreateEnvelopeis unchanged. -
9169717:
app_settingsgainsprint.autoPrintReceipt(default false) andprint.templatePrinters(template id to printer profile id, default{}). They are device-local, with no schema change. -
7a6075b:
@tallyui/coreadds theProductTermtype and an optionalgetTermsproduct 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/posaddsproductTerms,listTermGroups(each group and term once, sorted by name likelistCategories) andhasTerm. -
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_sessionsmoves to schema version 2. Rows gaincount_note, the cashier's note on the close count, which the migration sets tonullon every older row; new sessions start withcount_note: null.closeSessiontakesnote, and the closure freezes a non-blank note asbreakdowns.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_sessionsis 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.
- Apps already open the collection with
-
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_paidwhen 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. AlsotemplateColumns, 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, andOrderBuilderOptions, take an optionalid/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.
restoreOrderDrafttakeskeepCoupons. -
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 (restoreOrderDraftoptionkeepTaxRates). -
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 andrestore()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'sadd()now starts the next sale (asnewSale()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,addFeeand the rest of the line-lock set) is now refused with the new exportedSALE_FINISHED("This sale is finished. Start a new sale to change it.") instead ofSALE_HAS_PAYMENT.startTender()(with or without atenderGate, including a gate that answers after the sale completed) andcancelTender()now refuse on the receipt withSALE_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 likesetCustomer, in the cart only (ADDRESS_CHANGE_REFUSEDotherwise). 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 (bysetTaxIdsorsetCustomer) 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:
salesFigurestotals carrymedianMinorandlargestMinor(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-unitspicks units,tender-startedwithpaymentIdfreezes them to that payment, andpaidUnitsByLine/unpaidUnitsByLine/pickedUnitsMinorprice the picks exactly.TenderStategainspickedUnitsandunitAllocations. -
2bdae98: Adds an optional, online
closuresconnector surface (ADR-093): read the store's Z closures, append a recount and record a reprint.CorrectionandApproverCredentialsmove to core (pos and the Woo connector re-export them);Correctiongainslate_refund, whichderiveSettledcounts on the refund side. The Woo connector implements it for WCPOS 2.0. -
6b68595:
addTendercounts the units of a pending or authorized leg as taken, and the newheldUnitsByLinegives 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.fromis deprecated and read only for a plan withoutbefore(#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/posnow exportslockedRefundDueMinor(ADR-090 gate 36). -
a258b43:
useSale: a tender start is seen by asetCustomerorsetAddressesin the same tick, which now refuse as they do in tender. A re-tax while the tender gate runs now shows the newTENDER_SALE_CHANGEDinstead 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).addTenderrefuses 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_FIELDSandnormalizeTileFields, and a device-localcatalogue.tileFieldsapp 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/coreaddsMoneyFormatProvider,useFormatMoneyanduseCurrencySymbol.@tallyui/pos'sCurrencyProviderrenders the provider, and every@tallyui/componentsmoney amount and money-input symbol now reads the store's money format when one is provided. Without a provider, nothing changes.discountLabeltakes 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'sCurrencyProvidernow formats through it, and itsCurrencyFormattype isMoneyFormat. -
ac46fa5: The
DisplaySignallingdocs now say the till'sdeviceIdis 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:
selectClosureRowsnow counts a closure with nostore_keyas the scope's store, as renumbering already does (#665), so a keyless closure that was renumbered shows in this store's Z-report list.openSessionwithoutstoreKeyis deprecated: it warns once (not in production), andstoreKeybecomes required at the next major. -
e48cac6:
minorToMajoris exported from the@tallyui/coreroot andminorUnitDigitsfrom@tallyui/core/server, so each money converter has one name everywhere.currencyDecimals,moneyToMajorand@tallyui/pos'sminorToDecimalare 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.takingsByMethodreturns an object with no prototype; read it withObject.hasOwn, nothasOwnProperty. -
86533d4: Deprecate the 16 customer-display tuning constants and keyboard-wedge helpers as internal; they leave the public entry at the next major.
-
1f40158:
ratePpmFromPercentnow comes from@tallyui/core; the export and its behaviour are unchanged. -
d641cdf: -
reopenRefusedOrderrefuses 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.
- Locked store payments (
-
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_keycounts as this store's when a refused closure number is renumbered (#665). -
49af156:
useSaleno 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, andrepriceCoupons()refuses with the same refusal as the other line and total changes (SALE_HAS_PAYMENT,SALE_FINISHEDon the receipt, orSALE_SAVING). The coupons stay stale, sostartTender()andcomplete()keep refusing withCOUPONS_REPRICINGuntil the payment is cancelled; then they are priced again. On the receipt,voidTender()andremoveTender()now refuse withSALE_FINISHEDand leave the finished sale's payments as they are.SALE_HAS_PAYMENTnow reads "A payment was taken on this sale. Cancel the payment before changing the sale.", after the Cancel payment button, andsetTenderStatus(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:
allocateOrderDiscountuses 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
writeClosurebuild 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_ENGINEkeys onWEB_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:
precheckCommandrefuses an order.create 9 payload that carries a customer address withouttaxAddress(#790).The order outbox treats an
unsupported_versiondowngrade 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
noneis 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–c5and their aliaseschart-1–chart-5(classes such asbg-c1andfill-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 asbg-ok-bgandtext-bad).okequalssuccessandbadequalsdestructive; the-bgtokens are the washes behind a tone's glyph or band. No existing token changes.
@tallyui/connector-woocommerce
Minor Changes
-
2bdae98: Adds an optional, online
closuresconnector surface (ADR-093): read the store's Z closures, append a recount and record a reprint.CorrectionandApproverCredentialsmove to core (pos and the Woo connector re-export them);Correctiongainslate_refund, whichderiveSettledcounts 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, anidon each fee, shipping line and payment record, and the recordedtaxStatuson a fee or shipping line, a fee'staxClassand a shipping line'smethodId. 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 carriespaymentRecordUnreadable. -
5b8ad63: A WooCommerce customer read by search, get, create or update now carries its
billingandshippingaddress, mapped from the Woo address fields underCustomerAddressnames. 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
billingof 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_v5flag 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
noneshipping line carries its tax status to the store. -
cc6f6cf:
StoreSettingsgainspreventOversellingandStockLevelgainsbackorders(no|notify|yes). The WooCommerce connector reads the store'sprevent_oversellingand each product's and variation'sbackorders, 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 pushedpending, 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'sregister_sessionssetting asregister: 3. -
23a6813:
StoreSettings.moneyFormatcarries the store's own money format (core'sMoneyFormat). 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 toCurrencyProvider'sformat.
Patch Changes
- 1b9f3e0: Internal tidy: the WooCommerce order, customer and order-push code use
WCPOS_UUID_META_KEYinstead of spelling the meta key, and stale doc comments are corrected (the Woo coupon order.create version, Medusa's ignoredmaxPagesadvice, the errors Vendure'sgqlthrows). 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 haslistOrders,getOrdersandorderFilters(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
listOrderssendsallChannels=trueon 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_CONTRACTnames the contract. - 82ec063:
ServerCapabilities.pluginContractcarries/tally/v1/info's top-levelpluginContract. The Medusa connector'slistOrderssends register filters and 1-6 digit searches (display numbers) through the MedusaPOS plugin'sGET /tally/v1/ordersat 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_KEYinstead of spelling the meta key, and stale doc comments are corrected (the Woo coupon order.create version, Medusa's ignoredmaxPagesadvice, the errors Vendure'sgqlthrows). 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 staticshopifyConnectoris 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'screatedAtand its default billing and shipping addresses. - ca32a01: Vendure products now carry their option groups:
getVariantsgives each variant'soptionskeyed by group name (a cart line reads "Size: 32"), and the newgetVariantOptionslists 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_KEYinstead of spelling the meta key, and stale doc comments are corrected (the Woo coupon order.create version, Medusa's ignoredmaxPagesadvice, the errors Vendure'sgqlthrows). 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_ENGINEkeys onWEB_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:
StoreOrderPagegains an optionaltotal, every order the query matches, and the WooCommerce connector fills it fromX-WP-Total, for v2's "Showing N of M" (#769). - 5f3475b:
StoreSettingsgainstaxClasses, each tax class's slug and display name, and the WooCommerce connector fills it fromtaxes/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:
Cartdraws its totals and foot at WCPOS v2's inset (8 px in, 8 px apart), andCartPaneltakes afooterClassNamefor its footer's wrapper (#765). - 845b12f:
CartTotalandCarttakeshowTotal(defaulttrue) so a v2-style cart can leave out the Total row, and the Total row isfont-semiboldinstead offont-bold, as WCPOS v2 (#781). - 378dcc6:
ProductTablecolumns takealignandhideHeader, heads are one line and 36 px tall, cells are paddedpx-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
scrimtoken (light 28%, dark 50% of a near-black, as WCPOS v2) instead ofbg-black/80andbg-black/50(#779). - 4244a8d:
SearchInputis 44 px tall (h-11), WCPOS v2's search height, instead of sizing itself by padding (#767). - 7896999: Switch's off track paints
bg-borderand Slider's trackbg-mutedwith abg-cardthumb, WCPOS v2's tones, instead ofbg-input,bg-secondaryandbg-background(#780).
@tallyui/pos
Minor Changes
- 2879bfd:
useStoreSettings'sreadystate gainsrefresh(), which re-reads the store's settings in place for v2's tax sync button, withrefreshingandrefreshError(#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
scrimtoken (light 28%, dark 50% of a near-black, as WCPOS v2) instead ofbg-black/80andbg-black/50(#779).
@tallyui/connector-woocommerce
Minor Changes
- 749894f:
StoreOrderPagegains an optionaltotal, every order the query matches, and the WooCommerce connector fills it fromX-WP-Total, for v2's "Showing N of M" (#769). - 5f3475b:
StoreSettingsgainstaxClasses, each tax class's slug and display name, and the WooCommerce connector fills it fromtaxes/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 methodsearchCustomersPagereturns a page of a customer search with the store's total (CustomerPage); the WooCommerce connector fills both, fromdate_created_gmtand theX-WP-Totalheader (#680). -
1af7329: The second-device customer display's signalling seam (ADR-085 U2, #684, #705).
TallyConnector.displaySignallingis an optionalDisplaySignalling: 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 holdingcustomer_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 aDisplaySignallingError.ServerCapabilities.customerDisplaycarries/tally/v1/info's display advertisement, read byparseDisplayAdvertisementwithDEFAULT_ICE_SERVERS.rateLimitSourcekeys failed claims per source (IPv6 by /64).@tallyui/core/serveraddscreateMemoryDisplaySignalling, an in-memory reference server, anddisplaySignallingContract, the shared suite each plugin's connector runs against its own routes through aDisplaySignallingHarness. -
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'sbillingandshippingaddresses. 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,toOrderCreateEnvelopethrowsUnsupportedOrderVersionError(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 refusestaxAddressor customer addresses below 8, and 8 withouttaxAddress.@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.finalizeOrdertakestaxLocationand stores the tax address with the customer's addresses.useSalerefuses 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_ordersmoves to schema 12; its migration is the identity, and a schema-11 till opening a schema-12 store finds no orders.@tallyui/connector-woocommerce:wooStoreSettingsfillstaxRateTablewhenever the store has a base address and advertises order.create 8 where it advertised 7.toWooOrderPayloadsends a version-8 sale's tax address as WCPOS's_woocommerce_pos_tax_based_onmeta, with the customer's billing and shipping addresses. -
a15835f:
ListOrdersQuerytakes v2's order-history filters (#721):status,customerId,cashierId,registerId,paymentMethod,storeId,createdViaanddateRange(afterandbeforeas ISO 8601 UTC instants ending inZ). A connector lists the fields itslistOrdershonours in the new optionalTallyConnector.orderFiltersand maps each its own way; any other set field is refused withUnsupportedOrderFilterError(code: 'unsupported_order_filter',fields), whichassertOrderFiltersSupportedgives. Also exportsOrderFilterField,ORDER_FILTER_FIELDS,orderFilterFieldsandassertOrderDateRange. -
f819768:
receiptTemplates()lists the store's renderable print templates; WooCommerce reads them from the WCPOS templates route and labels them with thewcposdata model. -
2e691f2:
OrderBuilder.setCouponstakes a store-priced coupon context (StorePricedCouponContext): the store's per-line amounts come off the lines in any rounding mode,Order.couponsanddisplay.couponscarry each code's share of the settlement totals, andcouponPricesStaleflags an order changed since the store priced it, whichfinalizeOrderrefuses;couponPricingBasisgives what the prices depend on.parseInfoCapabilitiesreadscoupons: truefrom/tally/v1/info(#709). -
3a6eb07:
SyncContexttakes an optionalfetch, resolved per request and defaulting toglobalThis.fetch, so a host can pass a wrapper such asmeteredFetchto count requests. The WooCommerce connector sends every pull, reconcile, settings, payment-methods, receipt-templates and customers request throughcontext.fetchwhen 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, asWC_Abstract_Order::get_tax_location()does:shippingfalls back to billing and then to the shop base,billingto the shop base, and the order's_woocommerce_pos_tax_based_on(TAX_BASED_ON_META_KEY) overrides the store's basis when valid;normalizeTaxBasedOnturns anything else intobase.StoreSettingsgains three optional fields a connector fills:taxBasedOn,baseTaxAddressandtaxRateTable(the unfiltered WooCommerce rate table).taxSettingsForLocation(settings, location)in@tallyui/posre-derivestaxRatesandtaxRatesPpmfor an address fromtaxRateTable(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_metricscollection keeps one row per hour, andpersistRequestMetricshydrates a request-metrics counter from it, writes the changed hours every 5 minutes and onstop(), and deletes the hours that fall out of the newest 48 (#683). - 3e33d02: Hourly request metrics ported from WCPOS v2:
createRequestMetricskeeps the newest 48 hourly buckets of requests, bytes, durations, failures and server load, andmeteredFetchwraps afetchso each request is recorded. - 6adf1c5: Sync cadence presets (Eco, Balanced, Realtime, ported from WCPOS v2) and a device-local
sync_cadencecollection that holds the chosen profile, withreadSyncCadence,syncCadence$,setSyncCadenceandresetSyncCadence. - b3f790b:
startSyncCadenceis an opt-in runner that callsreSync()on its targets on a jittered timer set by the sync cadence profile, andstartReplicationtakes an optionalpullBatchSizethat overrides the adapter's pull page size (#683).
@tallyui/primitives
Minor Changes
- e857cf2:
Tooltip.Triggernow opens the way the docs describe (#749): hovering opens it afterTooltip.Root'sdelayDuration(default0, 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 asCameraScanButtonstops showing its tooltip on press; a press still closes an open tooltip and then calls the trigger'sonPress. The newopenOnPressprop (defaultfalse) brings back press-to-toggle for a trigger that does nothing else; on touch, where there is no hover, the tooltip opens only withopenOnPress. The trigger's ownonHoverIn,onHoverOut,onFocusandonBlurare still called andonLongPresspasses 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).
CataloguetakescameraScan(default false) andcameraScanner; with both it puts aCameraScanButtonbeside the search box that opens aCameraScannerPanel. The panel calls no pos hook: the app ownsuseCameraScan(inside itsScanHubProvider) 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'suseBarcodeScannerreceives them like device scans. The panel shows v2's status copy, a permission card for native apps, a flash on eachscanCountchange, and a resize handle with increment and decrement actions and a web pointer drag, reporting the height throughonHeightChange. On the web,ScannerViewfinderstreamsgetUserMediainto a<video>and decodes with theBarcodeDetectorglobal when present, or with an injecteddecoderof the samedetectshape; native apps pass their ownviewfinder.@tallyui/posaddsuseCameraScan(returningCameraScan:offer,reset,scanCount), the purestartDecodeLoop,nativeBarcodeDetector,cameraErrorStatus,detectorFormatToSymbologyand their constants, andcreateScanSessiontakescontinuous, under which a refused repeat restarts its cooldown, so an item resting in view is scanned once. -
44e9e5f:
Carttakescolumns, v2's Cart Settings › Columns (#695): each of Qty, Image, Item, SKU, Price and Total has ashowswitch,quantity.splitadds a Split link under a quantity above 1, andname.skuputs the SKU under the name. The defaults keep today's cart (Qty, Item, Price folding as before, Total).CartColumnHeadsandCartLinetake the samecolumns, andCartLinetakessku,imageUrlandonSplit;cartColumnIdsgives the visible columns.OrderBuilder.splitLineanduseSale().splitLineturn a line of quantity N into N lines of 1, refusing a line with a fixed discount (SPLIT_FIXED_DISCOUNT).cartColumnIdsandCartColumnSettingsare exported from the@tallyui/componentsroot. -
44faba9: An empty
Cartnow 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";emptyTextandemptyIcon(nullfor none) replace them. A cart with only a fee or shipping row keeps its heads and foot and shows no empty line. AddsShoppingCartIcon. -
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;LinePopovertakesactionsandregularValue. -
d6d37ba: ChargeForm takes
kindto 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, andDateRangeMenu, 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;SalesFiltersBartakes an optionalearliestDay.SalesFilters.presetwidens fromDatePresettoDatePreset | 'custom', so code that reads it must handle'custom'. The separatesales-filter-datestext is gone: the menu's trigger shows the dates. -
062e6a2: The second-device customer display's two screens (ADR-085 U5, #684).
CustomerDisplaySettingsis the till's Settings › Customer display: it takesuseTillPairing(pairing)anduseTillDisplays(service)and lists the paired displays with their state (Connected, Connecting…, Waiting for the display, Offline), forgets one after anAlertDialogconfirm, 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.CustomerDisplayPairingis the display device's screen: it takesuseDisplayClient(client), enters the code and the display's name, shows the check code while the cashier confirms, then shows the sale throughCustomerDisplayScreenwith 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'sorderFiltersand every option list, and a pill shows only when its field is supported. pos addsOrderFilterValueandorderFiltersQuery(value, timezone), which turns the bar's value intoListOrdersQueryfilter fields, with the store-day range as UTC instants (beforeexclusive). -
e2be8d1:
RegisterPaneltakespresentation="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 newstoreName,onPrintXReportandnowprops serve the side sheet; the defaultpresentation="dialog"is unchanged.DialogContenttakesside="right".deriveDrawerTermsgivesderiveExpected's figures term by term with row counts and session sales, anduseRegisterSessionreturns them asterms. -
1c44032:
SelectTriggernow 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 passchevron={false}, or it will show two.Avatartakestone('muted', the default and today's look, or'primary', v2's light initials on a solid primary circle) (#718).CustomerSelecttakesshowAvatar(off by default) to draw an initials avatar before each row and the selected summary, andavatarTone(default'primary') (#714). AddsChevronDownIconandavatarInitials. -
aea612a:
Switchtakessize="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/posaddstaxDerivation(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.SaleTaxLocationtypes the sale'staxLocation.@tallyui/componentsaddsTaxBasedOn, 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 addsTaxCalculationSettings, 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:
CataloguetakesvariationsStyle, 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. AddsVariationPickerto@tallyui/components, andvariantFits,matchVariant,disabledOptionsandOptionPicksto@tallyui/pos.
Patch Changes
- 9dda986:
CartNoteInputnow calls the sale note "Customer note", since WooCommerce sends it ascustomer_noteand 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 newlabelprop names the note for the link, the placeholder and the input's accessibility label. Apps passing their ownplaceholderkeep 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:
DialogTitlekeeps itsleading-nonewhen a caller passes a text size such astext-base, and hands the merged class toTextchildren; a caller's ownleading-*still wins. - 9f8d06f: Lighter control borders and a card fill, matching WCPOS v2 (#756). In the light theme
--color-inputis 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 ofButtonandIconButton, andSelectTrigger, now fill withbg-cardinstead ofbg-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,Textareaand theComboboxtrigger fill withbg-cardtoo, so every bordered control matches.
@tallyui/pos
Minor Changes
-
d6c93e9: A camera barcode scanner (#720, v2's scan button and inline camera panel).
CataloguetakescameraScan(default false) andcameraScanner; with both it puts aCameraScanButtonbeside the search box that opens aCameraScannerPanel. The panel calls no pos hook: the app ownsuseCameraScan(inside itsScanHubProvider) 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'suseBarcodeScannerreceives them like device scans. The panel shows v2's status copy, a permission card for native apps, a flash on eachscanCountchange, and a resize handle with increment and decrement actions and a web pointer drag, reporting the height throughonHeightChange. On the web,ScannerViewfinderstreamsgetUserMediainto a<video>and decodes with theBarcodeDetectorglobal when present, or with an injecteddecoderof the samedetectshape; native apps pass their ownviewfinder.@tallyui/posaddsuseCameraScan(returningCameraScan:offer,reset,scanCount), the purestartDecodeLoop,nativeBarcodeDetector,cameraErrorStatus,detectorFormatToSymbologyand their constants, andcreateScanSessiontakescontinuous, under which a refused repeat restarts its cooldown, so an item resting in view is scanned once. -
44e9e5f:
Carttakescolumns, v2's Cart Settings › Columns (#695): each of Qty, Image, Item, SKU, Price and Total has ashowswitch,quantity.splitadds a Split link under a quantity above 1, andname.skuputs the SKU under the name. The defaults keep today's cart (Qty, Item, Price folding as before, Total).CartColumnHeadsandCartLinetake the samecolumns, andCartLinetakessku,imageUrlandonSplit;cartColumnIdsgives the visible columns.OrderBuilder.splitLineanduseSale().splitLineturn a line of quantity N into N lines of 1, refusing a line with a fixed discount (SPLIT_FIXED_DISCOUNT).cartColumnIdsandCartColumnSettingsare exported from the@tallyui/componentsroot. -
fab0922: The second-device customer display's client (ADR-085 U5a, #684, #705), exported from the package root.
createDisplayClientclaims a pairing code, shows the check code while the till's cashier confirms, then collects and keeps the display's token through an injectedDisplayTokenStore. Once paired it drains its signalling inbox, answers each offer from its till with acreateDisplayPeerLink, saysdisplay.hellountil the matchingdisplay.configarrives, 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 itsseqis not lower than the last one applied. A refused token clears the stored token and the screen and goes back toenter-codewithforgotten; anetworkorserverfailure only marks the display offline.useDisplayClientgives itsphaseandstateto React. -
b05db01: The second-device customer display's WebRTC transport (ADR-085 U3, #684), exported from the package root.
createTillPeerLink(the offerer) andcreateDisplayPeerLink(the answerer) give aPeerLink: aDisplayTransportover one ordered data channel labelledDISPLAY_CHANNEL, carrying the display envelopes unchanged, with astateofconnecting,openorclosedandonStateChange. Signalling goes through an injectedSignalPort, and the connection comes from an injectedPeerFactory(the browser'sRTCPeerConnectionby 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:
createHidScannerreads barcodes from a scanner in USB HID Point-of-Sale mode (usage page0x8C) 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'sbillingandshippingaddresses. 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,toOrderCreateEnvelopethrowsUnsupportedOrderVersionError(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 refusestaxAddressor customer addresses below 8, and 8 withouttaxAddress.@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.finalizeOrdertakestaxLocationand stores the tax address with the customer's addresses.useSalerefuses 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_ordersmoves to schema 12; its migration is the identity, and a schema-11 till opening a schema-12 store finds no orders.@tallyui/connector-woocommerce:wooStoreSettingsfillstaxRateTablewhenever the store has a base address and advertises order.create 8 where it advertised 7.toWooOrderPayloadsends a version-8 sale's tax address as WCPOS's_woocommerce_pos_tax_based_onmeta, 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'sorderFiltersand every option list, and a pill shows only when its field is supported. pos addsOrderFilterValueandorderFiltersQuery(value, timezone), which turns the bar's value intoListOrdersQueryfilter fields, with the store-day range as UTC instants (beforeexclusive). -
94040f9:
methodForProviderandmethodDriverspair the store's payment methods with registered payment drivers, as WCPOS v2's app does. -
e2be8d1:
RegisterPaneltakespresentation="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 newstoreName,onPrintXReportandnowprops serve the side sheet; the defaultpresentation="dialog"is unchanged.DialogContenttakesside="right".deriveDrawerTermsgivesderiveExpected's figures term by term with row counts and session sales, anduseRegisterSessionreturns them asterms. -
edeadc3:
createSaleDisplayPublisheranduseSaleDisplaysend the live sale to a customer-displayDisplayLink, withderivePaymentEventported from WCPOS v2. -
8352f75: The sale taxes by the customer's address (#722).
saleTaxContexts(settings)returnsuseSale's newtaxContextForoption: the tax context for a customer's address as WooCommerce's "Calculate tax based on" picks it, fromtaxRateTable, cached so that customers matching the same rates share one context (the store's own context for everyone withouttaxRateTableandbaseTaxAddress). With it, each new sale and each resumed sale is taxed for its customer, andsetCustomerre-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 whencancelTender()brings the cart back.sale.taxLocationreports the address used, withhasCustomer.CustomerSummarygains optionalbillingandshippingaddresses, kept on the open sale and its draft and never sent.createTaxContext(props)buildsTaxProvider's context outside React. -
5afa4d2:
ScanHubProviderkeeps the Web Serial and WebHID scanner connections alive across screens and exposes them throughuseScanHubanduseDeviceScanControls, anduseBarcodeScannernow merges those device scans with keyboard-wedge scans, dropping cross-source duplicates withscanTimeOfand reporting each through the newonScanEventoption (#682). -
d3495c4: The scanner adds a scan hub that merges input sources (
createScanHub,createScanBus,inertScanHub), adedupeScansoperator that drops one physical scan reaching the POS through two source kinds withinSCAN_DEDUP_WINDOW_MS, and a secondonScanargument 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_profilescollection keyed onscannerDeviceKey(), with helpers to read, observe, save (upsert) and remove scanner profiles (#682). -
fa69171:
createSerialScannerreads 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.setCouponstakes a store-priced coupon context (StorePricedCouponContext): the store's per-line amounts come off the lines in any rounding mode,Order.couponsanddisplay.couponscarry each code's share of the settlement totals, andcouponPricesStaleflags an order changed since the store priced it, whichfinalizeOrderrefuses;couponPricingBasisgives what the prices depend on.parseInfoCapabilitiesreadscoupons: truefrom/tally/v1/info(#709). -
73caa25:
createStorePricedDiscountCodes({ supports?, price })givesuseSalediscount codes for a store that prices its own codes, Medusa promotions first. When the order's store-priced coupon prices go stale,useSaleprices its accepted codes again (couponsRepricing,repriceCoupons()for Retry), andstartTenderandcomplete()refuse withCOUPONS_REPRICINGuntil it has.findmay now return atransientrefusal, such asCOUPONS_NEED_CONNECTION. -
23ee429: The sale shows how its tax was worked out.
@tallyui/posaddstaxDerivation(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.SaleTaxLocationtypes the sale'staxLocation.@tallyui/componentsaddsTaxBasedOn, 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 addsTaxCalculationSettings, 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, asWC_Abstract_Order::get_tax_location()does:shippingfalls back to billing and then to the shop base,billingto the shop base, and the order's_woocommerce_pos_tax_based_on(TAX_BASED_ON_META_KEY) overrides the store's basis when valid;normalizeTaxBasedOnturns anything else intobase.StoreSettingsgains three optional fields a connector fills:taxBasedOn,baseTaxAddressandtaxRateTable(the unfiltered WooCommerce rate table).taxSettingsForLocation(settings, location)in@tallyui/posre-derivestaxRatesandtaxRatesPpmfor an address fromtaxRateTable(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.
createTillDisplayServicetakes a connector'sDisplaySignalling, the cashier session, the till's device id, the store'sDisplayAdvertisementand aconfigForper display. It lists the displays this till owns everyLIST_POLL_MSand onrefresh(), keeps one WebRTC link and one display link per display, and fans eachshowCartandshowPaymentout to all of them (d9), replaying the current sale into a link made later. A link that drops, or stays connecting pastCONNECT_TIMEOUT_MS, is replaced at the next successful list. While a display's channel is not open,createSnapshotSenderposts 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 goesoffline(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_founddrops that display. The service is aDisplayLink, socreateSaleDisplayPublisherdrives it. -
b0901ea: The till's pairing flow for a second-device display (ADR-085 U5, d4, d5, #684), exported from the package root.
createTillPairingtakes a connector'sDisplaySignalling, 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 everyPENDING_POLL_MS, each with its display's check code (#705), and at its expiry the pairing goes idle withexpired.confirmpairs a claim and refreshes the display service;declinedrops it;forgetremoves a paired display and refreshes the service, and a refused forget shows inforgetError. Every refusal is named (forbidden,limit,expired,not_found,network,server), and with no cashier session nothing is called.useTillPairinganduseTillDisplaysrender a pairing and a display service in React. -
4fef712:
CataloguetakesvariationsStyle, 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. AddsVariationPickerto@tallyui/components, andvariantFits,matchVariant,disabledOptionsandOptionPicksto@tallyui/pos. -
375a8ce: Print a store's own receipt template from a sale.
wcposSourceFromSentOrder,wcposSourceFromPosOrderandwcposSourceFromStoreOrderturn 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 fromReceiptConfig, andrenderStoreReceiptTemplate(template, sale, context)renders a fetchedwcposortallyuireceipt 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/_excltwins, savings, the tax summary, fiscal and register blocks), andformatWcposReceiptData(data)adds the*_displaystrings, tax-ID labels and the mergedi18nthat WCPOS templates print.formatWcposMoney,WCPOS_DEFAULT_I18NandWCPOS_TAX_ID_LABELSare exported too.
@tallyui/theme
Patch Changes
- 9f8d06f: Lighter control borders and a card fill, matching WCPOS v2 (#756). In the light theme
--color-inputis 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 ofButtonandIconButton, andSelectTrigger, now fill withbg-cardinstead ofbg-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,Textareaand theComboboxtrigger fill withbg-cardtoo, so every bordered control matches.
@tallyui/connector-woocommerce
Minor Changes
-
a3387fc: Customers carry an optional
createdAt, and the optional connector methodsearchCustomersPagereturns a page of a customer search with the store's total (CustomerPage); the WooCommerce connector fills both, fromdate_created_gmtand theX-WP-Totalheader (#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'sbillingandshippingaddresses. 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,toOrderCreateEnvelopethrowsUnsupportedOrderVersionError(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 refusestaxAddressor customer addresses below 8, and 8 withouttaxAddress.@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.finalizeOrdertakestaxLocationand stores the tax address with the customer's addresses.useSalerefuses 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_ordersmoves to schema 12; its migration is the identity, and a schema-11 till opening a schema-12 store finds no orders.@tallyui/connector-woocommerce:wooStoreSettingsfillstaxRateTablewhenever the store has a base address and advertises order.create 8 where it advertised 7.toWooOrderPayloadsends a version-8 sale's tax address as WCPOS's_woocommerce_pos_tax_based_onmeta, 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 thewcposdata model. -
3a6eb07:
SyncContexttakes an optionalfetch, resolved per request and defaulting toglobalThis.fetch, so a host can pass a wrapper such asmeteredFetchto count requests. The WooCommerce connector sends every pull, reconcile, settings, payment-methods, receipt-templates and customers request throughcontext.fetchwhen it is set. -
564433e:
listOrdersnow filters order history on the server. The connector declaresorderFilters(status,customerId,cashierId,storeId,createdVia,dateRange, also exported asWOO_ORDER_FILTERS) and sends them to WCPOSwcpos/v2/ordersasstatus,customer,pos_cashier,pos_store,created_viaandafter/before, withdates_are_gmt=trueand the bounds converted to WooCommerce's strict whole-second comparison.registerIdandpaymentMethod, which WCPOS does not filter on, are refused withUnsupportedOrderFilterErrorbefore any request instead of being dropped, and an id that is not all digits, or an emptystatusorcreatedVia, resolves an empty page without a request. -
5ebdb30: The WooCommerce connector's
paymentMethodslists the store's POS-enabled payment gateways from WCPOS'swcpos/v2/payment-methodsroute, 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,
wooStoreSettingssetstaxBasedOnfrom the store'stax_based_oninwcpos/v2/stores(normalised, so anything other thanbase,billingorshippingreads asbase), andbaseTaxAddressto the same address it already matches rates against (tax_addresswhen it has a country, else thestore_*fields), with each field a string. It leavesbaseTaxAddressout when neither address has a country, and sets neither field when taxes are off. These fields are for display only. The connector does not filltaxRateTableand 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_datanow keeps only the entries with string values, so object meta such as_woocommerce_pos_variable_pricesis dropped (#713).
3.18.0
@tallyui/core
Minor Changes
- 455c39f:
StoreSettingsgains an optionalallTaxRates: 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/taxesrates it already reads; the filteredtaxRatesandtaxRatesPpmthe cart uses are unchanged (#669).
@tallyui/pos
Minor Changes
- 6067d23:
CurrencyProvidertakes an optionalformat(symbol position, thousand separator, decimal separator, decimals), souseCurrencyFormattercan show money the way a store has set it, as WCPOS v2 does. Withoutformat, money reads exactly as before (#667). - 4e0fbb3:
useSaletakes an optionaldefaultCustomer, put on every new sale it starts (the first, and each one after complete, discard, park ornewSale()), 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:
StoreSettingsgains an optionalallTaxRates: 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/taxesrates it already reads; the filteredtaxRatesandtaxRatesPpmthe 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. NewpresetFilters,hasActorandderiveStuckRecordshelpers 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 thaterrorshows (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()staysfalseduring the hold; watchnotice$for it.- @tallyui/core@3.16.0
@tallyui/components
Minor Changes
- 8d0baa4: Components can now be translated:
I18nProvidertakes the store's locale (or uses the device's) and the app's catalogues for other languages, falling back fromfr_CAtofrto the bundled English, anduseTreads 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 withfetch(url, init).catch(noResponse), so that the neutral rule reads them as offline. A bareTypeErrorno longer counts as offline, since our own code throws those too; a platform network code such asECONNREFUSED, on the error or itscause, 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.
startReplicationnow 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 withfetch(url, init).catch(noResponse), so that the neutral rule reads them as offline. A bareTypeErrorno longer counts as offline, since our own code throws those too; a platform network code such asECONNREFUSED, on the error or itscause, 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.
startReplicationnow 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.Cartgains an optionalcheckoutprop 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 sharedKeypadcomponent, also used by the tender pane, andLinePopoveris 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 tooffline,degradedor 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 readsofflineordegraded, and it goes back toonlineon 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,
startReplicationneither pulls nor pushes, so unsent writes wait in the queue. It stays set untilresetUpdateRequired()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 tooffline,degradedor 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 readsofflineordegraded, and it goes back toonlineon 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,
startReplicationneither pulls nor pushes, so unsent writes wait in the queue. It stays set untilresetUpdateRequired()is called.
@tallyui/components
Minor Changes
- d28e6ea: Adds the app shell from WCPOS v2:
AppShellputs aNavRailbeside the page on windows at least 768 wide and 480 tall, and aNavDraweron phones, witharia-currenton the active item and a focus-trapped drawer that closes on Escape or a backdrop press.RegisterBargains optionalstoreName,cashier,syncStatusandonOpenMenuprops, and shows the menu button on its own inside a phone shell. - 01580b8:
Cartgains an optionalorderActionsprop,trueby default. Passfalsewhen 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
useCustomerDisplayhook, and theCustomerDisplayScreencomponent. - 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), andhandoverSlip()builds the hand-over slip with a printable X-report envelope. In@tallyui/components,SwitchConfirmasks with WCPOS v2's wording and names each warning, andHandoverSlipshows the slip. - 1a5af04: The cart line's Price form can show WCPOS v2's quick-discount keys (
quickDiscountsonPriceFormandCart): a key takes its percentage off the line's current price and Apply writes it. The pos app settings gaincart.quickDiscounts, defaulting to v2's[5, 10, 15]and keeping only percentages above 0 and up to 100. - 30cfc94:
RegisterCount'sapprovenow receives the count and may return the store'sapprovaland theapprovedVariance, which go tocloseSession, so a store-verified manager approval works through the shared component; a count edited during approval asks again, and zero-argumentapprovecallers keep working.RegisterPanelshows an "Approval needed" card for a closure the store refused, and its newreapproveprop sends a new approval throughreapproveClosure. - f68c1d9:
Tenderis 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;TenderPaneis the same pane for a host that owns the tender reducer.SplitTenderis now the same component asTender, andCashTendered'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.CartLineshows a variation's attributes under its name and, with the newregularUnitPriceprop, the regular price struck through when the line costs less. - d96bfc2: Add WCPOS v2's catalogue tile details:
InCartBadgeshows how many of a product the cart holds (summed by the newcartQuantitiesfrom@tallyui/pos),CategoryTileshows a category's photo full-bleed with an initial fallback, andProductFilterBarbrings v2's filter chips with In Stock on by default.CataloguetakescartLinesandshowFilterBarto 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
useCustomerDisplayhook, and theCustomerDisplayScreencomponent. - 5f535c8: Adds ESC/POS printing for thermal printers:
encodeEscPoslays a receipt out in the printer's columns and code page,escposis the command builder it uses, andcreateEscPosTransportsends 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), andhandoverSlip()builds the hand-over slip with a printable X-report envelope. In@tallyui/components,SwitchConfirmasks with WCPOS v2's wording and names each warning, andHandoverSlipshows the slip. - 1a5af04: The cart line's Price form can show WCPOS v2's quick-discount keys (
quickDiscountsonPriceFormandCart): a key takes its percentage off the line's current price and Apply writes it. The pos app settings gaincart.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:
InCartBadgeshows how many of a product the cart holds (summed by the newcartQuantitiesfrom@tallyui/pos),CategoryTileshows a category's photo full-bleed with an initial fallback, andProductFilterBarbrings v2's filter chips with In Stock on by default.CataloguetakescartLinesandshowFilterBarto use them.
Patch Changes
- 5a33bd9:
comparisonRangenow 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/mustacheas a dependency, so apps that typecheck@tallyui/posfrom source no longer fail with TS7016.
@tallyui/connector-woocommerce
Minor Changes
- add0b19:
searchCustomersnow 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 theuseCashierhook read them and give the blind-count flag and a Reports gate; a connector withoutcashier()still allows everything, as before. - 0bf0072: Add an optional, online-only
updateCustomer(context, id, patch)connector method with aCustomerPatchtype, and letCustomerandCustomerInputcarry billing and shipping addresses (CustomerAddress) and tax ids (CustomerTaxId). - 135eda4:
CustomerServiceErrornow has an optionalstatus: 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 optionalpaymentMethods(). A connector without it still offers cash and the card terminal, throughdefaultPaymentMethods()andpaymentMethodOf(). - 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 opaqueapprovalon the closure payload, and theregister_approval_requiredandregister_approval_invalidconflict 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/posaddssuggestFloat, 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 asorder.createversion 7, only to servers that advertise version 7 (ADR-083).
Patch Changes
- dfda46e:
SUPPORTED_ORDER_CREATE_VERSIONSnow 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
RefundFormandRefundModal. 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 theorder.refundpayload parts, priced bypriceRefund, for the caller to send. - 31a244c: App settings gain a device-local
ui.theme(system,lightordark, defaultsystem). The newDisplaySettingscomponent lets the user choose the theme, the UI scale and the font set, and saves each choice throughuseAppSettings. - 9beba13: Adds open sales as cart tabs:
useSalegainsswitchSale(it parks the current sale and opens a parked one, or a new one) andcloseSale, andopenSaleslists the open sales forOpenSaleTabs, 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:
useRegisterSessionnow returnsliveAtStore,approvalNeededandclosureApprovalStatus, andactions.reapproveClosuresends 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, notapprovedByalone. 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.create7; a sale parked by 3.12.0 that still carries that first line has it dropped when the command is built. NewnoteDelivery(order)tells whether a stored sale's note was sent, andReceiptandOrdersListshow the note and say when it couldn't be sent to the store. - ff03391: Add font choices for the
ui.fontsetting: the font-family tokens, face list and type sets (system, instrument, grotesk, fraunces, manrope) in@tallyui/theme, and aFontProviderin@tallyui/componentsthat loads the chosen set through an app-supplied loader soTextdraws its body or numbers face. No font files ship in the packages; each app bundles the OFL files and passesloadFonts. - 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 aScaleProviderthat applies the storedui.scalesetting on native and mirrors it onto the web document root so portals scale too.Textnow caps the OS text multiplier atMAX_FONT_SCALE(1.3) unless a caller overrides it.
@tallyui/pos
Minor Changes
- 41fa7bf: Adds cash rounding to the tender:
roundedDuerounds a balance to a hand-counted method's rounding increment, with halves rounding up, andtenderRoundinggives 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 theuseCashierhook read them and give the blind-count flag and a Reports gate; a connector withoutcashier()still allows everything, as before. - 31a244c: App settings gain a device-local
ui.theme(system,lightordark, defaultsystem). The newDisplaySettingscomponent lets the user choose the theme, the UI scale and the font set, and saves each choice throughuseAppSettings. - 9beba13: Adds open sales as cart tabs:
useSalegainsswitchSale(it parks the current sale and opens a parked one, or a new one) andcloseSale, andopenSaleslists the open sales forOpenSaleTabs, 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), andrequeue()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 newsummarizeOutboxHealth,watchOutboxHealthanduseOutboxHealthgive one summary of sales and till updates waiting, rejected or stuck, and whether either outbox needs the cashier to sign in again, with oneflush()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_settingscollection that is never replicated, a typedAppSettingsmap with defaults (ui.scale,ui.font),readAppSettings/writeAppSetting, and auseAppSettingshook. Unknown or invalid stored values fall back to their defaults. - 3b32e4c: Add keyboard-wedge barcode scanning:
useBarcodeScannertells a scanner's fast burst of keys from a person typing and callsonScanwith 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
encodeDisplayMessageand adecodeDisplayMessagethat refuses anything it cannot trust, the five display actions, a cart snapshot overReceiptDatakept under 200 KiB, and adisplayReducerfor the idle, cart and payment screens. - 9e0a750: POS now describes a card reader or payment terminal through a backend-neutral
PaymentDriverinterface, with a registry that finds a payment method's driver by itscapture.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
PrintTransportinterface, withcreatePrintQueuerunning each printer's jobs one at a time so a failed or stalled printer never holds up another. A device-localprinter_profilescollection stores the printers set up on a till, andcreateSystemPrintTransportprints receipt HTML through the browser's print dialog, or through aprintHtmlfunction the app passes in on native (such as expo-print). - 5fedc5d: New receipt templates:
renderReceiptHtmlturns aReceiptDatainto sanitised HTML with a default 80 mm or 58 mm template, andreceiptTemplateData,renderThermalPreviewandsanitizeHtmllet 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:
refundableLinesshows what is still refundable on each order line after earlier refunds, as a quantity plus net and tax amounts.priceRefundprices a chosen refund by each line's cumulative share (ADR-080 amendment 2), caps each quantity at what remains, and returns theorder.refundv1 payload lines. - 5cb82ce:
useRegisterSessionnow returnsliveAtStore,approvalNeededandclosureApprovalStatus, andactions.reapproveClosuresends 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, notapprovedByalone. 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
approvalproof, whichcloseSessionkeeps on the session and never puts on the Z, a fact or a log. The store's approval threshold now wins over the app'svarianceThreshold, and the newclosureVariancehelper and hook action give the variance an approval is bound to; a close whoseapprovedVarianceno 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/posaddssuggestFloat, 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_requiredorregister_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 inrejectedor 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.create7; a sale parked by 3.12.0 that still carries that first line has it dropped when the command is built. NewnoteDelivery(order)tells whether a stored sale's note was sent, andReceiptandOrdersListshow 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 asorder.createversion 7, only to servers that advertise version 7 (ADR-083).
@tallyui/theme
Minor Changes
- ff03391: Add font choices for the
ui.fontsetting: the font-family tokens, face list and type sets (system, instrument, grotesk, fraunces, manrope) in@tallyui/theme, and aFontProviderin@tallyui/componentsthat loads the chosen set through an app-supplied loader soTextdraws its body or numbers face. No font files ship in the packages; each app bundles the OFL files and passesloadFonts. - 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 aScaleProviderthat applies the storedui.scalesetting on native and mirrors it onto the web document root so portals scale too.Textnow caps the OS text multiplier atMAX_FONT_SCALE(1.3) unless a caller overrides it.
Patch Changes
- 09d7140:
tokens.cssno longer wraps its@variant lightand@variant darkblocks in:root, so the dark theme applies on web with Uniwind 1.4, which turned the wrapped rule into:root .darkand 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:
CustomerServiceErrornow has an optionalstatus: 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 ownpush/customersupdate, the same routecreateCustomeruses.
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:
CustomerServiceErrornow has an optionalstatus: 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:
updateCustomersaves the customer's own fields and replaces their default billing and shipping addresses in Medusa's address book. Customers read with their addresses now carrybillingandshipping.
@tallyui/connector-vendure
Minor Changes
- 135eda4:
CustomerServiceErrornow has an optionalstatus: 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
listOrdersandgetOrders, so the shared order history and receipt reprint work on Vendure. It maps Vendure's orders toStoreOrder(newtoVendureStoreOrder,createVendureOrdersandlistVendureOrderDetails); passtallyFields: falsetocreateVendureConnectoron a server without the vendurepos plugin. - 58c9f24: The Vendure connector can now edit a customer (
updateCustomer), using Vendure'supdateCustomermutation 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:
OrderCreateLinetakesanyAttributes, 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).
TallyConnectorgains optionallistOrdersandgetOrders, which read the store's orders online asStoreOrders, with the store's line ids and prior refunds; a connector without them is unchanged. The WooCommerce connector implements both over WCPOSwcpos/v2/orders.@tallyui/posaddsbuildReceiptDataFromPosOrderandbuildReceiptDataFromStoreOrder, which build a receipt marked as a reprint (fiscal.is_reprint,reprint_count) from a stored order, andReceipttakes a prebuiltreceiptand adoneLabel.
@tallyui/components
Minor Changes
- 6a6e925:
CataloguetakespickAnyOptions. When it is set, choosing a variant with local "Any" option groups first asks for a value for each group, then passes them toonSelectas the entry'spicks(#495). - 2076f68:
CarttakescouponDiscountMinor, 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).
TallyConnectorgains optionallistOrdersandgetOrders, which read the store's orders online asStoreOrders, with the store's line ids and prior refunds; a connector without them is unchanged. The WooCommerce connector implements both over WCPOSwcpos/v2/orders.@tallyui/posaddsbuildReceiptDataFromPosOrderandbuildReceiptDataFromStoreOrder, which build a receipt marked as a reprint (fiscal.is_reprint,reprint_count) from a stored order, andReceipttakes a prebuiltreceiptand adoneLabel. - f52dfcd:
OrdersListtakesonOpen. When it is set, each order row, from the till or the store's history, gets an Open button that passes that row toonOpen, so an app can open the order and reprint its receipt. A till row's press still expands its lines, and withoutonOpenthe 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_ordersmoves from schema version 9 to 10. It adds a line'sanyAttributes, and the migration keeps every order byte for byte.CatalogueEntrytakespicksfor a variant's local "Any" option groups.addEntryToCartvalidates 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).
TallyConnectorgains optionallistOrdersandgetOrders, which read the store's orders online asStoreOrders, with the store's line ids and prior refunds; a connector without them is unchanged. The WooCommerce connector implements both over WCPOSwcpos/v2/orders.@tallyui/posaddsbuildReceiptDataFromPosOrderandbuildReceiptDataFromStoreOrder, which build a receipt marked as a reprint (fiscal.is_reprint,reprint_count) from a stored order, andReceipttakes a prebuiltreceiptand adoneLabel.
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).
TallyConnectorgains optionallistOrdersandgetOrders, which read the store's orders online asStoreOrders, with the store's line ids and prior refunds; a connector without them is unchanged. The WooCommerce connector implements both over WCPOSwcpos/v2/orders.@tallyui/posaddsbuildReceiptDataFromPosOrderandbuildReceiptDataFromStoreOrder, which build a receipt marked as a reprint (fiscal.is_reprint,reprint_count) from a stored order, andReceipttakes a prebuiltreceiptand adoneLabel.
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:
CartTotalandCarttakeafterSubtotal, rows rendered directly under Subtotal (e.g. a platform's coupon chips). - fc6e0d8:
CartLinetakesattributesand shows a "Name: Value" row for each.CartandReceiptpass a line's attributes through (#495).
@tallyui/pos
Minor Changes
- fc6e0d8: Cart lines keep a variant's chosen options as
attributes(fromVariantSummary.options) through park, resume and reopen.finalizeOrderstores them onPosOrderLine.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
PosOrderCoupontype 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_ordersmoves 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.createversion 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'sregularUnitPriceMinorandattributeswhen stored, and the receipt'sdisplay.coupons.precheckCommandaccepts it, refuses those fields below version 6, and checks that each receipt coupon row names a coupon in the payload, once. - In version 6,
subtotalMinorandtaxMinorare net of the coupons, and the top-leveldiscountMinorstill sums only the lines' discounts. CommandRejectionCodegainscoupon_invalid(withOrderCreateCouponInvalidData:storeCode,couponCode) andtotal_mismatch(withOrderCreateTotalMismatchData).- 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:
useSaleoffers coupons only when the store also accepts version 6,finalizeOrderrefuses a coupon sale to a store below 6, and the outbox keeps a coupon sale at 6 after anunsupported_versionanswer, so an older store refuses it instead of receiving it without its coupons. - The till's highest
order.createversion (ORDER_CREATE_MAX_VERSIONin@tallyui/pos's command module, not exported from the package) is 6, and a test pins it topos_orders'sentVersionanddowngradedFrommaxima.
- Version 6 is version 5 plus the order's
Patch Changes
- f50fca2:
CatalogueReconcileAdapter.enqueueentries may carryrefreshOnly.
@tallyui/database
Storage, one way:
pos_ordersmoves 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_ordersmoves 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_ordersmoves 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_invalidortotal_mismatchrefusal, which the outbox does not resend (#501, ADR-077 Q-d4b-4). - 811b1f2:
CustomerPicker's search field now has the testIDcustomer-picker-search. A new optionaltestIDprop overrides it. The accessibility label "Search customers" is unchanged.
@tallyui/storage-sqlite
Storage, one way:
pos_ordersmoves 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_ordersmoves 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_ordersis 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 asPosOrderCoupon); - the receipt's
display.coupons; - a line's
attributes(#495); - a line's
regularUnitPriceMinor.
It also lets an order's
sentVersionanddowngradedFrombe 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.
- the order's
-
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
OrderCouponContextor readsOrder.couponsas shipped in 3.9.0:couponIdsis now required and eachOrder.couponsrow has a requiredcouponId.setCouponsrefuses 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/posbuilds 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 fromresolvePrice'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.
finalizeOrderstores the order's coupons and each line's regular price inpos_ordersversion 9. An order without them is stored as before.- Coupons that exclude sale items are still refused.
- Breaking change for code that builds an
-
c2efd7d: The sale applies coupons (#501, ADR-077 step d3c). No app passes a coupon source yet, so nothing changes for a cashier.
useSalereturnsapplyCoupon(code)andremoveCoupon(code).applyCouponrefuses withCOUPONS_UNSUPPORTED("This store's plugin does not support coupons yet") unless the store's capabilities saycoupons: 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.validateCouponbefore 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 carrycalcDiscountsSequentially. New export:COUPONS_UNSUPPORTED.
-
38d3032: A coupon sale is sent as
order.createversion 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'sregularUnitPriceMinorandattributeswhen stored, and the receipt'sdisplay.coupons.precheckCommandaccepts it, refuses those fields below version 6, and checks that each receipt coupon row names a coupon in the payload, once. - In version 6,
subtotalMinorandtaxMinorare net of the coupons, and the top-leveldiscountMinorstill sums only the lines' discounts. CommandRejectionCodegainscoupon_invalid(withOrderCreateCouponInvalidData:storeCode,couponCode) andtotal_mismatch(withOrderCreateTotalMismatchData).- 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:
useSaleoffers coupons only when the store also accepts version 6,finalizeOrderrefuses a coupon sale to a store below 6, and the outbox keeps a coupon sale at 6 after anunsupported_versionanswer, so an older store refuses it instead of receiving it without its coupons. - The till's highest
order.createversion (ORDER_CREATE_MAX_VERSIONin@tallyui/pos's command module, not exported from the package) is 6, and a test pins it topos_orders'sentVersionanddowngradedFrommaxima.
- Version 6 is version 5 plus the order's
-
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 acoupon_invalidortotal_mismatchrefusal 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 withreopenedAtand stays as the record. The function refuses withReopenRefusedOrderErrorwhen 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.isReopenedonly tells that a reopen was started. requeueno longer resends acoupon_invalidortotal_mismatchrefusal.isRequeueable(code)reports whether the outbox resends a refusal with that code.
-
f50fca2: Coupons on one register (ADR-077 d5).
woocommerceDiscountCodes.createSaleCouponSourcegivesuseSaleits coupons from the localcouponscollection. It adds this register's own uses tousage_countandused_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.startCouponUsageRefetchasks 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'sdiscountCodesoption takes aSaleDiscountCodescontract. The contract has five parts:supports,find,check,apply, and an optionalbeforeResume. Each part is given aSaleDiscountState: the order, a copy of the codes already accepted, the categories and the settings. BothSaleDiscountCodesandSaleDiscountStateare 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,couponRefusaland theSaleCouponandSaleCouponSourcetypes are exported underwoocommerceDiscountCodes, not at the top level. A cashier sees no change.
@tallyui/theme
Storage, one way:
pos_ordersmoves 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_ordersmoves 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_v5and passes the coupons gate (plugin 1.9.0 or later) is advertisedorderCreate: 6.WOO_ORDER_CREATE_VERSIONis still 5. createWooCommandTransporttakesacceptsCoupons(a boolean or a function, read at push time). Absent or false, a sale that still carries coupons is refused ascoupon_invalid(storeCode: 'coupons_unsupported') without a request, so wire it to the store'scouponscapability 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,
priceis the gross unit price after the line's own discounts, taken from the till's stored line; without it the order is refused asunsupported_tax_mode. - A store's coupon refusal (
woocommerce_rest_invalid_coupon) is rejected ascoupon_invalid, never retried, with the store's message as plain text,storeCode, andcouponCodewhen 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 thetotal_mismatchwarning (ADR-077's R4 exception). - An envelope without coupons is pushed exactly as before.
- A store that lists
@tallyui/connector-medusa
Storage, one way:
pos_ordersmoves 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_ordersmoves 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_ordersmoves 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).
getVendureOrderalso reads each line'sproratedLinePriceWithTax.vendureRefundablegives each linelineTotalWithTax, and the newvendureLineRefundWithTax(line, quantity)returnsround((r + q) × T / N) − round(r × T / N). A whole-line refund is now exactly the line total; per-unitunitRefundWithTaxcould miss it by a few minor units, and the plugin refused it withamount_mismatch.unitRefundWithTaxstays for display and is deprecated.
3.9.2
@tallyui/core
Patch Changes
- fc37285:
@tallyui/posno longer imports from@tallyui/core/server, whose barrel reachesnode:crypto. Browser bundlers such as Expo Snack could not build@tallyui/pos, and so@tallyui/components, because of it.parseCommandResultandCommandResultErrorare now exported from@tallyui/coreas 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/serveror a Node built-in.
@tallyui/pos
Patch Changes
- fc37285:
@tallyui/posno longer imports from@tallyui/core/server, whose barrel reachesnode:crypto. Browser bundlers such as Expo Snack could not build@tallyui/pos, and so@tallyui/components, because of it.parseCommandResultandCommandResultErrorare now exported from@tallyui/coreas 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/serveror a Node built-in.
3.9.1
@tallyui/database
Patch Changes
- @tallyui/core@3.9.1
@tallyui/components
Patch Changes
-
d0df307:
OrdersListshows the store's order history next to the till's own sales (ADR-052 amendment 1). It takes an optionalhistoryof platform-neutral rows (OrderHistoryRow:id,clientOrderId?,reference,placedAt,totalMinor,currency,itemCount,stateLabel), which the app maps from its own store.- A history row whose
clientOrderIdmatches an outbox order is hidden while that order is inorders. - 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,OrdersListrenders exactly as before.- @tallyui/core@3.9.1
- @tallyui/pos@3.9.1
- @tallyui/primitives@3.9.1
- @tallyui/theme@3.9.1
- A history row whose
@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/coreexports the WooCommerce coupon engine aswoocommerceCoupons(#501, ADR-077 phase b), next towoocommerceTax. It hasrecalculateCoupons,validateCoupon,toCouponConfigsandenrichCategoriesWithAncestors, with their input, result and rejection types. Nothing in TallyUI calls it yet; the sale builder will in phase (d). - 3e2245a:
order.refundversion 1 (ADR-080), an online refund command on the command channel.@tallyui/coreadds the envelope and payload types,refundPayloadErrors(the strict shape check), theorder.refundtype invalidateBatch, an optionalorderRefundlist inprecheckCommand, therefundresult inparseCommandResult, the refusal codes (nothing_to_refund,quantity_exceeds,amount_mismatch,order_state,not_till_order,forbidden,no_open_session), theorderRefundcapability from/tally/v1/info, and refunds inderiveSessionFigures: a session's expected figures fall by the refunds it made, and it returnsrefundsTotalMinorwhen refunds are passed (callers that pass none get the same result as before).@tallyui/posaddssendOrderRefund(transport, envelope), which sends one refund and never queues it.@tallyui/connector-vendure'sgetVendureOrderalso reads each line's placed quantity and prorated prices and each refund's amounts and metadata, andvendureRefundable(order)computes what is left to refund. - a3dc028: The order builder can apply WooCommerce coupons (#501, ADR-077 step d1).
createOrderBuildertakes an optionalcouponContext(the coupon configs, product categories and the store's sequential-discount setting), andsetCoupons(codes)replays the codes through the ported engine on a WooCommerce tax context. The order then carriescoupons({ code, discountMinor, discountTaxMinor }), its lines and totals are the post-coupon figures, anddisplay.couponsshows 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 aRangeError. Other tax contexts ignore the codes. Drafts do not save coupons yet (step d2), anduseSaledoes not expose them yet (step d3).@tallyui/corealso exportswoocommerceCoupons.calculateOrderTotalsandStoreSettings.calcDiscountsSequentially, which the WooCommerce connector now reads from the store's settings. - 006cfb2:
ServerCapabilitiesgains an optionalcoupons(#501, ADR-077 ruling R3). Absent means the store does not accept an order's coupons. The WooCommerce connector'sreadWooCapabilitiesnow also readsGET wcpos/v2/site.couponsis true only when itswcpos_versionis woocommerce-pos 1.9.0 or later; every unclear or failed read gives false.orderCreateis decided as before. Nothing readscouponsyet. - 19093c2: The WooCommerce connector now has a
couponscollection (#500, ADR-077 amendment 2). Its only source is a catalogue reconcile over the store's published coupons. Each coupon's fingerprint isdate_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.reconcilegains an optionalcouponskey. 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
defaultcondition so CommonJS andrequire-condition resolvers (Noderequire, webpack, Snack's bundler) resolve the packages;smoke:packchecksrequire.resolvefor every entry.
@tallyui/database
Patch Changes
- c1bf800: Every exports entry gains a
defaultcondition so CommonJS andrequire-condition resolvers (Noderequire, webpack, Snack's bundler) resolve the packages;smoke:packchecksrequire.resolvefor every entry.
@tallyui/primitives
Patch Changes
- c1bf800: Every exports entry gains a
defaultcondition so CommonJS andrequire-condition resolvers (Noderequire, webpack, Snack's bundler) resolve the packages;smoke:packchecksrequire.resolvefor every entry.
@tallyui/components
Patch Changes
- c1bf800: Every exports entry gains a
defaultcondition so CommonJS andrequire-condition resolvers (Noderequire, webpack, Snack's bundler) resolve the packages;smoke:packchecksrequire.resolvefor every entry.
@tallyui/storage-sqlite
Patch Changes
- c1bf800: Every exports entry gains a
defaultcondition so CommonJS andrequire-condition resolvers (Noderequire, webpack, Snack's bundler) resolve the packages;smoke:packchecksrequire.resolvefor every entry.
@tallyui/pos
Minor Changes
- 3e2245a:
order.refundversion 1 (ADR-080), an online refund command on the command channel.@tallyui/coreadds the envelope and payload types,refundPayloadErrors(the strict shape check), theorder.refundtype invalidateBatch, an optionalorderRefundlist inprecheckCommand, therefundresult inparseCommandResult, the refusal codes (nothing_to_refund,quantity_exceeds,amount_mismatch,order_state,not_till_order,forbidden,no_open_session), theorderRefundcapability from/tally/v1/info, and refunds inderiveSessionFigures: a session's expected figures fall by the refunds it made, and it returnsrefundsTotalMinorwhen refunds are passed (callers that pass none get the same result as before).@tallyui/posaddssendOrderRefund(transport, envelope), which sends one refund and never queues it.@tallyui/connector-vendure'sgetVendureOrderalso reads each line's placed quantity and prorated prices and each refund's amounts and metadata, andvendureRefundable(order)computes what is left to refund. - a3dc028: The order builder can apply WooCommerce coupons (#501, ADR-077 step d1).
createOrderBuildertakes an optionalcouponContext(the coupon configs, product categories and the store's sequential-discount setting), andsetCoupons(codes)replays the codes through the ported engine on a WooCommerce tax context. The order then carriescoupons({ code, discountMinor, discountTaxMinor }), its lines and totals are the post-coupon figures, anddisplay.couponsshows 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 aRangeError. Other tax contexts ignore the codes. Drafts do not save coupons yet (step d2), anduseSaledoes not expose them yet (step d3).@tallyui/corealso exportswoocommerceCoupons.calculateOrderTotalsandStoreSettings.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).
posRefundSchemaandposRefundCollection()definepos_refunds, a new local-only collection that the app adds as it addscash_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 stillpending(the answer is unknown, so resend the same envelope). The session's applied refunds now lower its expected figures.deriveExpectedandwriteClosuretake optionalrefunds. The closure then fillsperiod_refunds_total_minor, each method'srefunds_minorandrefund_count, and listsrefund_idsandpending_refund_ids.useRegisterSessiontakes an optionalrefundscollection. Callers that pass no refunds get the same figures and closures as before.
Patch Changes
- c1bf800: Every exports entry gains a
defaultcondition so CommonJS andrequire-condition resolvers (Noderequire, webpack, Snack's bundler) resolve the packages;smoke:packchecksrequire.resolvefor every entry. - a51d0bb:
takeOverSessionnow checks register contract 2 itself (#498). It takes an optionalregisterContract(the store'scapabilities.register). Below 2, or when the contract is missing, it refuses withRegisterTakeOverError(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.useRegisterSessionpasses its contract through, so the hook behaves as before. Direct callers oftakeOverSessionmust now passregisterContract.
@tallyui/theme
Patch Changes
- c1bf800: Every exports entry gains a
defaultcondition so CommonJS andrequire-condition resolvers (Noderequire, webpack, Snack's bundler) resolve the packages;smoke:packchecksrequire.resolvefor every entry.
@tallyui/connector-woocommerce
Minor Changes
- a3dc028: The order builder can apply WooCommerce coupons (#501, ADR-077 step d1).
createOrderBuildertakes an optionalcouponContext(the coupon configs, product categories and the store's sequential-discount setting), andsetCoupons(codes)replays the codes through the ported engine on a WooCommerce tax context. The order then carriescoupons({ code, discountMinor, discountTaxMinor }), its lines and totals are the post-coupon figures, anddisplay.couponsshows 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 aRangeError. Other tax contexts ignore the codes. Drafts do not save coupons yet (step d2), anduseSaledoes not expose them yet (step d3).@tallyui/corealso exportswoocommerceCoupons.calculateOrderTotalsandStoreSettings.calcDiscountsSequentially, which the WooCommerce connector now reads from the store's settings. - 006cfb2:
ServerCapabilitiesgains an optionalcoupons(#501, ADR-077 ruling R3). Absent means the store does not accept an order's coupons. The WooCommerce connector'sreadWooCapabilitiesnow also readsGET wcpos/v2/site.couponsis true only when itswcpos_versionis woocommerce-pos 1.9.0 or later; every unclear or failed read gives false.orderCreateis decided as before. Nothing readscouponsyet. - 19093c2: The WooCommerce connector now has a
couponscollection (#500, ADR-077 amendment 2). Its only source is a catalogue reconcile over the store's published coupons. Each coupon's fingerprint isdate_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.reconcilegains an optionalcouponskey. 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
defaultcondition so CommonJS andrequire-condition resolvers (Noderequire, webpack, Snack's bundler) resolve the packages;smoke:packchecksrequire.resolvefor every entry.
@tallyui/connector-medusa
Patch Changes
- c1bf800: Every exports entry gains a
defaultcondition so CommonJS andrequire-condition resolvers (Noderequire, webpack, Snack's bundler) resolve the packages;smoke:packchecksrequire.resolvefor every entry.
@tallyui/connector-shopify
Patch Changes
- c1bf800: Every exports entry gains a
defaultcondition so CommonJS andrequire-condition resolvers (Noderequire, webpack, Snack's bundler) resolve the packages;smoke:packchecksrequire.resolvefor every entry.
@tallyui/connector-vendure
Minor Changes
- 3e2245a:
order.refundversion 1 (ADR-080), an online refund command on the command channel.@tallyui/coreadds the envelope and payload types,refundPayloadErrors(the strict shape check), theorder.refundtype invalidateBatch, an optionalorderRefundlist inprecheckCommand, therefundresult inparseCommandResult, the refusal codes (nothing_to_refund,quantity_exceeds,amount_mismatch,order_state,not_till_order,forbidden,no_open_session), theorderRefundcapability from/tally/v1/info, and refunds inderiveSessionFigures: a session's expected figures fall by the refunds it made, and it returnsrefundsTotalMinorwhen refunds are passed (callers that pass none get the same result as before).@tallyui/posaddssendOrderRefund(transport, envelope), which sends one refund and never queues it.@tallyui/connector-vendure'sgetVendureOrderalso reads each line's placed quantity and prorated prices and each refund's amounts and metadata, andvendureRefundable(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, needReadOrder(andReadCustomerfor the customer filter), and write nothing locally. PasstallyFields: falseon a server without the vendurepos plugin.
Patch Changes
- c1bf800: Every exports entry gains a
defaultcondition so CommonJS andrequire-condition resolvers (Noderequire, webpack, Snack's bundler) resolve the packages;smoke:packchecksrequire.resolvefor 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), theVariantOptionGrouptype and the optionalProductTraits.getVariantOptions(the option groups in the backend's display order). The WooCommerce connector implements both: groups are the parent's attributes withvariation: true, byposition, with anidonly for global attributes; replication now keeps each variation attribute's numericid. 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 >= 2onuseRegisterSession), the till sendsregister.session.openas version 2, carrying the till'sdeviceName(trimmed, 1 to 64 characters).reconcileRegisterCommandstakesregisterContractanddeviceName. - Conflict. A session whose open the store refused with
register_session_already_openbecomesconflict. It stays current for its register, so the sheet can show, but it takes no sale. Opening on that register is refused withRegisterSessionConflictError. - Take over and Choose another register.
useRegisterSessionexposesconflict(the refusal'ssessionId,openedAt,openedByanddeviceName, ortakingOver: truewhile the take-over is in flight), plusactions.takeOver()andactions.chooseAnotherRegister().- The standalone functions are
takeOverSessionandabandonSession. - 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 withREGISTER_TAKEOVER_PENDING.
abandoned. Choose another register moves the session toabandoned, a terminal local state: it is never current or sellable, never sent, and it does not block opening. Its unsent commands are rejected locally withregister_session_abandoned.- Answers are derived from stored rows.
adoptRegisterResultsderives 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, anduseRegisterSessionruns it for you. - Outbox.
createRegisterOutboxanduseRegisterOutboxtake an optionalsessions(the till'sregister_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 passsessions: 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
abandonedsession as "needs upgrade" (RegisterNeedsUpgradeError) on that register. That is accepted (ADR-078 decision 9). - v2 open. When the store advertises register contract 2 (
@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), theVariantOptionGrouptype and the optionalProductTraits.getVariantOptions(the option groups in the backend's display order). The WooCommerce connector implements both: groups are the parent's attributes withvariation: true, byposition, with anidonly for global attributes; replication now keeps each variation attribute's numericid. 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
stepand clamped tomin..max. With the thumb focused, Arrow keys move one step, Page Up/Down move ten steps, and Home/End go tomin/max. The Range's width and the Thumb's position follow the value: the primitive givesRangea defaultwidthandThumba defaultposition: absolute; left, and a caller's own style still wins. The slider context gainspercent.disabledignores the pointer and the keys, and the styledSliderdims 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
stepand clamped tomin..max. With the thumb focused, Arrow keys move one step, Page Up/Down move ten steps, and Home/End go tomin/max. The Range's width and the Thumb's position follow the value: the primitive givesRangea defaultwidthandThumba defaultposition: absolute; left, and a caller's own style still wins. The slider context gainspercent.disabledignores the pointer and the keys, and the styledSliderdims 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.
useRegisterSessionreportsneedsUpgrade: trueand no current or sellable session. Opening, counting, closing, stamping a sale and recording cash on it refuse withRegisterNeedsUpgradeError(codeREGISTER_NEEDS_UPGRADE), whose message can be shown to the cashier. Reconcile never sends such a status.isKnownSessionStatusis exported for apps that read session rows themselves. -
0a90e64:
register_sessionsmoves to schema version 1 (ADR-078, #371). The storedstatusis an open string, so later local states need no migration; today's states addconflictandsuperseded. Rows gainserver_session_id, the store session a local id was resumed as, which the migration sets tonullon 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 namingaddRegisterSessionCollection, because adding the collection withaddCollectionswould run RxDB's own migration, which can lose sessions. - Storage is one-way. Once a till has opened this version,
register_sessionsis 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 indocs/DECISIONS.md.
- Apps must switch. Open the collection with
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
deviceNameandsupersedes, optional result fieldssession.openedAt,session.openingFloatMinor,resumedandsuperseded, thesupersededsession status, conflict codesregister_session_supersededandregister_supersede_forbidden, error-data typesRegisterSessionAlreadyOpenDataandRegisterSessionSupersededData, and theregister_session_unknownorder 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:
buildReceiptDatareturns the WCPOS receipt schema 1.4 version (RECEIPT_SCHEMA_VERSION) and itssoftware,registerandfiscalblocks with 1.4 defaults;ReceiptConfigtakesregisterName,softwareandfiscal.ReceipttakesregisterNameand printsRegister: <name>when given (#474).
Patch Changes
- d9a6080: An order the store applied with
register_session_unknownis neither listed under Needs attention nor given a warning line, because the store counts it once its session arrives.
@tallyui/pos
Minor Changes
- 3033b49:
buildReceiptDatareturns the WCPOS receipt schema 1.4 version (RECEIPT_SCHEMA_VERSION) and itssoftware,registerandfiscalblocks with 1.4 defaults;ReceiptConfigtakesregisterName,softwareandfiscal.ReceipttakesregisterNameand printsRegister: <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,tenderVoidSchemaandtenderVoidCollection(): 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_unknownis 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:
readWooCapabilitiesreportsorderCreate: 5only when the store's/statuscapabilities listorder_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, getsorderCreate: 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_stockwarning as "{quantity} sold without stock: {name}" (was "Stock short by {quantity} for {name}"). From medusapos plugin 0.2.0,quantityis 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:
readWooCapabilitiesreportsorderCreate: 5only for a store that proves it takes version 5:/wcpos/v2/statuslistsorder_create_v5ororder_payments_list, or/wcpos/v2/sitereports WCPOS 1.10.20 or later (the oldest release with a proven v5 push). Any other store, including one whose version cannot be read, getsorderCreate: 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
getCategoriestrait (WooCommerce and Medusa categories, Vendure collections, Shopify product type).@tallyui/posaddsproductCategories,listCategoriesandinCategory, which fall back togetCategoryNamesfor connectors without the trait.
@tallyui/components
Minor Changes
- f93720a:
Cataloguegains an opt-in category nav (showCategoryNav, optionalcategories). "All products" comes first, then the categories of the listed products. The choice is kept in the view state ascategoryId(new inCatalogueViewState, with thesetCategoryaction). Visual change:CategoryNavchips are now rectangular (rounded-md) instead of pill-shaped (rounded-full), in every app that renders it.CategoryNavchips are also exposed as radios (role="radio",aria-checked) in a radiogroup labelled "Categories". - 4579599:
Cataloguecan 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); newViewToggleprimitive and purecatalogueViewReducer/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 puresortProducts/productSortValuehelpers.
@tallyui/pos
Minor Changes
- f93720a:
Cataloguegains an opt-in category nav (showCategoryNav, optionalcategories). "All products" comes first, then the categories of the listed products. The choice is kept in the view state ascategoryId(new inCatalogueViewState, with thesetCategoryaction). Visual change:CategoryNavchips are now rectangular (rounded-md) instead of pill-shaped (rounded-full), in every app that renders it.CategoryNavchips are also exposed as radios (role="radio",aria-checked) in a radiogroup labelled "Categories". - 4579599:
Cataloguecan 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); newViewToggleprimitive and purecatalogueViewReducer/normalizeCatalogueViewState/resolveGridColumns. Without the new props the Catalogue is unchanged. - a5b432e: Products report flat categories with string ids through the new optional
getCategoriestrait (WooCommerce and Medusa categories, Vendure collections, Shopify product type).@tallyui/posaddsproductCategories,listCategoriesandinCategory, which fall back togetCategoryNamesfor connectors without the trait. - 6b2277c: Add
ProductTable(a virtualised product table with default trait columns and header sort) and the puresortProducts/productSortValuehelpers.
@tallyui/connector-woocommerce
Minor Changes
- a5b432e: Products report flat categories with string ids through the new optional
getCategoriestrait (WooCommerce and Medusa categories, Vendure collections, Shopify product type).@tallyui/posaddsproductCategories,listCategoriesandinCategory, which fall back togetCategoryNamesfor connectors without the trait.
@tallyui/connector-medusa
Minor Changes
- a5b432e: Products report flat categories with string ids through the new optional
getCategoriestrait (WooCommerce and Medusa categories, Vendure collections, Shopify product type).@tallyui/posaddsproductCategories,listCategoriesandinCategory, which fall back togetCategoryNamesfor connectors without the trait.
@tallyui/connector-shopify
Minor Changes
- a5b432e: Products report flat categories with string ids through the new optional
getCategoriestrait (WooCommerce and Medusa categories, Vendure collections, Shopify product type).@tallyui/posaddsproductCategories,listCategoriesandinCategory, which fall back togetCategoryNamesfor connectors without the trait.
@tallyui/connector-vendure
Minor Changes
- a5b432e: Products report flat categories with string ids through the new optional
getCategoriestrait (WooCommerce and Medusa categories, Vendure collections, Shopify product type).@tallyui/posaddsproductCategories,listCategoriesandinCategory, which fall back togetCategoryNamesfor 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'slineTaxfor 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
subtotalequals its discountedtotal, 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 asshipping_linesand custom lines as a WCPOS misc product (product_id0 with_woocommerce_pos_data), and the connector now reportsorderCreate: 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.createversion 5 (ADR-075): fees, shipping and custom lines in the command types, withprecheckCommandand 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
woocommercetax strategy (ADR-076): several rates per class with priority and compound tax, and WooCommerce's per-rate per-line rounding (or at subtotal), throughStoreSettings.taxRatesandTaxContext.getTaxRates; other strategies are unchanged.
Patch Changes
- fcace3b:
ServerCapabilities.lineTaxandparseLineTax: a store's/tally/v1/infosays 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_paymentskeeps all of them.ServerCapabilities.multiplePaymentstells the app whether to offer split tender. The connector also reportslineTax: { none: true, classes: true }itself, since WCPOS has no/tally/v1/info. - c7aa412: Woo products carry
tax_classandtax_status(schema version 2: a till resyncs its products once) through thegetTaxClass/getTaxStatustraits. Core adds the optionalgetTaxStatustrait, which the cart andaddProductpass to the line. - 611ce1c: The connector now reads the store's tax settings and capabilities (the WooCommerce tax strategy, ADR-076);
parseTaxRoundingaccepts thewoocommercegranularity.
@tallyui/pos
Minor Changes
- f604f87: Orders with fees, shipping or custom lines can be completed and sent as
order.createversion 5 to a store that accepts it (others refuse at completion, naming the plugin upgrade).pos_ordersmoves 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
woocommercetax strategy (ADR-076): several rates per class with priority and compound tax, and WooCommerce's per-rate per-line rounding (or at subtotal), throughStoreSettings.taxRatesandTaxContext.getTaxRates; other strategies are unchanged.
Patch Changes
- db9d97a:
buildClosureDocument'shas_salesis 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.sendtakes an optional, local-onlyOrderTransportContext. - c7aa412: Woo products carry
tax_classandtax_status(schema version 2: a till resyncs its products once) through thegetTaxClass/getTaxStatustraits. Core adds the optionalgetTaxStatustrait, which the cart andaddProductpass to the line.
@tallyui/connector-woocommerce
Patch Changes
- f604f87: Orders with fees, shipping or custom lines can be completed and sent as
order.createversion 5 to a store that accepts it (others refuse at completion, naming the plugin upgrade).pos_ordersmoves 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.sendtakes an optional, local-onlyOrderTransportContext. - 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_paymentskeeps all of them.ServerCapabilities.multiplePaymentstells the app whether to offer split tender. The connector also reportslineTax: { none: true, classes: true }itself, since WCPOS has no/tally/v1/info. - c7aa412: Woo products carry
tax_classandtax_status(schema version 2: a till resyncs its products once) through thegetTaxClass/getTaxStatustraits. Core adds the optionalgetTaxStatustrait, which the cart andaddProductpass to the line. - 611ce1c: The connector now reads the store's tax settings and capabilities (the WooCommerce tax strategy, ADR-076);
parseTaxRoundingaccepts thewoocommercegranularity.
3.2.1
@tallyui/database
Patch Changes
- @tallyui/core@3.2.1
@tallyui/components
Patch Changes
- 50ae7de: New
SplitTenderview: take several payments for one sale (cash and card), with remaining due and change, overuseSale().addTender/removeTender;Tenderis 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):
useSaleaddFee,addShipping,addCustomLineand their update/remove, with tax, totals, display and receipt rows. Orders carrying them can't be completed until a later release sendsorder.createversion 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:
useSaletakes an optionalcurrentPrice(variantId)andresume()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);ParkedSalestakes optionalonPark/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:
useSaletakes an optionalcurrentPrice(variantId)andresume()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);ParkedSalestakes optionalonPark/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:
vendureAuthgainsfieldSets(email and password, or a device key) and honours an optional credentialkind: 'password' | 'api-key', so a SignIn screen can offer a device key without its own form; credentials withoutkindbehave as before.
Patch Changes
- @tallyui/core@3.2.0
3.1.1
@tallyui/core
Patch Changes
- 63a7431:
TallyConnectorgains an optionalemailReceipt(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,createCustomeroverwcpos/v2/customersandpush/customers) andemailReceiptoverwcpos/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) overuseSale().setUnitPrice, with an optional reason passed toonPriceChange; newPriceFormandparsePrice. - 4a93ef6:
CustomerSelectrenders its search input (it tookonSearchandplaceholderbut showed no input), so apps no longer compose their own. - ae38ef8: New
ParkedSalessheet (components) anduseParkedSales(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_ordersversion 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()andremoveTender()take several payments for one sale. Change comes only from cash, and a card tender is capped at the balance due (ADR-072).setTendernow replaces every payment with the one given.
Patch Changes
- ae38ef8: New
ParkedSalessheet (components) anduseParkedSales(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
externaltender 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; needsReadCustomerandCreateCustomer.- @tallyui/core@3.0.4
3.0.3
@tallyui/database
Patch Changes
- @tallyui/core@3.0.3
@tallyui/components
Patch Changes
- 2215eae:
orderReferenceis exported from the package root, so an app's own receipt can print the same order reference asOrdersListandReceipt. - 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
draftsoption,park()andresume(id)), using OrderManager's draft format; new exportsorderDraftSchema,writeOrderDraft,restoreOrderDraftandparkedOrderSummaries$. - 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
loadingprop, defaulting tolastSyncedAt === 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 withoutposOrderis marked '(draft)'. Apps pass useSale's receipt-stageposOrderto<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}oronEscapeKeyDown+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}oronEscapeKeyDown+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_uuidmeta and barcodes fromglobal_unique_idwhen 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:
precheckCommandnow takes the server's own supported versions as a required second argument,{ orderCreate, register }, and checks against them; itsunsupported_versionmessage anddataname 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 aTypeError. This is part of 3.0.0's breaking changes and adds no extra major.SUPPORTED_ORDER_CREATE_VERSIONSandSUPPORTED_REGISTER_VERSIONSstay exported as the till's capability (whattoOrderCreateEnvelopecan produce), not what a server supports.
Minor Changes
-
4de75c2: A batch over 50 commands is answered
413with{ code: 'batch_too_large', maxCommands: 50, message: 'At most 50 commands are allowed' }, never400(ADR-038, Front desk ruling 18):@tallyui/core/server'svalidateBatchreturns thatbodyon its413failure so plugins send it as is.@tallyui/core/servernow also exportsMAX_COMMANDS_PER_BATCH, and@tallyui/coreand@tallyui/core/serverexport theBatchTooLargeBodytype. -
894b6ae: One catalogue reconcile runner replaces the id and fingerprint reconcile runners (#248, part A).
startIdReconcileandstartFingerprintReconcileremain 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
logcallback.
- 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;
maxPagesis 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
keyto match fetched documents by the local primary key, so it works wheredoc.idis not the primary key;fetchByIdsthen receives the queued entries; - a
tombstoneentry is deleted without a fetch; - a fetched document keeps a
_deletedthe connector set.
- it takes an optional
@tallyui/coreaddsCatalogueReconcileAdapterandTallyConnector.reconcile.catalogue.- Connector collections enable RxDB local documents.
-
04905ef:
Cataloguenow applies the provider's reconciled stock overlay itself (tiles, search and the variant chooser agree), anduseStockOverlaidanduseStockOverlayAsOfare new. -
faa7cda: Expose ConnectorUnauthorizedError for expired or rejected stored credentials in Vendure and Medusa requests.
-
9f34416:
@tallyui/core/serveradds the batch envelope check, the per-command version pre-check, the supported versions,totalWarningsandparseCommandResult(throwingCommandResultError), byte-identical to the medusapos plugin's. -
fb57e1d:
@tallyui/core/serveradds 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, theorder.createpayload 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 exportsBatchOutcomewithinProgressOutcomeandtransientOutcome. It also exportsCommandRejectionCodeandplatformErrorResult(a newplatform_errorcode). -
ba63f04:
CommandWarninggains{ code: 'customer_ignored'; customerId: string }(#266): a sale whosecustomerIddoesn't resolve is kept as a guest sale.knownWarningskeeps it andparseCommandResultaccepts it whencustomerIdis 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.
combinePullAdapterstakes an optionalkeyfor resolving duplicates across its sub-adapters. It defaults todoc.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:
CommandWarninggains{ 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.parseCommandResultaccepts it whenfieldsis non-empty, eachfieldis one of the three names with none repeated, and each entry's two values are different safe integers.knownWarningsapplies 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/infoanswer 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
taxRoundingvalue 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 notaxRoundingkey. - Type change:
parseInfoCapabilitiesnow returnsServerCapabilities | undefined. It isundefinedwhen the body carries a malformedtaxRounding.
- Unknown: a 2xx that is not JSON, and a
-
54ee98a:
@tallyui/core/serveradds theinternal_errorrejection code andinternalErrorResult. -
27d736e:
CommandWarninggainsbridgeMinorontotal_mismatchand a newtax_rate_mismatchcode, 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).
ProductTraitsgains an optionalgetTaxClass(doc, variantId?), the backend's tax class id, a key ofStoreSettings.taxRatesPpm.addProductandaddEntryToCartpass it toaddLinethrough the newAddLineInput.taxClass, which the tax context resolves; a connector without the accessor is unchanged (the default rate).TaxProvidertaxes a class with no rate at the default rate and warns once per class through the newtaxLogger. connector-vendure replicates each variant'staxCategory { 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.createenvelope version 3, its display and tax-rate wire types, and the payload'ssessionIdand customer reference.At capability 3,
finalizeOrdercopies the receipt'sdisplayandtaxByRateinto the sale. Version 3 sends those figures and the sale's session (stamped or late) assessionId. Older orders keep their existing envelope version.Move
pos_ordersto schema version 3 with asessionIdindex and the optionalsentVersionanddowngradedFromfields (declared for the outbox's version fallback, not yet written). Apps must openpos_orderswithaddPosOrderCollection, which migrates it. -
bf2d805:
order.createversion 4 (#286): everydiscountMinor, 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'ssentVersiondoesn'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
payloadShapeErrorsto the newpayloadBoundErrors, whichprecheckCommandcalls after the replay lookup, so an applied order resent with a long title replays asduplicate;payloadShapeErrorskeeps the types, thecustomerIdandsessionIdbounds and the NUL check.useSaleapplies a tender before logging a dropped reference, andadd()refuses a product whose id or v3 tax code finalize would refuse; the tender's reference field caps at 255 characters.finalizeOrdernow freezes the sent form (names and discount labels cut, an unsendable customer email or id left out) andtoOrderCreateEnvelopesends 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()andcreateMedusaAdminUserConnector()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,medusaAdminUserConnectorandvendureConnectorare deprecated: one instance for the whole app can leak queued reconcile work across stores. They are removed in 4.0. - A development warning.
startReplicationwarns once when the same adapter object replicates into two collections at once. - Refetch budget by requests.
refetchBatchSizeon the reconcile adapters makes a page that enqueuesnrefetches takeceil(n / refetchBatchSize)request-budget slots (WooCommerce 100, Medusa 100, Vendure 1,000). - WooCommerce 426 errors. A foreign (non-WCPOS) 426 keeps the store's
codebeside its message, and the message is capped at 200 characters.
- New factories.
-
222543b: Add
RegisterCommandType,RegisterCommandEnvelopeandAnyCommandEnvelope, register payloads and results, and the register server capability.CommandTypeandCommandEnvelopeare unchanged.Record the local
register_commandsledger throughreconcileRegisterCommands, gated inuseRegisterSessionby its newcommandsandcapabilitiesoptions. Commands are recorded but not sent. Medusa reads theregistercontract. -
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 stringcode;errorKind(error)returns'till','store'or'transient'. SyncNotice({ code, since, fixedBy, software?, minVersion?, fix? }) describes a stopped pull.ConnectorUnauthorizedErroris fixed by the till.
- An error class declares
@tallyui/databasestartReplicationhandles the three kinds and returns RxDB's state plusnotice$andresume():- 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
retryTimeto 5 minutes. It waits at least a validretryAfterMs(a finite number of zero or more), capped at 1 hour.
- till: one request, one notice, then the pull stays stopped until the app calls
@tallyui/components:SyncStatustakes an optionalpullNoticeand 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:WooDateFilterErroris fixed by the store, and carriessoftwareandminVersion.WooMissingUuidErrorgainscode: 'missing_plugin'and is fixed by the store.
@tallyui/connector-vendure: a newVendureTimezoneConfigError(store_misconfigured, with a plainfix) replaces the plain error when theupdatedAtprobe shows a server that isn't in UTC.
-
5ed6281: The till computes tax with the store's rounding strategy (#287, ADR-071).
ServerCapabilitiesgainstaxRounding(core exportsTaxRounding):per_order,per_line_itemsorper_rate_group_items, each withhalf_away_from_zeroorhalf_up, orcustom. Absent, andcustom, mean today'sper_orderwith half away from zero.TaxProvidertakesroundingandrateCodes(tax class → the backend's rate name, forper_rate_group_items); the order records the strategy astaxRounding, andtaxLinesByRatetakes it as a fourth argument. The algorithms are indocs/contract/field-kinds.md. -
5a204a9:
StoreSettingsgains a derivedtaxRounding.useStoreSettingsfills it from the context's capabilities, or else from one read of the connector'scapabilities()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 withoutcapabilitiesgives the default rounding.taxProviderPropspasses it toTaxProviderasrounding, so the till rounds tax like the store with no app code (#324).custompasses no rounding, and an explicitroundingprop still wins. -
7d1bc98: Add
parseTaxRoundingandparseInfoCapabilities, which read/tally/v1/infoincluding its top-leveltaxRounding(#287). The Medusa connector's capability read now carries the store'staxRounding. -
8cf3ea4: A till tells "sign in again" apart from "signed in, but not allowed" (found by the Medusa POS app's adoption).
ConnectorUnauthorizedError.statusis now required, typed401 | 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
forbiddennotice, 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_itemsstore 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 liketaxRatesPpm, includingdefault.vendureStoreSettingsreads each rate'snamein the tax-rate query it already runs, so no extra request is made. Only the ratestaxRatesPpmuses count, anddefaultfollows the same default-category rule.taxRateCodesis left out when no names come back.taxProviderProps(settings)passestaxRateCodesto<TaxProvider>asrateCodes.
-
ddd9e85: The WooCommerce catalogue reconcile uses the WCPOS products fast path (#313). When
wcpos/v2/statuslistsproducts_id_fast_pathincapabilities, 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.remoteon 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:
parseCommandResultnow accepts atotal_mismatch'sbridgeMinorand thetax_rate_mismatchwarning code, so a plugin replaying a stored v3 result no longer fails.knownWarningsis lenient about a bad optionalbridgeMinor(dropping just that field, not the whole warning) and about a non-arraywarningsvalue.OrdersList's rounding line now reads "Store calculated …; a rounding line of … brought it to …".Cataloguekeeps its input array's identity when the stock overlay changes nothing, and takes the latest oflastStockCheckAt, the provider'sstockOverlayAsOfandlastSyncedAtfor its "stock as of" time. -
6673faf: RxDB 17.5.0.
@tallyui/storage-sqlite:- Its
rxdb-premiumpeer is now17.5.0. Apps installrxdb-premium@17.5.0together withrxdb@17.5.0. - Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
- Its
@tallyui/pos:- Its
rxdbpeer is now~17.5.0. - Opening
pos_ordersrejects withPosOrderOpenClosedErrorwhen 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.
- Its
@tallyui/database:createTallyDatabasereturns 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_ordersis at schema version 4, and an older build (such as@tallyui/pos2.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 indocs/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
rxdbandrxdb-premiumto exactly17.5.0. - RxDB 17 defaults a replication's
toggleOnDocumentVisibleto 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'splugins/replicationsource, 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,
useStoreSettingsgiveserrorwithoutnextRetryAtand doesn't retry by itself, so the app prompts. That covers a till-class error (a 401, or a till that needs updating) and aSignInErrorwithcode: 'invalid_credentials'; any other sign-in error still waits and retries. Every other failure still waits and retries. - A
/tally/v1/infoJSON body that isn't an object (null, an array or a scalar) is unknown, not the default rounding.
- 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,
-
1f4d0ab:
isStorageWorkerStartErrorandisStorageWorkerFailurealso 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 newisRxdbRemoteVersionMismatchin@tallyui/core, which recognises RM1 by structure only: an RxError's owncode, or the remote storage'scould not create instancewrapping of an RxError's JSON.@tallyui/storage-sqlitenow has@tallyui/coreas 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
ConnectorUnauthorizedErrorwithstatus: 403, theforbiddennotice, 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 nowWooPluginUpdateRequiredError(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 isforbidden. A caller that omitsstatusgetsunauthorized, 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.
- Vendure: a signed-in user missing a permission (confirmed by the session probe) is now
@tallyui/database
Major Changes
-
6673faf: RxDB 17.5.0.
@tallyui/storage-sqlite:- Its
rxdb-premiumpeer is now17.5.0. Apps installrxdb-premium@17.5.0together withrxdb@17.5.0. - Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
- Its
@tallyui/pos:- Its
rxdbpeer is now~17.5.0. - Opening
pos_ordersrejects withPosOrderOpenClosedErrorwhen 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.
- Its
@tallyui/database:createTallyDatabasereturns 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_ordersis at schema version 4, and an older build (such as@tallyui/pos2.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 indocs/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
rxdbandrxdb-premiumto exactly17.5.0. - RxDB 17 defaults a replication's
toggleOnDocumentVisibleto 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'splugins/replicationsource, not tested).
Minor Changes
-
894b6ae: One catalogue reconcile runner replaces the id and fingerprint reconcile runners (#248, part A).
startIdReconcileandstartFingerprintReconcileremain 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
logcallback.
- 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;
maxPagesis 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
keyto match fetched documents by the local primary key, so it works wheredoc.idis not the primary key;fetchByIdsthen receives the queued entries; - a
tombstoneentry is deleted without a fetch; - a fetched document keeps a
_deletedthe connector set.
- it takes an optional
@tallyui/coreaddsCatalogueReconcileAdapterandTallyConnector.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).
completeonCatalogueReconcileSummary,FingerprintReconcileResultandIdReconcileResult: true when the pass ran from its first page to its last in one go, sounlistedandunreportedare 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.lastCompleteAton 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()andcreateMedusaAdminUserConnector()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,medusaAdminUserConnectorandvendureConnectorare deprecated: one instance for the whole app can leak queued reconcile work across stores. They are removed in 4.0. - A development warning.
startReplicationwarns once when the same adapter object replicates into two collections at once. - Refetch budget by requests.
refetchBatchSizeon the reconcile adapters makes a page that enqueuesnrefetches takeceil(n / refetchBatchSize)request-budget slots (WooCommerce 100, Medusa 100, Vendure 1,000). - WooCommerce 426 errors. A foreign (non-WCPOS) 426 keeps the store's
codebeside its message, and the message is capped at 200 characters.
- New factories.
-
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 stringcode;errorKind(error)returns'till','store'or'transient'. SyncNotice({ code, since, fixedBy, software?, minVersion?, fix? }) describes a stopped pull.ConnectorUnauthorizedErroris fixed by the till.
- An error class declares
@tallyui/databasestartReplicationhandles the three kinds and returns RxDB's state plusnotice$andresume():- 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
retryTimeto 5 minutes. It waits at least a validretryAfterMs(a finite number of zero or more), capped at 1 hour.
- till: one request, one notice, then the pull stays stopped until the app calls
@tallyui/components:SyncStatustakes an optionalpullNoticeand 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:WooDateFilterErroris fixed by the store, and carriessoftwareandminVersion.WooMissingUuidErrorgainscode: 'missing_plugin'and is fixed by the store.
@tallyui/connector-vendure: a newVendureTimezoneConfigError(store_misconfigured, with a plainfix) replaces the plain error when theupdatedAtprobe shows a server that isn't in UTC.
-
ddd9e85: The WooCommerce catalogue reconcile uses the WCPOS products fast path (#313). When
wcpos/v2/statuslistsproducts_id_fast_pathincapabilities, 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.remoteon 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
keptevent withreason: 'brake'carries amessagea 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
duplicateevent with the codeduplicate_match_key. The copy is tombstoned only whenconfirmGoneproves the store doesn't back it, and the mass-delete brake still applies. WooCommerce'sconfirmGonenow 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
lastCompleteAthonest (#338).- The fingerprint reconcile's
state$moveslastCompleteAtonly on a pass whose result is complete. A pass that read no pages, which givescomplete: 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
lastCompleteAtonly when the stored value is newer, so a load that resolves after a pass has completed can't roll it back.
- The fingerprint reconcile's
-
20b6321: A catalogue pass that yields no pages at all no longer counts (#368). It is not complete, it moves neither
lastCompleteAtnor 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:
isStorageWorkerStartErrorandisStorageWorkerFailurealso 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 newisRxdbRemoteVersionMismatchin@tallyui/core, which recognises RM1 by structure only: an RxError's owncode, or the remote storage'scould not create instancewrapping of an RxError's JSON.@tallyui/storage-sqlitenow has@tallyui/coreas 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.statusis now required, typed401 | 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
forbiddennotice, 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.cataloguelists 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.productsnow combines the product pull with the reconcile feed, withlegacyKey: '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/statuscapabilities(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:
Cataloguenow applies the provider's reconciled stock overlay itself (tiles, search and the variant chooser agree), anduseStockOverlaidanduseStockOverlayAsOfare 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), andSyncStatustells 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 showingretrying (status_404); the stuck line shows the same words, with no raw code.SyncStatustakes an optionalpluginName(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 onecreateBackendNotFound()tracker asbackendNotFoundto bothcreateOrderOutboxandcreateRegisterOutboxso 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 instuck.orders,useOrderOutbox'sstuckCommandIds,needsAttention'sstuckCommandIdsoption,OrdersList'sstuckprop (each order with its own time and reason), andSyncStatus'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 astimeout, which counts like a 503 and never pauses a clock, and keepsnetworkfor 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 stringcode;errorKind(error)returns'till','store'or'transient'. SyncNotice({ code, since, fixedBy, software?, minVersion?, fix? }) describes a stopped pull.ConnectorUnauthorizedErroris fixed by the till.
- An error class declares
@tallyui/databasestartReplicationhandles the three kinds and returns RxDB's state plusnotice$andresume():- 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
retryTimeto 5 minutes. It waits at least a validretryAfterMs(a finite number of zero or more), capped at 1 hour.
- till: one request, one notice, then the pull stays stopped until the app calls
@tallyui/components:SyncStatustakes an optionalpullNoticeand 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:WooDateFilterErroris fixed by the store, and carriessoftwareandminVersion.WooMissingUuidErrorgainscode: 'missing_plugin'and is fixed by the store.
@tallyui/connector-vendure: a newVendureTimezoneConfigError(store_misconfigured, with a plainfix) replaces the plain error when theupdatedAtprobe shows a server that isn't in UTC.
-
a94b255:
OutboxStategainsrejected?: number: the order outbox publishes the count ofpos_ordersthe store refused (syncStatus: 'rejected') wherever it publishespending, so it rises when a batch result rejects an order and falls whenrequeue()sends one again. The register outbox leaves it unset. Whilerejectedis above 0,SyncStatusnever 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. Withrejected0 or unset, nothing changes. When the store refused a whole batch (refusedset, 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:
SyncStatustakes an optionalregisterState(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, onceregisterState.stuckis 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 sharedbackendNotFoundtracker onstop()and take it up again onstart()orflush(). -
8cf3ea4: A till tells "sign in again" apart from "signed in, but not allowed" (found by the Medusa POS app's adoption).
ConnectorUnauthorizedError.statusis now required, typed401 | 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
forbiddennotice, 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:
CommandWarninggains{ code: 'customer_ignored'; customerId: string }(#266): a sale whosecustomerIddoesn't resolve is kept as a guest sale.knownWarningskeeps it andparseCommandResultaccepts it whencustomerIdis 1 to 64 characters; the orders list renders it. -
24b74fd:
CommandWarninggains{ 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.parseCommandResultaccepts it whenfieldsis non-empty, eachfieldis one of the three names with none repeated, and each entry's two values are different safe integers.knownWarningsapplies 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, whichfinalizeOrderuses too):- line names, discount labels and payment references are cut to 255 characters, but ids never are;
- a customer email or id that
order.createwould 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, anOrderwhose customer id may be missing. The receipt stage,buildReceiptDataandReceipttake it, and a plainOrderstill fits. -
27d736e:
CommandWarninggainsbridgeMinorontotal_mismatchand a newtax_rate_mismatchcode, 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):
SyncStatusandOrdersListbuild their "since {time}" and "since about {time}" text with one shared helper.useRegisterOutbox's docs now say whentransport()is called, and that the latestisEnabledandonResultare used without restarting the outbox.
-
af623c9: The order.create string lengths move from
payloadShapeErrorsto the newpayloadBoundErrors, whichprecheckCommandcalls after the replay lookup, so an applied order resent with a long title replays asduplicate;payloadShapeErrorskeeps the types, thecustomerIdandsessionIdbounds and the NUL check.useSaleapplies a tender before logging a dropped reference, andadd()refuses a product whose id or v3 tax code finalize would refuse; the tender's reference field caps at 255 characters.finalizeOrdernow freezes the sent form (names and discount labels cut, an unsendable customer email or id left out) andtoOrderCreateEnvelopesends 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):
finalizeOrderwritestaxRoundingon the stored order, the default (per_order,half_away_from_zero) included, andcustomas{ granularity: 'custom' }. It is the till's own record and is never sent inorder.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 itsbreakdowns.tax_rounding_mixedistruewhen a session's sales used more than one strategy (acustomsale counts as the default it applied);ClosureSheetthen says so, andbuildClosureDocumentcarries the same line ready to print asclosure.tax_rounding_note(TAX_ROUNDING_MIXED_NOTE), for the apps' closure templates.PosOrder.taxRoundingis now required in the type.pos_ordersmoves to schema version 6:taxRoundingis 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:
parseCommandResultnow accepts atotal_mismatch'sbridgeMinorand thetax_rate_mismatchwarning code, so a plugin replaying a stored v3 result no longer fails.knownWarningsis lenient about a bad optionalbridgeMinor(dropping just that field, not the whole warning) and about a non-arraywarningsvalue.OrdersList's rounding line now reads "Store calculated …; a rounding line of … brought it to …".Cataloguekeeps its input array's identity when the stock overlay changes nothing, and takes the latest oflastStockCheckAt, the provider'sstockOverlayAsOfandlastSyncedAtfor its "stock as of" time. -
c00e1ea:
OrdersListshows 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, showsplatform_error's sentence: "The online store refused this sale. Ask the store owner to look at the till's sync log." Anidempotency_mismatchshows 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 forunsupported_version(whose log previously used the message itself as its text). -
6673faf: RxDB 17.5.0.
@tallyui/storage-sqlite:- Its
rxdb-premiumpeer is now17.5.0. Apps installrxdb-premium@17.5.0together withrxdb@17.5.0. - Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
- Its
@tallyui/pos:- Its
rxdbpeer is now~17.5.0. - Opening
pos_ordersrejects withPosOrderOpenClosedErrorwhen 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.
- Its
@tallyui/database:createTallyDatabasereturns 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_ordersis at schema version 4, and an older build (such as@tallyui/pos2.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 indocs/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
rxdbandrxdb-premiumto exactly17.5.0. - RxDB 17 defaults a replication's
toggleOnDocumentVisibleto 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'splugins/replicationsource, not tested).
-
0e4c9cc: The "since" a cashier reads is a real time (#253).
OutboxState.stuck(both outboxes) gainsfirstFailedAt: the wall-clock time the first failure of the current stuck run was answered, so an offline gap no longer moves it.sincekeeps its meaning, the clock's virtual start, and still drives the 15-minute threshold.firstFailedAtis kept in memory only. After a restart it is absent, andSyncStatusandOrdersListshow the stored time instead, worded "since about 2:49 AM". -
d6079b4:
SyncStatusinserts the plugin name and times literally (a$&,$1or$$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,accessibilityLiveRegionon 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.OrdersListshows 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, likeSyncStatusand 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
ConnectorUnauthorizedErrorwithstatus: 403, theforbiddennotice, 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 nowWooPluginUpdateRequiredError(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 isforbidden. A caller that omitsstatusgetsunauthorized, 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.
- Vendure: a signed-in user missing a permission (confirmed by the session probe) is now
-
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? })runscreateRegisterOutboxover an already-openregister_commandscollection, and callsstart()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, andcommands: nullleaves 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: 2andX-WCPOS-Client: tallyui/<connector version>. WCPOS's 2.0 gate refuses POS-markedwcpos/v2requests 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 newWooTillUpdateRequiredError(till_update_required, fixed by the till) stops the product pull after one request.SyncStatusthen 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-premiumpeer is now17.5.0. Apps installrxdb-premium@17.5.0together withrxdb@17.5.0. - Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
- Its
@tallyui/pos:- Its
rxdbpeer is now~17.5.0. - Opening
pos_ordersrejects withPosOrderOpenClosedErrorwhen 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.
- Its
@tallyui/database:createTallyDatabasereturns 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_ordersis at schema version 4, and an older build (such as@tallyui/pos2.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 indocs/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
rxdbandrxdb-premiumto exactly17.5.0. - RxDB 17 defaults a replication's
toggleOnDocumentVisibleto 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'splugins/replicationsource, 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 withisStorageUnavailableError. Another tab holding the database is recognised with the newisStorageHeldError. A stale worker staysisRxdbRemoteVersionMismatchfrom@tallyui/core(RM1).isStorageWorkerStartErrorstill 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:
isStorageWorkerStartErrorandisStorageWorkerFailurealso 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 newisRxdbRemoteVersionMismatchin@tallyui/core, which recognises RM1 by structure only: an RxError's owncode, or the remote storage'scould not create instancewrapping of an RxError's JSON.@tallyui/storage-sqlitenow has@tallyui/coreas 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-premiumpeer is now17.5.0. Apps installrxdb-premium@17.5.0together withrxdb@17.5.0. - Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
- Its
@tallyui/pos:- Its
rxdbpeer is now~17.5.0. - Opening
pos_ordersrejects withPosOrderOpenClosedErrorwhen 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.
- Its
@tallyui/database:createTallyDatabasereturns 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_ordersis at schema version 4, and an older build (such as@tallyui/pos2.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 indocs/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
rxdbandrxdb-premiumto exactly17.5.0. - RxDB 17 defaults a replication's
toggleOnDocumentVisibleto 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'splugins/replicationsource, 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.createenvelope version 3, its display and tax-rate wire types, and the payload'ssessionIdand customer reference.At capability 3,
finalizeOrdercopies the receipt'sdisplayandtaxByRateinto the sale. Version 3 sends those figures and the sale's session (stamped or late) assessionId. Older orders keep their existing envelope version.Move
pos_ordersto schema version 3 with asessionIdindex and the optionalsentVersionanddowngradedFromfields (declared for the outbox's version fallback, not yet written). Apps must openpos_orderswithaddPosOrderCollection, which migrates it. -
bf2d805:
order.createversion 4 (#286): everydiscountMinor, 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'ssentVersiondoesn'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), andSyncStatustells 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 showingretrying (status_404); the stuck line shows the same words, with no raw code.SyncStatustakes an optionalpluginName(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 onecreateBackendNotFound()tracker asbackendNotFoundto bothcreateOrderOutboxandcreateRegisterOutboxso 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 instuck.orders,useOrderOutbox'sstuckCommandIds,needsAttention'sstuckCommandIdsoption,OrdersList'sstuckprop (each order with its own time and reason), andSyncStatus'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 astimeout, which counts like a 503 and never pauses a clock, and keepsnetworkfor 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.createversion 4 (#286) to a server that advertises 4. Each order is resent at the version it first went out at: the outbox recordssentVersionbefore 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()clearssentVersionanddowngradedFrom, since the newcommandIdchooses afresh.pos_ordersmoves to schema version 5:sentVersionanddowngradedFromaccept 1 to 4, and the migration records each order without asentVersionat its content version (3 withdisplayandtaxByRate, 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):
finalizeOrderwritestaxRoundingon the stored order, the default (per_order,half_away_from_zero) included, andcustomas{ granularity: 'custom' }. It is the till's own record and is never sent inorder.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 itsbreakdowns.tax_rounding_mixedistruewhen a session's sales used more than one strategy (acustomsale counts as the default it applied);ClosureSheetthen says so, andbuildClosureDocumentcarries the same line ready to print asclosure.tax_rounding_note(TAX_ROUNDING_MIXED_NOTE), for the apps' closure templates.PosOrder.taxRoundingis now required in the type.pos_ordersmoves to schema version 6:taxRoundingis 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,RegisterCommandEnvelopeandAnyCommandEnvelope, register payloads and results, and the register server capability.CommandTypeandCommandEnvelopeare unchanged.Record the local
register_commandsledger throughreconcileRegisterCommands, gated inuseRegisterSessionby its newcommandsandcapabilitiesoptions. Commands are recorded but not sent. Medusa reads theregistercontract. -
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.stuckwhen 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),
useStoreSettingskeeps 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 iserrorwith anextRetryAt, and an app shows "Can't reach the store's settings yet. Retrying…". Only a store that reports no rounding, or a connector withoutcapabilities, gets the default. Before this, a failed read on a Vendure store set toper_rate_group_itemsmeant every sale raisedfigures_mismatch. -
0e4c9cc: The "since" a cashier reads is a real time (#253).
OutboxState.stuck(both outboxes) gainsfirstFailedAt: the wall-clock time the first failure of the current stuck run was answered, so an offline gap no longer moves it.sincekeeps its meaning, the clock's virtual start, and still drives the 15-minute threshold.firstFailedAtis kept in memory only. After a restart it is absent, andSyncStatusandOrdersListshow the stored time instead, worded "since about 2:49 AM". -
a94b255:
OutboxStategainsrejected?: number: the order outbox publishes the count ofpos_ordersthe store refused (syncStatus: 'rejected') wherever it publishespending, so it rises when a batch result rejects an order and falls whenrequeue()sends one again. The register outbox leaves it unset. Whilerejectedis above 0,SyncStatusnever 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. Withrejected0 or unset, nothing changes. When the store refused a whole batch (refusedset, 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).
ServerCapabilitiesgainstaxRounding(core exportsTaxRounding):per_order,per_line_itemsorper_rate_group_items, each withhalf_away_from_zeroorhalf_up, orcustom. Absent, andcustom, mean today'sper_orderwith half away from zero.TaxProvidertakesroundingandrateCodes(tax class → the backend's rate name, forper_rate_group_items); the order records the strategy astaxRounding, andtaxLinesByRatetakes it as a fourth argument. The algorithms are indocs/contract/field-kinds.md. -
5a204a9:
StoreSettingsgains a derivedtaxRounding.useStoreSettingsfills it from the context's capabilities, or else from one read of the connector'scapabilities()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 withoutcapabilitiesgives the default rounding.taxProviderPropspasses it toTaxProviderasrounding, so the till rounds tax like the store with no app code (#324).custompasses no rounding, and an explicitroundingprop 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? })runscreateRegisterOutboxover an already-openregister_commandscollection, and callsstart()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, andcommands: nullleaves 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_itemsstore 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 liketaxRatesPpm, includingdefault.vendureStoreSettingsreads each rate'snamein the tax-rate query it already runs, so no extra request is made. Only the ratestaxRatesPpmuses count, anddefaultfollows the same default-category rule.taxRateCodesis left out when no names come back.taxProviderProps(settings)passestaxRateCodesto<TaxProvider>asrateCodes.
Patch Changes
-
d6a5073: The outbox freezes an order an older till stored before it first sends it (
freezeSentForm, whichfinalizeOrderuses too):- line names, discount labels and payment references are cut to 255 characters, but ids never are;
- a customer email or id that
order.createwould 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, anOrderwhose customer id may be missing. The receipt stage,buildReceiptDataandReceipttake it, and a plainOrderstill fits. -
27d736e:
CommandWarninggainsbridgeMinorontotal_mismatchand a newtax_rate_mismatchcode, 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).
ProductTraitsgains an optionalgetTaxClass(doc, variantId?), the backend's tax class id, a key ofStoreSettings.taxRatesPpm.addProductandaddEntryToCartpass it toaddLinethrough the newAddLineInput.taxClass, which the tax context resolves; a connector without the accessor is unchanged (the default rate).TaxProvidertaxes a class with no rate at the default rate and warns once per class through the newtaxLogger. connector-vendure replicates each variant'staxCategory { 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):
SyncStatusandOrdersListbuild their "since {time}" and "since about {time}" text with one shared helper.useRegisterOutbox's docs now say whentransport()is called, and that the latestisEnabledandonResultare 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
payloadShapeErrorsto the newpayloadBoundErrors, whichprecheckCommandcalls after the replay lookup, so an applied order resent with a long title replays asduplicate;payloadShapeErrorskeeps the types, thecustomerIdandsessionIdbounds and the NUL check.useSaleapplies a tender before logging a dropped reference, andadd()refuses a product whose id or v3 tax code finalize would refuse; the tender's reference field caps at 255 characters.finalizeOrdernow freezes the sent form (names and discount labels cut, an unsendable customer email or id left out) andtoOrderCreateEnvelopesends 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
serverFailuresand 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:
OrdersListshows 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, showsplatform_error's sentence: "The online store refused this sale. Ask the store owner to look at the till's sync log." Anidempotency_mismatchshows 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 forunsupported_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 itscounted,closedByandapprovedByinstead 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,
useStoreSettingsgiveserrorwithoutnextRetryAtand doesn't retry by itself, so the app prompts. That covers a till-class error (a 401, or a till that needs updating) and aSignInErrorwithcode: 'invalid_credentials'; any other sign-in error still waits and retries. Every other failure still waits and retries. - A
/tally/v1/infoJSON body that isn't an object (null, an array or a scalar) is unknown, not the default rounding.
- 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,
-
df80ead:
SyncStatustakes an optionalregisterState(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, onceregisterState.stuckis 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 sharedbackendNotFoundtracker onstop()and take it up again onstart()orflush(). -
37aad35:
useSalenever 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 thatnewSale()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,
finalizeOrderrefuses 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()andcreateMedusaAdminUserConnector()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,medusaAdminUserConnectorandvendureConnectorare deprecated: one instance for the whole app can leak queued reconcile work across stores. They are removed in 4.0. - A development warning.
startReplicationwarns once when the same adapter object replicates into two collections at once. - Refetch budget by requests.
refetchBatchSizeon the reconcile adapters makes a page that enqueuesnrefetches takeceil(n / refetchBatchSize)request-budget slots (WooCommerce 100, Medusa 100, Vendure 1,000). - WooCommerce 426 errors. A foreign (non-WCPOS) 426 keeps the store's
codebeside its message, and the message is capped at 200 characters.
- New factories.
-
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 stringcode;errorKind(error)returns'till','store'or'transient'. SyncNotice({ code, since, fixedBy, software?, minVersion?, fix? }) describes a stopped pull.ConnectorUnauthorizedErroris fixed by the till.
- An error class declares
@tallyui/databasestartReplicationhandles the three kinds and returns RxDB's state plusnotice$andresume():- 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
retryTimeto 5 minutes. It waits at least a validretryAfterMs(a finite number of zero or more), capped at 1 hour.
- till: one request, one notice, then the pull stays stopped until the app calls
@tallyui/components:SyncStatustakes an optionalpullNoticeand 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:WooDateFilterErroris fixed by the store, and carriessoftwareandminVersion.WooMissingUuidErrorgainscode: 'missing_plugin'and is fixed by the store.
@tallyui/connector-vendure: a newVendureTimezoneConfigError(store_misconfigured, with a plainfix) replaces the plain error when theupdatedAtprobe 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), andauth.getHeaderswithout a WCPOS token throwsWooMissingTokenError, a subclass ofConnectorUnauthorizedError, instead of sendingBearer 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.cataloguelists 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.productsnow combines the product pull with the reconcile feed, withlegacyKey: '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/statuscapabilities(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/statuslistsproducts_id_fast_pathincapabilities, 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.remoteon 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 nowWooTokenRefusedError(store_misconfigured,fixedBy: 'store', with afix), replacingWooPluginUpdateRequiredError(#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."SyncStatusshows "a setting on the online store needs changing" with the fix. Breaking for importers:WooPluginUpdateRequiredErroris no longer exported. -
508876e: The WooCommerce connector now requires WooCommerce 5.8 or later (for
modified_afteron the products route;dates_are_gmtarrived 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.
- 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
-
3b206d6: The connector now authenticates with a WCPOS bearer token and the
X-WCPOS: 1header 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 throwsWooMissingUuidError. -
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: 2andX-WCPOS-Client: tallyui/<connector version>. WCPOS's 2.0 gate refuses POS-markedwcpos/v2requests 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 newWooTillUpdateRequiredError(till_update_required, fixed by the till) stops the product pull after one request.SyncStatusthen 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.
combinePullAdapterstakes an optionalkeyfor resolving duplicates across its sub-adapters. It defaults todoc.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
duplicateevent with the codeduplicate_match_key. The copy is tombstoned only whenconfirmGoneproves the store doesn't back it, and the mass-delete brake still applies. WooCommerce'sconfirmGonenow 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-premiumpeer is now17.5.0. Apps installrxdb-premium@17.5.0together withrxdb@17.5.0. - Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
- Its
@tallyui/pos:- Its
rxdbpeer is now~17.5.0. - Opening
pos_ordersrejects withPosOrderOpenClosedErrorwhen 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.
- Its
@tallyui/database:createTallyDatabasereturns 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_ordersis at schema version 4, and an older build (such as@tallyui/pos2.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 indocs/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
rxdbandrxdb-premiumto exactly17.5.0. - RxDB 17 defaults a replication's
toggleOnDocumentVisibleto 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'splugins/replicationsource, 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
ConnectorUnauthorizedErrorwithstatus: 403, theforbiddennotice, 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 nowWooPluginUpdateRequiredError(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 isforbidden. A caller that omitsstatusgetsunauthorized, 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.
- Vendure: a signed-in user missing a permission (confirmed by the session probe) is now
-
8cf3ea4: A till tells "sign in again" apart from "signed in, but not allowed" (found by the Medusa POS app's adoption).
ConnectorUnauthorizedError.statusis now required, typed401 | 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
forbiddennotice, 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 raisesWooTillUpdateRequiredError. - 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. - The plugin's gate: a 426 whose body carries
-
154e552: The product pull sends
dates_are_gmt=truewith everymodified_after, so WooCommerce compares the GMT checkpoint againstpost_modified_gmtinstead 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
restartscounter is gone: every shrink of the window restarts the pass, bounded by the per-call request budget. A stored checkpoint that still carriesrestartskeeps working. -
a0256e1: The product pull no longer skips products that share a
date_modified_gmtsecond across a page boundary. It pulls in passes, like the Medusa connector: each pass fixes an inclusive lower bound (modified_afterone second earlier), pages that window by product id with an offset, restarts ifX-WP-Totaldrops between pages (after three restarts, a fresh pass starts in the same call), ends on a short or empty page when a proxy stripsX-WP-Total, and moves the lower bound to the newestdate_modified_gmtin 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.WooProductCheckpointis 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
statusis notpublish(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 nostatusparameter, 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()andcreateMedusaAdminUserConnector()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,medusaAdminUserConnectorandvendureConnectorare deprecated: one instance for the whole app can leak queued reconcile work across stores. They are removed in 4.0. - A development warning.
startReplicationwarns once when the same adapter object replicates into two collections at once. - Refetch budget by requests.
refetchBatchSizeon the reconcile adapters makes a page that enqueuesnrefetches takeceil(n / refetchBatchSize)request-budget slots (WooCommerce 100, Medusa 100, Vendure 1,000). - WooCommerce 426 errors. A foreign (non-WCPOS) 426 keeps the store's
codebeside its message, and the message is capped at 200 characters.
- New factories.
-
7d1bc98: Add
parseTaxRoundingandparseInfoCapabilities, which read/tally/v1/infoincluding its top-leveltaxRounding(#287). The Medusa connector's capability read now carries the store'staxRounding.
Patch Changes
-
eb5a032: A
/tally/v1/infoanswer 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
taxRoundingvalue 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 notaxRoundingkey. - Type change:
parseInfoCapabilitiesnow returnsServerCapabilities | undefined. It isundefinedwhen the body carries a malformedtaxRounding.
- Unknown: a 2xx that is not JSON, and a
-
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,RegisterCommandEnvelopeandAnyCommandEnvelope, register payloads and results, and the register server capability.CommandTypeandCommandEnvelopeare unchanged.Record the local
register_commandsledger throughreconcileRegisterCommands, gated inuseRegisterSessionby its newcommandsandcapabilitiesoptions. Commands are recorded but not sent. Medusa reads theregistercontract. -
6673faf: RxDB 17.5.0.
@tallyui/storage-sqlite:- Its
rxdb-premiumpeer is now17.5.0. Apps installrxdb-premium@17.5.0together withrxdb@17.5.0. - Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
- Its
@tallyui/pos:- Its
rxdbpeer is now~17.5.0. - Opening
pos_ordersrejects withPosOrderOpenClosedErrorwhen 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.
- Its
@tallyui/database:createTallyDatabasereturns 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_ordersis at schema version 4, and an older build (such as@tallyui/pos2.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 indocs/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
rxdbandrxdb-premiumto exactly17.5.0. - RxDB 17 defaults a replication's
toggleOnDocumentVisibleto 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'splugins/replicationsource, 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.statusis now required, typed401 | 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
forbiddennotice, 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-premiumpeer is now17.5.0. Apps installrxdb-premium@17.5.0together withrxdb@17.5.0. - Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
- Its
@tallyui/pos:- Its
rxdbpeer is now~17.5.0. - Opening
pos_ordersrejects withPosOrderOpenClosedErrorwhen 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.
- Its
@tallyui/database:createTallyDatabasereturns 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_ordersis at schema version 4, and an older build (such as@tallyui/pos2.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 indocs/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
rxdbandrxdb-premiumto exactly17.5.0. - RxDB 17 defaults a replication's
toggleOnDocumentVisibleto 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'splugins/replicationsource, 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()andcreateMedusaAdminUserConnector()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,medusaAdminUserConnectorandvendureConnectorare deprecated: one instance for the whole app can leak queued reconcile work across stores. They are removed in 4.0. - A development warning.
startReplicationwarns once when the same adapter object replicates into two collections at once. - Refetch budget by requests.
refetchBatchSizeon the reconcile adapters makes a page that enqueuesnrefetches takeceil(n / refetchBatchSize)request-budget slots (WooCommerce 100, Medusa 100, Vendure 1,000). - WooCommerce 426 errors. A foreign (non-WCPOS) 426 keeps the store's
codebeside its message, and the message is capped at 200 characters.
- New factories.
-
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 stringcode;errorKind(error)returns'till','store'or'transient'. SyncNotice({ code, since, fixedBy, software?, minVersion?, fix? }) describes a stopped pull.ConnectorUnauthorizedErroris fixed by the till.
- An error class declares
@tallyui/databasestartReplicationhandles the three kinds and returns RxDB's state plusnotice$andresume():- 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
retryTimeto 5 minutes. It waits at least a validretryAfterMs(a finite number of zero or more), capped at 1 hour.
- till: one request, one notice, then the pull stays stopped until the app calls
@tallyui/components:SyncStatustakes an optionalpullNoticeand 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:WooDateFilterErroris fixed by the store, and carriessoftwareandminVersion.WooMissingUuidErrorgainscode: 'missing_plugin'and is fixed by the store.
@tallyui/connector-vendure: a newVendureTimezoneConfigError(store_misconfigured, with a plainfix) replaces the plain error when theupdatedAtprobe shows a server that isn't in UTC.
-
7d1bc98: Read the store's capabilities and
taxRoundingfrom the Vendure plugin's/tally/v1/info(#287):vendureSignInreturnscapabilities, and the connector gainscapabilities(context)for a restored session or an API key. -
e15f389: The Vendure connector supplies its tax rate names, so a
per_rate_group_itemsstore 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 liketaxRatesPpm, includingdefault.vendureStoreSettingsreads each rate'snamein the tax-rate query it already runs, so no extra request is made. Only the ratestaxRatesPpmuses count, anddefaultfollows the same default-category rule.taxRateCodesis left out when no names come back.taxProviderProps(settings)passestaxRateCodesto<TaxProvider>asrateCodes.
Patch Changes
-
eb5a032: A
/tally/v1/infoanswer 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
taxRoundingvalue 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 notaxRoundingkey. - Type change:
parseInfoCapabilitiesnow returnsServerCapabilities | undefined. It isundefinedwhen the body carries a malformedtaxRounding.
- Unknown: a 2xx that is not JSON, and a
-
e59ebec: Each line is taxed at its product's tax class, not the store's default (#288).
ProductTraitsgains an optionalgetTaxClass(doc, variantId?), the backend's tax class id, a key ofStoreSettings.taxRatesPpm.addProductandaddEntryToCartpass it toaddLinethrough the newAddLineInput.taxClass, which the tax context resolves; a connector without the accessor is unchanged (the default rate).TaxProvidertaxes a class with no rate at the default rate and warns once per class through the newtaxLogger. connector-vendure replicates each variant'staxCategory { 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-premiumpeer is now17.5.0. Apps installrxdb-premium@17.5.0together withrxdb@17.5.0. - Its storages set RxDB 17's premium flag at import and when called, so the 13-collection cap never applies.
- Its
@tallyui/pos:- Its
rxdbpeer is now~17.5.0. - Opening
pos_ordersrejects withPosOrderOpenClosedErrorwhen 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.
- Its
@tallyui/database:createTallyDatabasereturns 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_ordersis at schema version 4, and an older build (such as@tallyui/pos2.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 indocs/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
rxdbandrxdb-premiumto exactly17.5.0. - RxDB 17 defaults a replication's
toggleOnDocumentVisibleto 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'splugins/replicationsource, 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
ConnectorUnauthorizedErrorwithstatus: 403, theforbiddennotice, 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 nowWooPluginUpdateRequiredError(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 isforbidden. A caller that omitsstatusgetsunauthorized, 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.
- Vendure: a signed-in user missing a permission (confirmed by the session probe) is now
-
8cf3ea4: A till tells "sign in again" apart from "signed in, but not allowed" (found by the Medusa POS app's adoption).
ConnectorUnauthorizedError.statusis now required, typed401 | 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
forbiddennotice, 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
FORBIDDENanswer throwsConnectorUnauthorizedErroronly when a probe ({ activeAdministrator { id } }, same headers) finds nobody signed in (#274). With a live administrator it is a plainErrornaming the missing permission, and a failed probe is a plain, transientError, so a missing permission no longer signs the till out into a sign-in loop.
2.0.0
@tallyui/core
Minor Changes
-
#23
53af670Thanks @kilbot! - Breaking: the cart and checkout components are presentational and takeMoney.CartLinetakesname,quantity,unitPriceandlineTotal.CartTotaltakessubtotal,taxLines,discountandtotal.CashTenderedandChangeDisplaytakeMoneyamounts. All of them format withformatMoney, so there is nogetPrice, float arithmetic or hard-coded'$'.CartPanelis generic, andCartLineItemis 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/coreaddsmoneyFromDecimalString, which parses typed decimal text intoMoneyusing integer arithmetic. -
#54
50317c8Thanks @kilbot! - Connectors can sign a user in:ConnectorAuthgains an optionalsignIn(baseUrl, { email, password }, init?)that resolves to aSignInResult(token, optional ISO 8601expiresAt) and rejects with aSignInErrorwhosecodeisinvalid_credentials,unsupportedorfailed. The app stores the token and passes it back togetHeadersastoken.Vendure's auth gains a sign-in flow: it runs the Admin API
loginmutation and takes the token from thevendure-auth-tokenheader (the server'stokenMethodmust include'bearer'). Its fields are nowurl,email,passwordand an optionalchannel_token.getHeaderssendscredentials.api_keyasvendure-api-key, otherwisecredentials.tokenas a Bearer token, plusvendure-tokenwhenchannel_tokenis set. The oldauth_tokencredential is still accepted as a deprecated alias fortoken.Medusa's
medusaAdminUserAuthsigns in throughPOST /auth/user/emailpassand readsexpiresAtfrom the JWT'sexp.medusaSecretKeyAuthhas no sign-in. -
#58
3e09957Thanks @kilbot! - AddcombinePullAdaptersto@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.productsnow includes a variant feed that re-delivers parent products whose variants changed. Vendure does not bumpProduct.updatedAton 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
a219ae0Thanks @kilbot! - Adds the TallyUI Sync Protocol command contract: theCommandEnvelope,CommandResult,CommandWarningandOrderCreatePayloadtypes (with their line and payment types), the batch request and response types, the constantsCOMMANDS_PATH,PROTOCOL_HEADER,PROTOCOL_VERSIONandMAX_COMMANDS_PER_BATCH, and theisCommandBatchResponseguard. These are the shapes pinned in ADR-038 and ADR-039, shared by the POS outbox and backend plugins. -
#115
4df9be4Thanks @kilbot! - Discounts are pre-tax (ADR-062). An order discount is allocated across the lines in proportion to their own-mode amounts (the newallocateOrderDiscount, largest-remainder rounding), each line carries its share inorderDiscountMinorand is taxed after it, so an order discount now lowers the tax instead of coming off the total after tax. A discountedorder.createis version 2, withdiscountMinoron each discounted line and on the payload; a discount-free payload stays version 1, byte-identical.finalizestill rejects discounts until the plugins honour version 2. Receipt lines show theirdiscountMinor. 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
9649259Thanks @kilbot! -ReconcileFeedEntry(core) gainsrefreshOnly?: 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 inenqueuekeepsrefreshOnlytrue 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) gainslastResultAt/lastErrorAt, stamped from an injectablenow(defaultDate.now), so a keptlastResultnext to a newerlastErrorcan be told apart from a current one. The newisFingerprintResultCurrent(state)helper does that comparison (backlog 46). -
#85
609ebd8Thanks @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/coreadds theFingerprintReconcileAdaptercontract (fetchPages, a purefingerprintandenqueue) and an optionalreconcile.pricesonTallyConnector.@tallyui/databaseaddsstartFingerprintReconcile, which runs no pass at start by default and otherwise mirrors the id reconcile: a complete, successful pass only,state$(running,lastResult,lastError), andstop().@tallyui/connector-medusaaddsreconcile.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
f8b0dacThanks @kilbot! - A fresh install downloads the catalogue once. A pull adapter can now declarepull.seedCheckpoint; on a fresh install (no stored checkpoint)combinePullAdaptersreads 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'supdated_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
a0b7981Thanks @kilbot! -@tallyui/coreaddsresolvePriceRange(variants, currency?), the lowest and highest current price across a product's variants.ProductPriceuses it to showfrom <lowest price>when a product's variants are priced differently, instead of just the default variant's price. NewshowFromPrice(defaulttrue) andfromLabel(default'from') props control and opt out of this. -
#61
540044cThanks @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'supdatedAtdoes not change) reaches the local copy.@tallyui/coreadds theIdReconcileAdaptercontract andcreateReconcileFeed, which turns queued corrections into a pull-only adapter meant as the last key ofcombinePullAdapters.@tallyui/databaseadds thestartIdReconcilerunner.@tallyui/connector-vendureimplements the Vendure side and wires it intoreplication.productsandreconcile.ids. Nothing is written locally into the replicated collection; corrections arrive only through the collection's own pull. -
#92
945bb83Thanks @kilbot! - Medusa prices as Medusa charges them (ADR-060 D2b).SyncContextgains an optionalpricingContext(fromstoreSettings()),ProductPricean optionaltaxInclusive, andTallyConnector.reconcileacalculatedPricesslot. With a pricing context, every Medusa product document build fills each variant'scalculated_pricefrom the store API (nullwhen 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,nullas unsellable.reconcile.calculatedPricesre-delivers products whose calculated prices changed with no timestamp bump; run it everyMEDUSA_CALCULATED_PRICE_RECONCILE_INTERVAL_MS(30 minutes) withmaxPages: 1000. Without a pricing context, documents and prices are unchanged. -
#11
f90e59dThanks @kilbot! - Add backend-neutral price and stock traits.ProductTraitsgainsgetPrices(a price list of integer minor-unitMoneyentries,baseorsale, per currency) andgetStock(in_stock | out_of_stock | backorder | unknownplus an optional quantity). Core addsresolvePrice,moneyFromMajor,moneyToMajorandminorUnitDigits. Every connector maps its own shape into them; WooCommerce'sinstock/outofstock/onbackorderstrings now stay inside the WooCommerce connector. The string-price and WooCommerce-style stock accessors remain and are deprecated. -
#11
2a05ecbThanks @kilbot! - Build the product components on the neutral traits.ProductPriceresolves the price list and formats it with Intl in the price's own currency (newcurrencyandlocaleprops;currencySymbolis now only the fallback for an unknown currency).ProductStockBadgereadsgetStock.ProductImagegainsshowPlaceholder, an initial tile for products without images. Core addsformatMoney, atraitContextprop onConnectorProviderfor store-level facts like the store currency, anduseTraitContext.@tallyui/posaddssearchProducts, name/SKU/barcode search through traits that works the same on every backend. -
#120
e0062ceThanks @kilbot! - A per-storeorder.createcapability check replaces the global discount guard (ADR-062).@tallyui/coregainsServerCapabilities,SignInResult.capabilities,SyncContext.capabilities,TallyConnector.capabilities?()andresolveCapabilities(fresh, stored).@tallyui/connector-medusareads the store's supportedorder.createversions fromGET /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.medusaSignInreturns the read capabilities, and both Medusa connectors exposecapabilities(context)for a restored session.finalizeOrderin@tallyui/posnow rejects a discount only when the store's capability is below 2, so a store whose plugin has caught up finalizes a discounted order asorder.createversion 2. -
#95
f1af98cThanks @kilbot! -OrderCreateLinegains an optionaltaxInclusive(ADR-038 amendment 2). It is the line's own tax mode, sent only when that mode differs from the order'spricesIncludeTax. Single-mode orders produce byte-identical payloads.finalizestill rejects converted lines until the Medusa plugin honours the field. -
#157
125c85aThanks @kilbot! -readFresh,countFreshandwatchFreshmove to a new, side-effect-free subpath,@tallyui/core/rxdb. Core now listsrxdb(>=16) andrxjs(>=7) as optional peer dependencies, needed only by that subpath; core's main entry stays free of both.@tallyui/posre-exports the helpers unchanged. The id and fingerprint reconciles in@tallyui/databaseread the local products withreadFreshinstead of a cachedfind(), 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
24b0563Thanks @kilbot! - Register screens (WCPOSnextport, ADR-032), driven byuseRegisterSession: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) andRegisterColumn.@tallyui/coreaddscurrencySymbol(currency, locale?). -
#11
bc0a224Thanks @kilbot! - AddisSellableandgetVariantCountproduct traits to core and all four connectors. -
#57
55ae68fThanks @kilbot! -SignInErrorCodesplits the oldfailedin two:failednow means no response arrived (a network error), and the newserver_errormeans a response arrived but was unusable (a bad status, a malformed body, or a missing token).SignInErrorgains an optionalstatusfrom a third constructor argument. Callers that switch oncodeshould handleserver_error.Medusa's sign-in now treats
mfa_required: trueandverification_required: truethe same as alocationbody: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 nowserver_errorwith the HTTP status.Vendure's sign-in now treats
NATIVE_AUTH_STRATEGY_ERRORasunsupported, since native email/password auth is disabled on the server. A malformed response body, a non-OK status, GraphQL errors, a missingdata.loginand any otherErrorResultare nowserver_errorwith the HTTP status. -
#64
402ec36Thanks @kilbot! - Both connectors now store a product's variants sorted by id, since neither Medusa nor Vendure guarantees variant order across requests:@tallyui/coreaddscompareIds, and the Medusa and Vendure product projections (toDocument,toProductDocument) sortvariantswith it before the document is stored. Traits that readvariants[0](getPrices,getSku,getPrice,getStockQuantity,getBarcodeand 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
350967dThanks @kilbot! - Stock reads use the reconciled overlay (ADR-060) and show how fresh it is.@tallyui/corenow holdswithStockOverlayandgetProductStock(@tallyui/posre-exports them), addsSTOCK_LEVELS_LAST_PASS,stockOverlayandstockOverlayAsOfprops onConnectorProvider, and auseProductStock(doc)hook that returns overlay stock plusasOf, orgetStock(doc)when no overlay is given.@tallyui/database:startStockReconcilealso returnsstate$(running,truncated,lastError,lastCompletedAt),reconcileStock()resolves withcompletedAt, and each successful pass stores{ completedAt }in thelast-passlocal document ofstock_levels, whichcreateTallyDatabasenow creates with local documents (apps that create the collection themselves use the newstockLevelsCollectionconfig; without local documents a pass rejects with a clear error); a restarted runner seedslastCompletedAtfrom it.@tallyui/posaddsstockOverlayAsOf$.ProductStockBadgereads stock throughuseProductStockand appends " · as of <time>" when an overlay is given (showAsOf={false}hides it). -
#53
e3b8686Thanks @kilbot! - Add a stock reconcile pass (ADR-060).@tallyui/coreadds theStockReconcileAdaptercontract (fetchPagesand a pureoverlay) and an optionalreconcile.stockonTallyConnector.@tallyui/databaseadds the local-onlystock_levelscollection (STOCK_LEVELS_COLLECTION,stockLevelsSchema), whichcreateTallyDatabasecreates for connectors withreconcile.stock, andstartStockReconcile, which re-reads stock every 5 minutes (and on demand throughreconcileStock()) 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/posaddsstockOverlay$,withStockOverlayandgetProductStock, which read stock from the overlay where it has an entry and from the replicated product otherwise. The Vendure connector reconciles variantstockLevels, and the Medusa connector reconciles inventory item location levels, so stock changes that bump no product timestamp reach the POS. -
#87
ac2a24aThanks @kilbot! -TallyConnectorgains an optionalstoreSettings(context, choice?)(TV4): one read-only call for the store's currency,pricesIncludeTax,taxRatesPpmand an opaque connector-specificpricingContext, so the app can feed the connector's own tax-inclusivity option and the POSTaxProviderfrom a single source of truth instead of two hand-matched settings. Rejects with aStoreSettingsError(choice_requiredwithchoices, orfailed).Vendure's
storeSettingsreads the active channel's currency andpricesIncludeTax, 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).defaultis theisDefaultcategory's rate, or, when none is flagged, the first category Vendure's owntaxCategorieslists — 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'spricesIncludeTaxoption is unchanged; passsettings.pricesIncludeTaxfromstoreSettingsinstead of hand-matching it to the POS. -
#19
8df0569Thanks @kilbot! - Adds variant traits.VariantSummary(id,title,sku,barcode,prices,stock) and the optionalProductTraits.getVariantsdescribe every purchasable variant of a product, andfindVariantByCodefinds a variant by barcode or SKU for scanning. The Medusa connector implementsgetVariants; its product-levelgetPricesandgetStockresults are unchanged.
Patch Changes
-
#94
373e438Thanks @kilbot! -resolvePricekeeps a price'staxInclusiveflag oncurrentandwas. Each order-builder line keeps its price's own tax mode (LineItem.taxInclusive, pluspriceTaxModeConvertedwhen it differs from the store'spricesIncludeTax), 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
getPriceandgetRegularPricereturn the resolved calculated price instead of the admin prices, andisSellableis false when no variant yields a price (for example acalculated_pricewith null amounts). -
#11
b1b6e30Thanks @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
14871a2Thanks @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 ascreateTallyDatabase's target. Any app that relied on the Dexie default breaks; switching is a cold resync, not a data migration.Breaking:
multiInstance: truenow 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,StorageWorkerTimeoutErrorandisStorageWorkerTimeoutare removed;isStorageWorkerFailurenow recognises onlyStorageWorkerStartError.createTallyDatabasewraps a storage markedtallyEngine: 'sqlite-sahpool'withwithStorageWatchdog, 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 asstalled, never rejected; its promise stays pending until the worker answers, and the status returns tookonce 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 todead, 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 theObservable<StorageHealth>({ status: 'ok' | 'stalled' | 'dead', stalledWrites, stalledSince? }) for a database on that storage, andundefinedfor any other, so an app can show "saving is slow…" or "storage stopped, reload". - A write pending longer than 10s (
Minor Changes
-
#99
9649259Thanks @kilbot! -ReconcileFeedEntry(core) gainsrefreshOnly?: 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 inenqueuekeepsrefreshOnlytrue 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) gainslastResultAt/lastErrorAt, stamped from an injectablenow(defaultDate.now), so a keptlastResultnext to a newerlastErrorcan be told apart from a current one. The newisFingerprintResultCurrent(state)helper does that comparison (backlog 46). -
#85
609ebd8Thanks @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/coreadds theFingerprintReconcileAdaptercontract (fetchPages, a purefingerprintandenqueue) and an optionalreconcile.pricesonTallyConnector.@tallyui/databaseaddsstartFingerprintReconcile, which runs no pass at start by default and otherwise mirrors the id reconcile: a complete, successful pass only,state$(running,lastResult,lastError), andstop().@tallyui/connector-medusaaddsreconcile.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
540044cThanks @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'supdatedAtdoes not change) reaches the local copy.@tallyui/coreadds theIdReconcileAdaptercontract andcreateReconcileFeed, which turns queued corrections into a pull-only adapter meant as the last key ofcombinePullAdapters.@tallyui/databaseadds thestartIdReconcilerunner.@tallyui/connector-vendureimplements the Vendure side and wires it intoreplication.productsandreconcile.ids. Nothing is written locally into the replicated collection; corrections arrive only through the collection's own pull. -
#69
0ef1c7eThanks @kilbot! - ADR-061:startLiveTab(@tallyui/database) coordinates exactly one live tab per store over a Web Lock and aBroadcastChannel. 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
945bb83Thanks @kilbot! - Medusa prices as Medusa charges them (ADR-060 D2b).SyncContextgains an optionalpricingContext(fromstoreSettings()),ProductPricean optionaltaxInclusive, andTallyConnector.reconcileacalculatedPricesslot. With a pricing context, every Medusa product document build fills each variant'scalculated_pricefrom the store API (nullwhen 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,nullas unsellable.reconcile.calculatedPricesre-delivers products whose calculated prices changed with no timestamp bump; run it everyMEDUSA_CALCULATED_PRICE_RECONCILE_INTERVAL_MS(30 minutes) withmaxPages: 1000. Without a pricing context, documents and prices are unchanged. -
#63
d9fe1e3Thanks @kilbot! - Fix the Medusa connector's incremental pull: Medusa 2.21 honours only the operator formupdated_at[$gte], and silently ignored the connector'supdated_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'supdated_atdoes not change) now reaches the local copy throughreplication.productsandreconcile.ids.@tallyui/databaseadds a mass-deletion brake tostartIdReconcile: a pass that would tombstone more thanmaxDeleteShare(default 20%) of local products, and more than 10 of them, queues nothing and warns instead, unlessallowMassDeleteis set. -
#102
7490a3fThanks @kilbot! - A connector schema version bump now drops and resyncs its collection (ADR-060 amendment 9).createTallyDatabaseadds RxDB's migration-schema plugin and gives each connector collection above version 0 av => nullstrategy per earlier version, andstartReplicationappends-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_levelsandpos_ordersare untouched.The Medusa products schema is now version 1 and declares
variants[].calculated_price(object ornull). 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 withmedusaProductSchemaoutsidecreateTallyDatabasemust useconnectorCollection(medusaProductSchema)from@tallyui/database, which supplies the strategies and the migration plugin; otherwise RxDB throws COL12. -
#74
0121559Thanks @kilbot! - Removes the unreleased multi-tab database machinery in favour of one live tab per store (ADR-061):CreateDatabaseOptions.multiInstance(createTallyDatabasealways passesmultiInstance: false), thetally-outbox-flushandtally-outbox-statelocal 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 withstartLiveTab.@tallyui/storage-sqlite's worker now swallows thereadypromise's rejection so a pool install failure before anycreateStorageInstancecall doesn't surface as an unhandled rejection, and itsfileslist no longer publishes test files, matching@tallyui/databaseand@tallyui/pos. -
#55
350967dThanks @kilbot! - Stock reads use the reconciled overlay (ADR-060) and show how fresh it is.@tallyui/corenow holdswithStockOverlayandgetProductStock(@tallyui/posre-exports them), addsSTOCK_LEVELS_LAST_PASS,stockOverlayandstockOverlayAsOfprops onConnectorProvider, and auseProductStock(doc)hook that returns overlay stock plusasOf, orgetStock(doc)when no overlay is given.@tallyui/database:startStockReconcilealso returnsstate$(running,truncated,lastError,lastCompletedAt),reconcileStock()resolves withcompletedAt, and each successful pass stores{ completedAt }in thelast-passlocal document ofstock_levels, whichcreateTallyDatabasenow creates with local documents (apps that create the collection themselves use the newstockLevelsCollectionconfig; without local documents a pass rejects with a clear error); a restarted runner seedslastCompletedAtfrom it.@tallyui/posaddsstockOverlayAsOf$.ProductStockBadgereads stock throughuseProductStockand appends " · as of <time>" when an overlay is given (showAsOf={false}hides it). -
#53
e3b8686Thanks @kilbot! - Add a stock reconcile pass (ADR-060).@tallyui/coreadds theStockReconcileAdaptercontract (fetchPagesand a pureoverlay) and an optionalreconcile.stockonTallyConnector.@tallyui/databaseadds the local-onlystock_levelscollection (STOCK_LEVELS_COLLECTION,stockLevelsSchema), whichcreateTallyDatabasecreates for connectors withreconcile.stock, andstartStockReconcile, which re-reads stock every 5 minutes (and on demand throughreconcileStock()) 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/posaddsstockOverlay$,withStockOverlayandgetProductStock, which read stock from the overlay where it has an entry and from the replicated product otherwise. The Vendure connector reconciles variantstockLevels, and the Medusa connector reconciles inventory item location levels, so stock changes that bump no product timestamp reach the POS.
Patch Changes
-
#66
b029839Thanks @kilbot! - The id reconcile's mass-delete brake now also trips when every local product would be tombstoned, whatever the count, unlessallowMassDeleteis set. Previously the brake applied only aboveMASS_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
184901fThanks @kilbot! -createTallyDatabasenow 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
c9b0bb8Thanks @kilbot! -createTallyDatabasenow works in production builds. It passedignoreDuplicate: trueunconditionally, 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
9168278Thanks @kilbot! - The live tab's busy-defer now caps by wall-clock time elapsed since the hand-over ack, not by countingsleep(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 intendedmaxDeferMs(10 s by default) far beyond that, leaving the new tab stuck inacquiring. -
#157
125c85aThanks @kilbot! -readFresh,countFreshandwatchFreshmove to a new, side-effect-free subpath,@tallyui/core/rxdb. Core now listsrxdb(>=16) andrxjs(>=7) as optional peer dependencies, needed only by that subpath; core's main entry stays free of both.@tallyui/posre-exports the helpers unchanged. The id and fingerprint reconciles in@tallyui/databaseread the local products withreadFreshinstead of a cachedfind(), 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
caa1fd2Thanks @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
53af670Thanks @kilbot! - Breaking: the cart and checkout components are presentational and takeMoney.CartLinetakesname,quantity,unitPriceandlineTotal.CartTotaltakessubtotal,taxLines,discountandtotal.CashTenderedandChangeDisplaytakeMoneyamounts. All of them format withformatMoney, so there is nogetPrice, float arithmetic or hard-coded'$'.CartPanelis generic, andCartLineItemis 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/coreaddsmoneyFromDecimalString, which parses typed decimal text intoMoneyusing integer arithmetic.
Minor Changes
-
#136
0b1237fThanks @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.CartPanelalso gains anafterItemsslot, rendered inside the scrolling region after the last line, for content like discount chips. -
#148
a80e053Thanks @kilbot! -Cataloguetakes an optionalminCodeLengthprop (a till's barcode-scanner setting). When set, Enter on a search query shorter thanminCodeLength(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
a9b77feThanks @kilbot! - One close in flight per register.useRegisterSession'scloseSessionjoins a close already running for the same register, in any hook instance, and returns its closure (the joining call'scounted,approvedByandapprovedByNameare ignored), so a tap during a close no longer starts a second, overlapping one. The hook returns a newclosingflag, true while that close is in flight.RegisterColumnkeeps the count slot up while closing instead of flashing the Finish-closing card, whose button now hasnativeID="register-column-finish-close-button".describeRegisterBarPilltakesclosingand returns the new'Close not finished'pill for a closed session that isn't closing, right after 'Choose a register' and ahead of 'Offline';RegisterBarpassesregister.closing. -
#174
160252cThanks @kilbot! -ClosureSheetshows 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.RegisterColumnoffers "Finish closing" whenuseRegisterSession'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, whereopenSessionwould otherwise refuse withRegisterCloseIncompleteError.buildClosureDocument's return type now carriesclosure.unsynced_count: numberand each movement'sid/reasonasstring, without a cast; no runtime output changed. -
#107
f132a68Thanks @kilbot! -ConnectorStatusgainsunsoldCount,unsoldStaleandformatUnsoldprops, showing how many products the sales channel doesn't sell (the calculated-price runner'sunreported) belowlastSync, using thewarningtoken when current andmuted-foregroundwhen stale. -
#149
1e2ee56Thanks @kilbot! - A failed save can now end in Continue once its order is confirmed stored.useOrderOutboxgainsisStored(order), andrecordnow treats an order stored with the sameidand money-bearing content (sameSale, new) as stored whatever itscommandId, so a Retry after a requeue no longer fails forever; other content throws the newOrderContentMismatchError.useSaletakes an optionalisStoredand exposescanContinueandcontinueSale();Tenderrenders Continue whencanContinueis true.newSale()is now refused while a failed or running save's order isn't confirmed stored; a refusal during a running save asksisStoredagain, so a hung save whose order is stored can still Continue. A confirmed order is never handed toonSaleCompletedagain (#147's background re-hand is gone).saleLoggerandoutboxLoggerare now exported. -
#132
7c69fceThanks @kilbot! -order.displaygainslinesandorderDiscountMinor(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.subtotalMinoris now derived from the total and the discount rows, soΣ lines === subtotalMinorandΣ sub-rows + orderDiscountMinor === discountMinorhold 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.ReceiptLineItemgainsdisplayAmountMinoranddisplayDiscounts, andReceiptDatagainsorderDiscountMinor. Print these above the subtotal.lineTotalMinoris unchanged: it's after every discount and is kept for existing readers.CartTotalnow orders its rows Subtotal / Discount / Tax / Total, matching the receipt, and takes an optionaltaxInclusive, which labels the tax rows "incl." instead of adding them. -
#65
a0b7981Thanks @kilbot! -@tallyui/coreaddsresolvePriceRange(variants, currency?), the lowest and highest current price across a product's variants.ProductPriceuses it to showfrom <lowest price>when a product's variants are priced differently, instead of just the default variant's price. NewshowFromPrice(defaulttrue) andfromLabel(default'from') props control and opt out of this. -
#141
6a4e80dThanks @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).Cataloguetakes an optionalhour12?: boolean(undefined keeps the locale default) instead of readingexpo-localization.Receipttakesstore: { name: string; address?: string }instead of a Medusa-shaped settings type, an optionaltopInset?: number(default 0) instead of an app-local strip-height context, an optionalformatDate?: (iso: string) => stringdefaulting to anIntl.DateTimeFormatformatter, and an optionaltaxLabel?: (ratePpm: number) => stringwith the same default asCart's (TV6a), keeping theincl.prefix rule.searchProducts,catalogueEntries,findEntryByCodeandvariantPriceLabeljoinbuildReceiptDataon the pure-function allow-list components may import from@tallyui/pos(ADR-064). -
#142
60a2218Thanks @kilbot! - Lifted medusapos's neutral outbox core so every platform POS records and sends sales the same way (ADR-052, TV7).@tallyui/posgainsgetDeviceId(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; anduseOrderOutbox({ storeKey, open, transport, deviceId, onBusy?, onOpenError? }), which opens the order store forstoreKey, runs its outbox and returns{ orders, state, recent, record, flush, requeue }.@tallyui/componentsgainsOrdersList, the "Needs attention" and "Recent" orders with a Retry button, takingorders,onRetry, an optionalformatDate(defaultIntl.DateTimeFormat) and an optionalfooter.needsAttentionjoins the pure-function allow-list components may import from@tallyui/pos(ADR-064). -
#139
3dd11f6Thanks @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).Carttakes an optionaltaxLabel?: (ratePpm: number) => string(default`Tax ${ratePpm / 10000}%`), since VAT isn't universal.@tallyui/componentsgains a runtime dependency on@tallyui/pos, for types and the purebuildReceiptDataonly — components still render from props alone. -
#69
0ef1c7eThanks @kilbot! - ADR-061:startLiveTab(@tallyui/database) coordinates exactly one live tab per store over a Web Lock and aBroadcastChannel. 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
2a05ecbThanks @kilbot! - Build the product components on the neutral traits.ProductPriceresolves the price list and formats it with Intl in the price's own currency (newcurrencyandlocaleprops;currencySymbolis now only the fallback for an unknown currency).ProductStockBadgereadsgetStock.ProductImagegainsshowPlaceholder, an initial tile for products without images. Core addsformatMoney, atraitContextprop onConnectorProviderfor store-level facts like the store currency, anduseTraitContext.@tallyui/posaddssearchProducts, name/SKU/barcode search through traits that works the same on every backend. -
#144
e692c40Thanks @kilbot! -pos_ordersgoes to schema version 2 (ADR-032, ADR-065). It adds three optional fields:lateSessionId, and ADR-065'sdisplayandtaxByRate, which nothing writes yet. Apps must adopt this release'saddPosOrderCollection, which migratespos_ordersto 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 toonSaleCompletedand the receipt withlateSessionIdset and nosessionId, so no closure counts it, and alate-saleregister fact is recorded.needsAttentionnow also selects any order withlateSessionId, andOrdersListexplains it: "Taken after the register closed. It is not in that register's closure." -
#76
e225222Thanks @kilbot! -ProductPricegains aformatFromprop,(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 oftext-foreground. Apps with screenshot tests coveringProductPricewill need to re-shoot them. -
#167
62eef0fThanks @kilbot! - Register-selection screen nits (ADR-032 amendment 1, medusapos adopting451a0ca):RegisterPicker's rows now size to their content, with a minimum height, instead of clipping the "Not opened" second line at a fixedh-11;RegisterPickerandOpenRegisterCardno longer hard-codeflex-1, taking their existingclassNamefrom the caller instead (TallyUI's ownRegisterColumnstill passesflex-1where it mounts them);RegisterPanel's sales count now pluralises correctly ("1 sale this session", not "1 sales"); andOpenRegisterCard's amount label names the currency, matchingMovementSheet's "Amount (€)" ("Cash in the drawer to start (€)").Two new optional props for apps that need to put register controls elsewhere on the screen:
RegisterBartakes anonPressPill?: () => voidthat turns its status pill into a button (opening the gate/picker or the panel), andCataloguetakes astatusAccessory?: ReactNoderendered at the end of its status line, alongside the status text, so a register control can sit there at phone width. -
#164
24b0563Thanks @kilbot! - Register screens (WCPOSnextport, ADR-032), driven byuseRegisterSession: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) andRegisterColumn.@tallyui/coreaddscurrencySymbol(currency, locale?). -
#166
c65da52Thanks @kilbot! -RegisterCountandClosureSheet(WCPOSnextport, 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 optionalapproveprop abovevarianceThreshold(refused with an exact message without one).ClosureSheetshows the local closure number and, unless blind, the counted figures and variance per tender. -
#55
350967dThanks @kilbot! - Stock reads use the reconciled overlay (ADR-060) and show how fresh it is.@tallyui/corenow holdswithStockOverlayandgetProductStock(@tallyui/posre-exports them), addsSTOCK_LEVELS_LAST_PASS,stockOverlayandstockOverlayAsOfprops onConnectorProvider, and auseProductStock(doc)hook that returns overlay stock plusasOf, orgetStock(doc)when no overlay is given.@tallyui/database:startStockReconcilealso returnsstate$(running,truncated,lastError,lastCompletedAt),reconcileStock()resolves withcompletedAt, and each successful pass stores{ completedAt }in thelast-passlocal document ofstock_levels, whichcreateTallyDatabasenow creates with local documents (apps that create the collection themselves use the newstockLevelsCollectionconfig; without local documents a pass rejects with a clear error); a restarted runner seedslastCompletedAtfrom it.@tallyui/posaddsstockOverlayAsOf$.ProductStockBadgereads stock throughuseProductStockand appends " · as of <time>" when an overlay is given (showAsOf={false}hides it). -
#96
93658cdThanks @kilbot! -StoreSettingsChoiceScreen: the picker the app shows whenstoreSettingsrejects withchoice_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 matchinginitialvalue, and callsonSubmitwith the picked fields once every shown section has a selection. -
#12
fe65b33Thanks @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
bc46d99Thanks @kilbot! -ProductGridhides products this channel doesn't sell (traits.isSellablefalse, for example a Medusa product outside the sales channel) unlessshowUnsellableis set, andProductCardshows such a product in a muted "Not sold here" state instead of its price.OrderBuilder.addProductnow refuses an unsellable product before looking up its price, instead of throwing the unrelated "No price in …" error.
Patch Changes
-
#168
670d3b8Thanks @kilbot! - The register approval gate is enforced inuseRegisterSession'scloseSession, not only inRegisterCount: overvarianceThreshold, a close withoutapprovedBythrows the newRegisterApprovalRequiredErrorbefore any write, blind mode included.closeSessiontakesapprovedByandapprovedByName, and they reach the Z (breakdowns.approved_by,approved_by_name); the store'scloseSessiontakesapprovedBy.useRegisterSession'sregisteroption acceptsnullwhile its host opens.closeNeedsApprovalis the shared "over threshold" rule.RegisterCountpassesapprove()'sapprovedByandapprovedByNametocloseSession, and shows the hook's refusal with the same copy. -
#137
314d1fcThanks @kilbot! -CartPanelrows now default to keying by the item'sid(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. PasskeyExtractorto override. -
#169
6c9a176Thanks @kilbot! -Catalogue's status text now truncates to a single line (with an ellipsis) whenstatusAccessoryis set, instead of wrapping to three lines at phone width and pushing the accessory (e.g. a register pill) out of place. WithoutstatusAccessory, the status text still wraps as before. -
#43
f1e2a02Thanks @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 undefineddanger. Search, cart-note and customer inputs take their placeholder colour from themuted-foregroundtoken. -
#37
12b7723Thanks @kilbot! - Order cards, receipt preview, register summary, settings groups, connector status, variant picker, cash-tendered input, cart note and customer form used the undefinedbg-surfaceclass and rendered transparent; they now usebg-card. -
#88
5053527Thanks @kilbot! - no longer publishes test files -
#11
b1b6e30Thanks @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
d1bc892Thanks @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 undefinedbg-surface-altortext-mutedtext classes, so labels such as "Change Due" are legible.
@tallyui/storage-sqlite
Minor Changes
-
#33
a0d2b90Thanks @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'sopenDatabaseSync(...).rxdb-premium@16.21.1is 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
c15c04dThanks @kilbot! - Adds the web storage (ADR-061):getRxStorageSQLiteWasmfrom@tallyui/storage-sqlite/webruns 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'sgetRxStorageWorkerin 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-wasmis now a peer dependency that your app installs. The returned storage carriestallyEngine: 'sqlite-sahpool'so callers can recognise it. The root export is unchanged and does not pull in wasm. -
#71
14871a2Thanks @kilbot! - Addedtallyui-build-sqlite-worker, a bin script that prebuilds the web-worker entry (with esbuild) and copiessqlite3.wasmnext to it, for Metro/Expo web apps that can't bundle a module worker at runtime. -
#100
94e1f09Thanks @kilbot! -getRxStorageSQLiteWasmreturns a storage withterminate(), which stops its worker and clears the cached channel, so a fresh open after the live-tab park no longer hangs.
Patch Changes
-
#74
0121559Thanks @kilbot! - Removes the unreleased multi-tab database machinery in favour of one live tab per store (ADR-061):CreateDatabaseOptions.multiInstance(createTallyDatabasealways passesmultiInstance: false), thetally-outbox-flushandtally-outbox-statelocal 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 withstartLiveTab.@tallyui/storage-sqlite's worker now swallows thereadypromise's rejection so a pool install failure before anycreateStorageInstancecall doesn't surface as an unhandled rejection, and itsfileslist no longer publishes test files, matching@tallyui/databaseand@tallyui/pos. -
#72
91d9169Thanks @kilbot! - The worker listens before start-up finishes, fixing a hang on every cold start in real browsers. -
#91
fec2ee7Thanks @kilbot! - The worker build bin no longer needs a built dist.
@tallyui/pos
Major Changes
- #24
e7b2fa5Thanks @kilbot! - Breaking: removes the floating-point money and rate paths.calculateTax,extractTax,addTax,TaxResultandformatCurrencyare deleted. Use the exact tax API (computeOrderTax,taxMicros) andformatMoney.TaxContext.getTaxRate(), which returned a fraction, is replaced bygetTaxRatePpm(), which returns integer parts per million.TaxProvidertakesratesPpmand validates it.useCurrencyFormatter()now formatsMoney, anduseCurrencyCode()is added.
Minor Changes
-
#168
670d3b8Thanks @kilbot! - The register approval gate is enforced inuseRegisterSession'scloseSession, not only inRegisterCount: overvarianceThreshold, a close withoutapprovedBythrows the newRegisterApprovalRequiredErrorbefore any write, blind mode included.closeSessiontakesapprovedByandapprovedByName, and they reach the Z (breakdowns.approved_by,approved_by_name); the store'scloseSessiontakesapprovedBy.useRegisterSession'sregisteroption acceptsnullwhile its host opens.closeNeedsApprovalis the shared "over threshold" rule.RegisterCountpassesapprove()'sapprovedByandapprovedByNametocloseSession, and shows the hook's refusal with the same copy. -
#175
a9b77feThanks @kilbot! - One close in flight per register.useRegisterSession'scloseSessionjoins a close already running for the same register, in any hook instance, and returns its closure (the joining call'scounted,approvedByandapprovedByNameare ignored), so a tap during a close no longer starts a second, overlapping one. The hook returns a newclosingflag, true while that close is in flight.RegisterColumnkeeps the count slot up while closing instead of flashing the Finish-closing card, whose button now hasnativeID="register-column-finish-close-button".describeRegisterBarPilltakesclosingand returns the new'Close not finished'pill for a closed session that isn't closing, right after 'Choose a register' and ahead of 'Offline';RegisterBarpassesregister.closing. -
#149
1e2ee56Thanks @kilbot! - A failed save can now end in Continue once its order is confirmed stored.useOrderOutboxgainsisStored(order), andrecordnow treats an order stored with the sameidand money-bearing content (sameSale, new) as stored whatever itscommandId, so a Retry after a requeue no longer fails forever; other content throws the newOrderContentMismatchError.useSaletakes an optionalisStoredand exposescanContinueandcontinueSale();Tenderrenders Continue whencanContinueis true.newSale()is now refused while a failed or running save's order isn't confirmed stored; a refusal during a running save asksisStoredagain, so a hung save whose order is stored can still Continue. A confirmed order is never handed toonSaleCompletedagain (#147's background re-hand is gone).saleLoggerandoutboxLoggerare now exported. -
#115
4df9be4Thanks @kilbot! - Discounts are pre-tax (ADR-062). An order discount is allocated across the lines in proportion to their own-mode amounts (the newallocateOrderDiscount, largest-remainder rounding), each line carries its share inorderDiscountMinorand is taxed after it, so an order discount now lowers the tax instead of coming off the total after tax. A discountedorder.createis version 2, withdiscountMinoron each discounted line and on the payload; a discount-free payload stays version 1, byte-identical.finalizestill rejects discounts until the plugins honour version 2. Receipt lines show theirdiscountMinor. 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
7c69fceThanks @kilbot! -order.displaygainslinesandorderDiscountMinor(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.subtotalMinoris now derived from the total and the discount rows, soΣ lines === subtotalMinorandΣ sub-rows + orderDiscountMinor === discountMinorhold 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.ReceiptLineItemgainsdisplayAmountMinoranddisplayDiscounts, andReceiptDatagainsorderDiscountMinor. Print these above the subtotal.lineTotalMinoris unchanged: it's after every discount and is kept for existing readers.CartTotalnow orders its rows Subtotal / Discount / Tax / Total, matching the receipt, and takes an optionaltaxInclusive, which labels the tax rows "incl." instead of adding them. -
#127
2a0ca7fThanks @kilbot! -Ordergainsdisplay: 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 theorder.createpayload are unchanged;displayis never sent to the server; a parked draft may carry it, but it is recomputed on resume. -
#163
714b4bdThanks @kilbot! -useSale's hung-save check guard is now scoped per completion instead of a shared boolean: a sale whoseisStorednever settles can no longer block a later sale's own hung-save poll from ever confirming and offering Continue (medusapos's #85 review).useOrderOutbox'sisStorednow 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.useOrderOutboxalso exposessavesInFlight: number, the count ofrecord()calls not yet settled, so an app can hold sign-out while a save is in flight. -
#161
f4a4d74Thanks @kilbot! - A hung save — one whose order is built and whose save neither resolves nor throws — now re-asksisStoredby itself every 5 s while it stays unconfirmed, souseSalesetscanContinueandTendercan 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, onnewSale()/continueSale()and on unmount; at most one runs at a time.SALE_SAVINGis now exported from@tallyui/pos. -
#142
60a2218Thanks @kilbot! - Lifted medusapos's neutral outbox core so every platform POS records and sends sales the same way (ADR-052, TV7).@tallyui/posgainsgetDeviceId(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; anduseOrderOutbox({ storeKey, open, transport, deviceId, onBusy?, onOpenError? }), which opens the order store forstoreKey, runs its outbox and returns{ orders, state, recent, record, flush, requeue }.@tallyui/componentsgainsOrdersList, the "Needs attention" and "Recent" orders with a Retry button, takingorders,onRetry, an optionalformatDate(defaultIntl.DateTimeFormat) and an optionalfooter.needsAttentionjoins the pure-function allow-list components may import from@tallyui/pos(ADR-064). -
#138
f09dbbcThanks @kilbot! -@tallyui/posgainsuseSale,addEntryToCart/CartErrorandcatalogueEntries/findEntryByCode/variantPriceLabel(ADR-052, TV5), lifted from medusapos/appa1b981d'suse-sale,lib/cartandlib/cataloguewith the same behaviour.useSaletakes an optionalsession, and stamps a completed sale withstampSessionbeforeonSaleCompleted; without it, behaviour is unchanged. -
#151
c664d4bThanks @kilbot! - New exportwatchFresh(collection, query): a live list onreadFreshinstead of a cachedfind().$, so a write during a query's storage read (RxDB 16.21.1 bug 4) still shows up once its change event arrives.useRegisterSessionanduseOrderOutbox's recent list now use it. -
#11
2a05ecbThanks @kilbot! - Build the product components on the neutral traits.ProductPriceresolves the price list and formats it with Intl in the price's own currency (newcurrencyandlocaleprops;currencySymbolis now only the fallback for an unknown currency).ProductStockBadgereadsgetStock.ProductImagegainsshowPlaceholder, an initial tile for products without images. Core addsformatMoney, atraitContextprop onConnectorProviderfor store-level facts like the store currency, anduseTraitContext.@tallyui/posaddssearchProducts, name/SKU/barcode search through traits that works the same on every backend. -
#120
e0062ceThanks @kilbot! - A per-storeorder.createcapability check replaces the global discount guard (ADR-062).@tallyui/coregainsServerCapabilities,SignInResult.capabilities,SyncContext.capabilities,TallyConnector.capabilities?()andresolveCapabilities(fresh, stored).@tallyui/connector-medusareads the store's supportedorder.createversions fromGET /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.medusaSignInreturns the read capabilities, and both Medusa connectors exposecapabilities(context)for a restored session.finalizeOrderin@tallyui/posnow rejects a discount only when the store's capability is below 2, so a store whose plugin has caught up finalizes a discounted order asorder.createversion 2. -
#17
47b9b4eThanks @kilbot! - Adds an exact, integer-only tax API:ratePpmFromPercent,taxMicros,roundMicrosToMinorandcomputeOrderTax. Line tax is kept exactly in micro-minor-units (as abigint) 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
64cb5e0Thanks @kilbot! - Adds thePosOrderdocument, the neutral record of a completed sale.finalizeOrderturns a fully paid builderOrderinto a pendingPosOrder: 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.toOrderCreateEnvelopemaps it to the TallyUI Sync Protocolorder.createcommand,posOrderSchemastores it in apos_ordersRxDB collection, anduuidv7generates RFC 9562 ids. -
#20
98ea990Thanks @kilbot! - Breaking (pre-1.0): the order model now uses integer minor units throughout.Order,LineItem,Payment, discounts andReceiptDatamoney fields carry aMinorsuffix (totalMinor,unitPriceMinor,amountMinor, ...). Tax is exact and rounded once per order (thetax/exactAPI). Lines carry stackedtaxLines. The receipt's per-rate tax lines always sum to the charged tax (largest remainder).addProductprices fromgetPricesandresolvePricerather than the deprecatedgetPrice. The newaddLineadds a specific variant at a given price with optional tax rates. Parked orders resume throughaddLine, with no synthetic traits. -
#22
55d52faThanks @kilbot! - Adds the order outbox.createOrderOutboxsends pendingPosOrderdocuments from thepos_orderscollection through the TallyUI Sync Protocol, in batches of up to 10. It applies each result (applied,duplicateorrejected) with guarded patches and never drops a sale: transport failures and responses that make no progress retry forever, with jittered exponential backoff.createHttpCommandTransportposts to/tally/v1/commandswith the protocol header, and classifies every non-200 or malformed reply as retryable. -
#131
fbcaf59Thanks @kilbot! -addPosOrderCollection(db)is now the way to openpos_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
e692c40Thanks @kilbot! -pos_ordersgoes to schema version 2 (ADR-032, ADR-065). It adds three optional fields:lateSessionId, and ADR-065'sdisplayandtaxByRate, which nothing writes yet. Apps must adopt this release'saddPosOrderCollection, which migratespos_ordersto 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 toonSaleCompletedand the receipt withlateSessionIdset and nosessionId, so no closure counts it, and alate-saleregister fact is recorded.needsAttentionnow also selects any order withlateSessionId, andOrdersListexplains it: "Taken after the register closed. It is not in that register's closure." -
#39
f2f386cThanks @kilbot! - The command outbox no longer retries every HTTP error forever. After 3 consecutive 401s it pauses and setsauthRequiredin its state so the app can ask the cashier to sign in, then resumes on the nextflush(). A permanent refusal of a whole batch (400, 403, 413, 415, 422) changes no order: sending pauses withrefused: { status, reason }in the state until the nextflush().requeue(orderIds?)moves rejected orders back to pending with a new commandId, except those rejected withidempotency_mismatch, which are left for reconciliation.TransportOutcomegainsunauthorizedandrefusedkinds. -
#94
373e438Thanks @kilbot! -resolvePricekeeps a price'staxInclusiveflag oncurrentandwas. Each order-builder line keeps its price's own tax mode (LineItem.taxInclusive, pluspriceTaxModeConvertedwhen it differs from the store'spricesIncludeTax), 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
getPriceandgetRegularPricereturn the resolved calculated price instead of the admin prices, andisSellableis false when no variant yields a price (for example acalculated_pricewith null amounts). -
#130
516850fThanks @kilbot! -ReceiptData.totalsnow comes fromorder.display(ADR-063), not the settlement fields:subtotalMinoris before discounts anddiscountMinoris every discount, both in the store's display mode, and a newtaxInclusiveflag says whether the tax is added or already included.taxMinorandtotalMinorare unchanged in value. This is a behaviour change for anything that readsReceiptData.totals: the receipt's invariant is nowΣ lineTotalMinor === totals.subtotalMinor − totals.discountMinor, plus+ totals.taxMinor === totals.totalMinorwhen exclusive, or=== totals.totalMinorwhen inclusive. Receipt lines and each line's own discount row are unchanged, still in the line's own mode. -
#125
0988fc3Thanks @kilbot! - Adds the register closure's pure report maths (ADR-032, registers job b1), ported from WCPOSnextat3b5331b5c: 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, andclampClosureScope's history window is ahistoryDaysparameter (default 92, WCPOS'sHISTORY_DAYS) instead of a@wcpos/sync-coreimport. -
#134
1d13699Thanks @kilbot! - Add the register's closure and X-report documents (buildClosureDocument,buildXReportDocument,formatClosureDate,ClosureContext) and register facts (RegisterFact,recordRegisterFact), ported from WCPOSnext(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'sloggingmodule) instead of@wcpos/utils/logger.minorToDecimalmoves out ofexportCsvinto a sharedregisterhelper so both reuse it. -
#121
9441c26Thanks @kilbot! - Adds@tallyui/pos's register maths (packages/pos/src/register), ported from WCPOSnextat3b5331b5c(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), andderiveExpectedfor the float, captured session payments and non-voided paid-in/paid-out cash movements. Refund attribution is deferred until TallyUI has a refund model, soderiveExpecteddoes not yet net refunds against the drawer. All money is TallyUI's integer-minor-units convention, with a requiredexponentparameter wherever a cashier's typed text becomes minor units (0 for JPY, 2 for GBP, 3 for KWD). -
#126
45e0b12Thanks @kilbot! -stampSession(order, sessionId, sessions)is the only way to set aPosOrder'ssessionId: it verifies the session is stillopenorcountingbefore stamping, so a caller that skipsrequireOpenSessioncan no longer leave a sale off every Z with an unchecked, closed session id.finalizeOrderno longer takes asessionIdoption; stamp its result withstampSessioninstead.recordMovementnow 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 andRegisterSessionClosedErroris 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, exportedRegisterMovementStrandedErroris thrown: it carries the movement'sidandsession_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 failedremove()throwsRegisterMovementStrandedErrortoo, and a failed re-read returns the movement as recorded. -
#123
a58fccaThanks @kilbot! - Adds register sessions (ADR-032, registers job a2), ported from WCPOSnextat3b5331b5c: three local-only collections (registerSessionSchemawithregisterSessionCollection,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). APosOrdercarries an optionalsessionId, set bystampSessionand never sent.posOrderSchemais now version 1 (the optionalsessionId): createpos_orderswith the newposOrderCollection(), which carries its identity migration; withposOrderSchemaalone, RxDB refuses the collection.A closed session is final: nothing moves it out of
closed(RegisterSessionClosedError), a repeatcloseSessionis a no-op,recordMovementandvoidMovementtake the sessions collection first and refuse a missing or closed session, andwriteClosurerefuses a session that is not closed. -
#105
6281345Thanks @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
0121559Thanks @kilbot! - Removes the unreleased multi-tab database machinery in favour of one live tab per store (ADR-061):CreateDatabaseOptions.multiInstance(createTallyDatabasealways passesmultiInstance: false), thetally-outbox-flushandtally-outbox-statelocal 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 withstartLiveTab.@tallyui/storage-sqlite's worker now swallows thereadypromise's rejection so a pool install failure before anycreateStorageInstancecall doesn't surface as an unhandled rejection, and itsfileslist no longer publishes test files, matching@tallyui/databaseand@tallyui/pos. -
#55
350967dThanks @kilbot! - Stock reads use the reconciled overlay (ADR-060) and show how fresh it is.@tallyui/corenow holdswithStockOverlayandgetProductStock(@tallyui/posre-exports them), addsSTOCK_LEVELS_LAST_PASS,stockOverlayandstockOverlayAsOfprops onConnectorProvider, and auseProductStock(doc)hook that returns overlay stock plusasOf, orgetStock(doc)when no overlay is given.@tallyui/database:startStockReconcilealso returnsstate$(running,truncated,lastError,lastCompletedAt),reconcileStock()resolves withcompletedAt, and each successful pass stores{ completedAt }in thelast-passlocal document ofstock_levels, whichcreateTallyDatabasenow creates with local documents (apps that create the collection themselves use the newstockLevelsCollectionconfig; without local documents a pass rejects with a clear error); a restarted runner seedslastCompletedAtfrom it.@tallyui/posaddsstockOverlayAsOf$.ProductStockBadgereads stock throughuseProductStockand appends " · as of <time>" when an overlay is given (showAsOf={false}hides it). -
#53
e3b8686Thanks @kilbot! - Add a stock reconcile pass (ADR-060).@tallyui/coreadds theStockReconcileAdaptercontract (fetchPagesand a pureoverlay) and an optionalreconcile.stockonTallyConnector.@tallyui/databaseadds the local-onlystock_levelscollection (STOCK_LEVELS_COLLECTION,stockLevelsSchema), whichcreateTallyDatabasecreates for connectors withreconcile.stock, andstartStockReconcile, which re-reads stock every 5 minutes (and on demand throughreconcileStock()) 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/posaddsstockOverlay$,withStockOverlayandgetProductStock, which read stock from the overlay where it has an entry and from the replicated product otherwise. The Vendure connector reconciles variantstockLevels, and the Medusa connector reconciles inventory item location levels, so stock changes that bump no product timestamp reach the POS. -
#106
e7d3033Thanks @kilbot! -@tallyui/posadds the neutral store-settings bootstrap every platform POS shares.resolveStoreSettingsreads the app's stored choice, callsconnector.storeSettings, returnschoosewith the choices onchoice_required(the tried choice asinitial), and saves a new pick only once it resolves.useStoreSettingswraps it as a hook that re-resolves on a store switch and discards stale results, withchoose(choice)andretry().withPricingContextandtaxProviderPropsmap the settings into the replication'sSyncContextand<TaxProvider>. The app keeps persistence throughloadChoiceandsaveChoice. -
#118
5bcabfbThanks @kilbot! - Add the tender reducer, ported from WCPOSnextat 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,planLegsandMAX_TENDER_MINORare exported from@tallyui/pos, along with their state and action types. WCPOS's WooCommerce-only legacy tab (TenderTab, thetabfield,set-tab) is dropped as platform-specific;PaymentTransportis redefined locally as the same hardware transport union. No screens: those come with the TV6 components lift and the app. -
#104
bc46d99Thanks @kilbot! -ProductGridhides products this channel doesn't sell (traits.isSellablefalse, for example a Medusa product outside the sales channel) unlessshowUnsellableis set, andProductCardshows such a product in a muted "Not sold here" state instead of its price.OrderBuilder.addProductnow refuses an unsellable product before looking up its price, instead of throwing the unrelated "No price in …" error. -
#143
fb6c2e3Thanks @kilbot! - AdduseRegisterSession, 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 frompos_orders, and nothing is sent to a server.requireOpen()gates tender.RegisterTenderInProgressErrorstops counting or closing during a sale at tender,RegisterSessionAlreadyOpenErrorstops a second open, andRegisterCloseIncompleteErrorstops an open until an interrupted close is finished. A resumed close uses the count saved on the session.
Patch Changes
-
#155
96bf8f7Thanks @kilbot! -addPosOrderCollection(db): when a close stops waiting (afterPOS_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 rawSQLite.bulkWrite() already closedand an unhandled rejection, and left the SQLite handle unable to write until restart. The open now rejects withPosOrderOpenClosedError(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(scopepos-orders), and a close that gives up once the migration is done, while the open reads its status, also rejects withPosOrderOpenClosedError. -
#174
160252cThanks @kilbot! -ClosureSheetshows 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.RegisterColumnoffers "Finish closing" whenuseRegisterSession'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, whereopenSessionwould otherwise refuse withRegisterCloseIncompleteError.buildClosureDocument's return type now carriesclosure.unsynced_count: numberand each movement'sid/reasonasstring, without a cast; no runtime output changed. -
#147
cbda7e0Thanks @kilbot! -useSale()follow-ups to #145's idempotentcomplete(): the sale now locks fromcomplete()'s entry (savingtrue, every change refused with SALE_SAVING), not only once the order is built and stamped — so Back, an edit orcancelTender()during the session stamp is refused, and afinalizeOrderrefusal 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'scomplete()quietly share its promise, and an attempt still building or stamping whennewSale()lands can no longer install its order as the new sale's pending completion — that order still reachesonSaleCompletedonce it's built, since the money is already taken; only a throw from that background call is new, logged aterrorrather than shown to the new sale. The order outbox'srun()now checks the stored order'scommandIdbefore marking it sent or rejected (not only itssyncStatus), 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 newcommandIdwhile its old command was in flight can't take the old result. -
#145
e103c71Thanks @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 afteronSaleCompletedthrows hands over the same order (the sameid,commandIdandcreatedAt, 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 secondcomplete()while one is in flight (a double tap) returns the first call's promise instead of building a second order, andcomplete()on the receipt does nothing. While a completion is pending, the newsavingflag is true and the sale is locked:add,setQuantity,remove,applyDiscount,removeDiscount,setTender,startTenderandcancelTenderchange nothing and set the error "This sale is being saved. Retry to finish it."newSale()abandons it, and leaves any order already stored inpos_ordersuntouched.useOrderOutbox().recordtreats an order already stored under the samecommandIdas stored, and still flushes; the sameidunder anothercommandIdstill rejects. -
#129
350dd72Thanks @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'sdiscountMinoris unchanged; only the per-discountamountMinorbreakdown the receipt will print is corrected (#63). -
#152
7e489e0Thanks @kilbot! -addPosOrderCollection(db): a close now waits for the whole open (up toPOS_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 rawReferenceError: 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 exportedPosOrderOpenClosedError(code: 'POS_ORDER_OPEN_CLOSED'): reopen and call it again. -
#133
f67535dThanks @kilbot! -addPosOrderCollection(db)follow-ups from the #131 review: a close no longer waits forever on a stuck migration (it gives up afterPOS_ORDER_MIGRATION_CLOSE_WAIT_MS, 10s, leaving the worst case anERRORstatus the next open safely resets and retries); it refuses amultiInstancedatabase 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 anotherdb.onClosehandler each time, only ever one. -
#135
d921415Thanks @kilbot! -addPosOrderCollectionno longer lets a failed migration run's replication outlive the run (RxDB'scancel()never stops it), so rapid DM4 retries on the same database raise no unhandledremoved alreadyrejection. 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
f1af98cThanks @kilbot! -OrderCreateLinegains an optionaltaxInclusive(ADR-038 amendment 2). It is the line's own tax mode, sent only when that mode differs from the order'spricesIncludeTax. Single-mode orders produce byte-identical payloads.finalizestill rejects converted lines until the Medusa plugin honours the field. -
#158
a7fdde8Thanks @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 newsweepOrphanStampsturns each such order into a late sale: it removessessionId, setslateSessionIdand logs onelate-salefact. 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.useRegisterSessionruns it on start, after each close's closure, and whenever a new closure appears.voidMovementtakes an optionalclosurescollection and re-reads the session after its writes. If the session closed meanwhile and no closure lists the reversal, it throwsRegisterMovementStrandedError, and it always does so whenclosuresisn't passed. The reversal is kept either way. -
#146
5e5ba11Thanks @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 afindOne(id)can go stale too. New exportsreadFresh(collection, query)andcountFresh(collection, selector)do these reads. -
#38
6444868Thanks @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
7502d61Thanks @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
125c85aThanks @kilbot! -readFresh,countFreshandwatchFreshmove to a new, side-effect-free subpath,@tallyui/core/rxdb. Core now listsrxdb(>=16) andrxjs(>=7) as optional peer dependencies, needed only by that subpath; core's main entry stays free of both.@tallyui/posre-exports the helpers unchanged. The id and fingerprint reconciles in@tallyui/databaseread the local products withreadFreshinstead of a cachedfind(), 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
b32d1b4Thanks @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
93ed2ccThanks @kilbot! -useSalenow stamps the session in force when the tender started (startTender), pinned for that tender, instead of reading itssessionoption atcomplete()time. A session closed betweenstartTenderandcomplete()(so the app'ssaleSessionwent undefined) previously skipped the stamp entirely: the order got neithersessionIdnorlateSessionIdand nolate-salefact. It now becomes a late sale on the pinned session. A tender started with no session stays unstamped, even if a session appears beforecomplete(). The pin is dropped bycancelTender()andnewSale(). -
#156
244bb46Thanks @kilbot! -stampSession,recordMovementandvoidMovementcheck that the session is live with a primary-key storage read instead of a cachedfindOne, and so doesrecordMovement'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
a9a4525Thanks @kilbot! -useSale().newSale()now refuses (with the saving error, changing nothing) while acomplete()attempt is still building or stamping its order — not only once a pending completion exists. Previously that window letnewSale()abandon the attempt and start a new sale at once, handing the built order toonSaleCompletedin 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, andhandOverAbandoned, are removed. Also fixes three gaps the #149 review found no test caught:complete()now clears a stalecanContinueat every new attempt's entry (including a Retry after Continue was offered), and a confirmation fromisStoredthat arrives after the completion is no longer pending, or after a newer attempt has started, no longer setscanContinue. -
#160
787cadaThanks @kilbot! - The orphan-stamp sweep (sweepOrphanStamps, ADR-032) is now bounded by aswept_closure_idsset on the register document: a closure it has already checked costs nopos_ordersquery, and the set needs no schema bump. It now takesregisterandstoreKey, aswriteClosuredoes. A closure joins the set only once it is older than the newSWEEP_GRACE_MS, so an insert racing a close still gets caught;useRegisterSessionruns afullsweep (ignoring the set) once on start to repair anything a save that outlasts the grace missed.closeSessionalready 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 withreadSession. -
#172
3e63452Thanks @kilbot! -useSale'sstartTendertakes the confirmed session (startTender(method, { session })) and pins it instead of the renderedsessionoption, which can lag a session opened just before the tender.useRegisterSessionaddsrequireSaleSession():requireOpen(), returning{ id, sessions }to pass tostartTender. A tender that pinned no session, with a session rendered bycomplete(), now stamps that current session and logs a warning, instead of leaving the order unstamped. -
#166
07e0198Thanks @kilbot! -varianceTextputs 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
38df38aThanks @kilbot! -watchFreshre-reads once per bulk write instead of once per document: it listens tocollection.eventBulks$rather than the per-documentcollection.$, so abulkInsertof 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
5053527Thanks @kilbot! - no longer publishes test files -
#36
d1bc892Thanks @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 undefinedbg-surface-altortext-mutedtext classes, so labels such as "Change Due" are legible. -
#37
12b7723Thanks @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
78cada7Thanks @kilbot! -tokens.cssnow defines the light theme in a@variant lightblock, 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 thelightcustom variant, so it still compiles with plain Tailwind 4. Colour values are unchanged.
@tallyui/connector-woocommerce
Major Changes
-
#15
807d8daThanks @kilbot! - Product replication adapters are now pull-only. Thepushhandler is removed frommedusaProductReplication,wooProductReplication,vendureProductReplicationandshopifyProductReplication. 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.pushdirectly must stop doing so.
Minor Changes
-
#11
f90e59dThanks @kilbot! - Add backend-neutral price and stock traits.ProductTraitsgainsgetPrices(a price list of integer minor-unitMoneyentries,baseorsale, per currency) andgetStock(in_stock | out_of_stock | backorder | unknownplus an optional quantity). Core addsresolvePrice,moneyFromMajor,moneyToMajorandminorUnitDigits. Every connector maps its own shape into them; WooCommerce'sinstock/outofstock/onbackorderstrings now stay inside the WooCommerce connector. The string-price and WooCommerce-style stock accessors remain and are deprecated. -
#11
bc0a224Thanks @kilbot! - AddisSellableandgetVariantCountproduct traits to core and all four connectors.
Patch Changes
@tallyui/connector-medusa
Major Changes
-
#15
807d8daThanks @kilbot! - Product replication adapters are now pull-only. Thepushhandler is removed frommedusaProductReplication,wooProductReplication,vendureProductReplicationandshopifyProductReplication. 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.pushdirectly must stop doing so.
Minor Changes
-
#54
50317c8Thanks @kilbot! - Connectors can sign a user in:ConnectorAuthgains an optionalsignIn(baseUrl, { email, password }, init?)that resolves to aSignInResult(token, optional ISO 8601expiresAt) and rejects with aSignInErrorwhosecodeisinvalid_credentials,unsupportedorfailed. The app stores the token and passes it back togetHeadersastoken.Vendure's auth gains a sign-in flow: it runs the Admin API
loginmutation and takes the token from thevendure-auth-tokenheader (the server'stokenMethodmust include'bearer'). Its fields are nowurl,email,passwordand an optionalchannel_token.getHeaderssendscredentials.api_keyasvendure-api-key, otherwisecredentials.tokenas a Bearer token, plusvendure-tokenwhenchannel_tokenis set. The oldauth_tokencredential is still accepted as a deprecated alias fortoken.Medusa's
medusaAdminUserAuthsigns in throughPOST /auth/user/emailpassand readsexpiresAtfrom the JWT'sexp.medusaSecretKeyAuthhas no sign-in. -
#85
609ebd8Thanks @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/coreadds theFingerprintReconcileAdaptercontract (fetchPages, a purefingerprintandenqueue) and an optionalreconcile.pricesonTallyConnector.@tallyui/databaseaddsstartFingerprintReconcile, which runs no pass at start by default and otherwise mirrors the id reconcile: a complete, successful pass only,state$(running,lastResult,lastError), andstop().@tallyui/connector-medusaaddsreconcile.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
63f11faThanks @kilbot! - Add a Bearer credential type for Medusa admin users:medusaAdminUserAuthsends the JWT from emailpass sign-in asAuthorization: Bearer <jwt>, andmedusaAdminUserConnectorismedusaConnectorwith that auth. The secret-key auth is now also exported asmedusaSecretKeyAuth;medusaConnectoris unchanged. -
#92
945bb83Thanks @kilbot! - Medusa prices as Medusa charges them (ADR-060 D2b).SyncContextgains an optionalpricingContext(fromstoreSettings()),ProductPricean optionaltaxInclusive, andTallyConnector.reconcileacalculatedPricesslot. With a pricing context, every Medusa product document build fills each variant'scalculated_pricefrom the store API (nullwhen 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,nullas unsellable.reconcile.calculatedPricesre-delivers products whose calculated prices changed with no timestamp bump; run it everyMEDUSA_CALCULATED_PRICE_RECONCILE_INTERVAL_MS(30 minutes) withmaxPages: 1000. Without a pricing context, documents and prices are unchanged. -
#63
d9fe1e3Thanks @kilbot! - Fix the Medusa connector's incremental pull: Medusa 2.21 honours only the operator formupdated_at[$gte], and silently ignored the connector'supdated_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'supdated_atdoes not change) now reaches the local copy throughreplication.productsandreconcile.ids.@tallyui/databaseadds a mass-deletion brake tostartIdReconcile: a pass that would tombstone more thanmaxDeleteShare(default 20%) of local products, and more than 10 of them, queues nothing and warns instead, unlessallowMassDeleteis set. -
#102
7490a3fThanks @kilbot! - A connector schema version bump now drops and resyncs its collection (ADR-060 amendment 9).createTallyDatabaseadds RxDB's migration-schema plugin and gives each connector collection above version 0 av => nullstrategy per earlier version, andstartReplicationappends-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_levelsandpos_ordersare untouched.The Medusa products schema is now version 1 and declares
variants[].calculated_price(object ornull). 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 withmedusaProductSchemaoutsidecreateTallyDatabasemust useconnectorCollection(medusaProductSchema)from@tallyui/database, which supplies the strategies and the migration plugin; otherwise RxDB throws COL12. -
#89
4c2cf8fThanks @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 apricingContext(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, asStoreSettingsError('choice_required'), so the app asks once; a store with no publishable key at all rejects withStoreSettingsError('failed'). The publishable key is a public credential and may sit inpricingContext, but never appears in an error message,choices, or console output. -
#81
03cd385Thanks @kilbot! - Medusa'sreplication.productsnow includes a variant feed, so price edits arrive incrementally. Medusa 2.21 bumps a variant'supdated_aton 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
f90e59dThanks @kilbot! - Add backend-neutral price and stock traits.ProductTraitsgainsgetPrices(a price list of integer minor-unitMoneyentries,baseorsale, per currency) andgetStock(in_stock | out_of_stock | backorder | unknownplus an optional quantity). Core addsresolvePrice,moneyFromMajor,moneyToMajorandminorUnitDigits. Every connector maps its own shape into them; WooCommerce'sinstock/outofstock/onbackorderstrings now stay inside the WooCommerce connector. The string-price and WooCommerce-style stock accessors remain and are deprecated. -
#120
e0062ceThanks @kilbot! - A per-storeorder.createcapability check replaces the global discount guard (ADR-062).@tallyui/coregainsServerCapabilities,SignInResult.capabilities,SyncContext.capabilities,TallyConnector.capabilities?()andresolveCapabilities(fresh, stored).@tallyui/connector-medusareads the store's supportedorder.createversions fromGET /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.medusaSignInreturns the read capabilities, and both Medusa connectors exposecapabilities(context)for a restored session.finalizeOrderin@tallyui/posnow rejects a discount only when the store's capability is below 2, so a store whose plugin has caught up finalizes a discounted order asorder.createversion 2. -
#11
bc0a224Thanks @kilbot! - AddisSellableandgetVariantCountproduct traits to core and all four connectors. -
#57
55ae68fThanks @kilbot! -SignInErrorCodesplits the oldfailedin two:failednow means no response arrived (a network error), and the newserver_errormeans a response arrived but was unusable (a bad status, a malformed body, or a missing token).SignInErrorgains an optionalstatusfrom a third constructor argument. Callers that switch oncodeshould handleserver_error.Medusa's sign-in now treats
mfa_required: trueandverification_required: truethe same as alocationbody: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 nowserver_errorwith the HTTP status.Vendure's sign-in now treats
NATIVE_AUTH_STRATEGY_ERRORasunsupported, since native email/password auth is disabled on the server. A malformed response body, a non-OK status, GraphQL errors, a missingdata.loginand any otherErrorResultare nowserver_errorwith the HTTP status. -
#64
402ec36Thanks @kilbot! - Both connectors now store a product's variants sorted by id, since neither Medusa nor Vendure guarantees variant order across requests:@tallyui/coreaddscompareIds, and the Medusa and Vendure product projections (toDocument,toProductDocument) sortvariantswith it before the document is stored. Traits that readvariants[0](getPrices,getSku,getPrice,getStockQuantity,getBarcodeand 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
e3b8686Thanks @kilbot! - Add a stock reconcile pass (ADR-060).@tallyui/coreadds theStockReconcileAdaptercontract (fetchPagesand a pureoverlay) and an optionalreconcile.stockonTallyConnector.@tallyui/databaseadds the local-onlystock_levelscollection (STOCK_LEVELS_COLLECTION,stockLevelsSchema), whichcreateTallyDatabasecreates for connectors withreconcile.stock, andstartStockReconcile, which re-reads stock every 5 minutes (and on demand throughreconcileStock()) 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/posaddsstockOverlay$,withStockOverlayandgetProductStock, which read stock from the overlay where it has an entry and from the replicated product otherwise. The Vendure connector reconciles variantstockLevels, and the Medusa connector reconciles inventory item location levels, so stock changes that bump no product timestamp reach the POS. -
#19
8df0569Thanks @kilbot! - Adds variant traits.VariantSummary(id,title,sku,barcode,prices,stock) and the optionalProductTraits.getVariantsdescribe every purchasable variant of a product, andfindVariantByCodefinds a variant by barcode or SKU for scanning. The Medusa connector implementsgetVariants; its product-levelgetPricesandgetStockresults are unchanged.
Patch Changes
-
#48
6b1b0b7Thanks @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
f8b0dacThanks @kilbot! - A fresh install downloads the catalogue once. A pull adapter can now declarepull.seedCheckpoint; on a fresh install (no stored checkpoint)combinePullAdaptersreads 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'supdated_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
9cd78cdThanks @kilbot! -medusaStoreSettings'schoice_requiredchannel 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
4e6261fThanks @kilbot! - Fix product replication skipping a page of products per batch: the checkpoint now keeps itsupdated_atfilter fixed while paging and only advances it at the end of a pass. -
#11
ffa9f19Thanks @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 computeinventory_quantity), and pull products inupdated_atorder so the checkpoint is valid. -
#111
35a3fbaThanks @kilbot! - A chosen country outside the region is reported aschoice_requiredinstead of silently using the region's only country. -
#11
60230f0Thanks @kilbot! - Make the Medusa product schema load under RxDB dev-mode (indexedhandleandstatusare now required with amaxLength), keep pulled documents to the schema's fields so new Medusa API fields never fail validation, and page each replication pass inidorder, since many products share anupdated_at. -
#88
5053527Thanks @kilbot! - no longer publishes test files -
#94
373e438Thanks @kilbot! -resolvePricekeeps a price'staxInclusiveflag oncurrentandwas. Each order-builder line keeps its price's own tax mode (LineItem.taxInclusive, pluspriceTaxModeConvertedwhen it differs from the store'spricesIncludeTax), 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
getPriceandgetRegularPricereturn the resolved calculated price instead of the admin prices, andisSellableis false when no variant yields a price (for example acalculated_pricewith null amounts). -
#11
b1b6e30Thanks @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
807d8daThanks @kilbot! - Product replication adapters are now pull-only. Thepushhandler is removed frommedusaProductReplication,wooProductReplication,vendureProductReplicationandshopifyProductReplication. 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.pushdirectly must stop doing so.
Minor Changes
-
#11
f90e59dThanks @kilbot! - Add backend-neutral price and stock traits.ProductTraitsgainsgetPrices(a price list of integer minor-unitMoneyentries,baseorsale, per currency) andgetStock(in_stock | out_of_stock | backorder | unknownplus an optional quantity). Core addsresolvePrice,moneyFromMajor,moneyToMajorandminorUnitDigits. Every connector maps its own shape into them; WooCommerce'sinstock/outofstock/onbackorderstrings now stay inside the WooCommerce connector. The string-price and WooCommerce-style stock accessors remain and are deprecated. -
#11
bc0a224Thanks @kilbot! - AddisSellableandgetVariantCountproduct traits to core and all four connectors.
Patch Changes
-
#88
5053527Thanks @kilbot! - no longer publishes test files -
#11
b1b6e30Thanks @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
807d8daThanks @kilbot! - Product replication adapters are now pull-only. Thepushhandler is removed frommedusaProductReplication,wooProductReplication,vendureProductReplicationandshopifyProductReplication. 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.pushdirectly must stop doing so.
Minor Changes
-
#54
50317c8Thanks @kilbot! - Connectors can sign a user in:ConnectorAuthgains an optionalsignIn(baseUrl, { email, password }, init?)that resolves to aSignInResult(token, optional ISO 8601expiresAt) and rejects with aSignInErrorwhosecodeisinvalid_credentials,unsupportedorfailed. The app stores the token and passes it back togetHeadersastoken.Vendure's auth gains a sign-in flow: it runs the Admin API
loginmutation and takes the token from thevendure-auth-tokenheader (the server'stokenMethodmust include'bearer'). Its fields are nowurl,email,passwordand an optionalchannel_token.getHeaderssendscredentials.api_keyasvendure-api-key, otherwisecredentials.tokenas a Bearer token, plusvendure-tokenwhenchannel_tokenis set. The oldauth_tokencredential is still accepted as a deprecated alias fortoken.Medusa's
medusaAdminUserAuthsigns in throughPOST /auth/user/emailpassand readsexpiresAtfrom the JWT'sexp.medusaSecretKeyAuthhas no sign-in. -
#45
14620d9Thanks @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
3e09957Thanks @kilbot! - AddcombinePullAdaptersto@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.productsnow includes a variant feed that re-delivers parent products whose variants changed. Vendure does not bumpProduct.updatedAton 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
2424107Thanks @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
540044cThanks @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'supdatedAtdoes not change) reaches the local copy.@tallyui/coreadds theIdReconcileAdaptercontract andcreateReconcileFeed, which turns queued corrections into a pull-only adapter meant as the last key ofcombinePullAdapters.@tallyui/databaseadds thestartIdReconcilerunner.@tallyui/connector-vendureimplements the Vendure side and wires it intoreplication.productsandreconcile.ids. Nothing is written locally into the replicated collection; corrections arrive only through the collection's own pull. -
#11
f90e59dThanks @kilbot! - Add backend-neutral price and stock traits.ProductTraitsgainsgetPrices(a price list of integer minor-unitMoneyentries,baseorsale, per currency) andgetStock(in_stock | out_of_stock | backorder | unknownplus an optional quantity). Core addsresolvePrice,moneyFromMajor,moneyToMajorandminorUnitDigits. Every connector maps its own shape into them; WooCommerce'sinstock/outofstock/onbackorderstrings now stay inside the WooCommerce connector. The string-price and WooCommerce-style stock accessors remain and are deprecated. -
#11
bc0a224Thanks @kilbot! - AddisSellableandgetVariantCountproduct traits to core and all four connectors. -
#57
55ae68fThanks @kilbot! -SignInErrorCodesplits the oldfailedin two:failednow means no response arrived (a network error), and the newserver_errormeans a response arrived but was unusable (a bad status, a malformed body, or a missing token).SignInErrorgains an optionalstatusfrom a third constructor argument. Callers that switch oncodeshould handleserver_error.Medusa's sign-in now treats
mfa_required: trueandverification_required: truethe same as alocationbody: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 nowserver_errorwith the HTTP status.Vendure's sign-in now treats
NATIVE_AUTH_STRATEGY_ERRORasunsupported, since native email/password auth is disabled on the server. A malformed response body, a non-OK status, GraphQL errors, a missingdata.loginand any otherErrorResultare nowserver_errorwith the HTTP status. -
#64
402ec36Thanks @kilbot! - Both connectors now store a product's variants sorted by id, since neither Medusa nor Vendure guarantees variant order across requests:@tallyui/coreaddscompareIds, and the Medusa and Vendure product projections (toDocument,toProductDocument) sortvariantswith it before the document is stored. Traits that readvariants[0](getPrices,getSku,getPrice,getStockQuantity,getBarcodeand 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
e3b8686Thanks @kilbot! - Add a stock reconcile pass (ADR-060).@tallyui/coreadds theStockReconcileAdaptercontract (fetchPagesand a pureoverlay) and an optionalreconcile.stockonTallyConnector.@tallyui/databaseadds the local-onlystock_levelscollection (STOCK_LEVELS_COLLECTION,stockLevelsSchema), whichcreateTallyDatabasecreates for connectors withreconcile.stock, andstartStockReconcile, which re-reads stock every 5 minutes (and on demand throughreconcileStock()) 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/posaddsstockOverlay$,withStockOverlayandgetProductStock, which read stock from the overlay where it has an entry and from the replicated product otherwise. The Vendure connector reconciles variantstockLevels, and the Medusa connector reconciles inventory item location levels, so stock changes that bump no product timestamp reach the POS. -
#87
ac2a24aThanks @kilbot! -TallyConnectorgains an optionalstoreSettings(context, choice?)(TV4): one read-only call for the store's currency,pricesIncludeTax,taxRatesPpmand an opaque connector-specificpricingContext, so the app can feed the connector's own tax-inclusivity option and the POSTaxProviderfrom a single source of truth instead of two hand-matched settings. Rejects with aStoreSettingsError(choice_requiredwithchoices, orfailed).Vendure's
storeSettingsreads the active channel's currency andpricesIncludeTax, 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).defaultis theisDefaultcategory's rate, or, when none is flagged, the first category Vendure's owntaxCategorieslists — 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'spricesIncludeTaxoption is unchanged; passsettings.pricesIncludeTaxfromstoreSettingsinstead of hand-matching it to the POS. -
#112
8a3f323Thanks @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'spriceWithTaxwithout bumping the variant'supdatedAt, so neither the product feed nor the variant feed re-delivers it (ADR-060). -
#110
b814bf3Thanks @kilbot! - Fixes three Vendure stock gaps (backlog 28, from the #45 stock review): a variant withtrackInventoryFALSE, orINHERITwith the global setting off, is now always in stock;outOfStockThreshold(per variant, or the global one throughuseGlobalOutOfStockThreshold) is now subtracted from available stock, matching Vendure's own saleable rule;getStockStatusandgetStockQuantitynow aggregate every variant, asgetStockalready did, instead of reading variant 0 only.Adds
vendureGlobalStockSettings(context)for the channel's stock defaults, andcreateVendureConnectoroptionsglobalTrackInventoryandglobalOutOfStockThreshold.The Vendure product schema is now version 1, declaring
variants[].trackInventory,outOfStockThreshold,useGlobalOutOfStockThresholdandenabled. 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 withvendureProductSchemaoutsidecreateTallyDatabasemust useconnectorCollection(vendureProductSchema)from@tallyui/database.
Patch Changes
-
#97
f8b0dacThanks @kilbot! - A fresh install downloads the catalogue once. A pull adapter can now declarepull.seedCheckpoint; on a fresh install (no stored checkpoint)combinePullAdaptersreads 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'supdated_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
5053527Thanks @kilbot! - no longer publishes test files -
#11
b1b6e30Thanks @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
5885373Thanks @kilbot! - A variant disabled in Vendure (enabled: false, replicated since #110) is no longer offered, priced or counted:getVariants,getPrices,getPrice,getRegularPrice,getStockandgetVariantCountnow consider live variants only, andisSellablealso requires at least one when the product has variants at all. A product with none left is not sellable, soaddProductrefuses it (#104). -
#114
51d4818Thanks @kilbot! - Vendure pull robustness (backlog 29, 30, 31). The high-water mark and both skew probes now select onlyid updatedAt, not the full product query. A mid-pass checkpoint in the shape saved before #45's pass-state fields (skipandupdatedAtalone) 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
Architecture
How Tally UI's connector and trait layer maps backend-specific product data into components through local RxDB storage and pull replication.
Connectors
Available Tally UI connectors for WooCommerce, MedusaJS, Shopify, and Vendure, with authentication, store sessions, replication, and custom connector setup.