Skip to content

chore: bump version to 1.9.0#11

Closed
kilbot wants to merge 3 commits into
mainfrom
release/1.9.0
Closed

chore: bump version to 1.9.0#11
kilbot wants to merge 3 commits into
mainfrom
release/1.9.0

Conversation

@kilbot
Copy link
Copy Markdown
Contributor

@kilbot kilbot commented May 15, 2026

Summary

  • Bump the web bundle package version to 1.9.0.
  • Rebuild the checked-in web bundle so the embedded Expo/AppInfo version reports 1.9.0.

Test plan

  • pnpm --filter @wcpos/web-bundle run build
  • pnpm --filter @wcpos/web-bundle run lint currently fails because ESLint reports the scripts glob is ignored; this appears to be a pre-existing tooling/config issue.

Companion PRs

  • Parent monorepo PR will update the submodule pointer.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added raw network and native printing support for Epson and Star devices (HTML printing not supported).
    • Added storage migration orchestration and verification to safely migrate and finalize on-device data.
    • Introduced an OPFS-backed web worker for improved web storage performance and reliability.
  • Chores

    • Added a generated global stylesheet with multiple themes and utilities; updated build assets and bumped package version to 1.9.0.

Review Change Stack

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 48c2c6738a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread build/index.html Outdated
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: wcpos/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 62feb525-3d62-432b-843f-ecd584c12171

📥 Commits

Reviewing files that changed from the base of the PR and between e28e7af and f5cbb95.

📒 Files selected for processing (2)
  • build/_expo/static/js/web/network-adapter-300e404dc0027469f95ab174a2f92430.js
  • build/opfs.worker.js
✅ Files skipped from review due to trivial changes (1)
  • build/_expo/static/js/web/network-adapter-300e404dc0027469f95ab174a2f92430.js

📝 Walkthrough

Hidden review stack artifact

Walkthrough

Adds native and network printer adapters (Epson, Star), a network router, storage migration runner/primitives and verification, an OPFS-backed worker, regenerated Tailwind CSS and updated build assets, and bumps package version to 1.9.0.

Changes

Multi-Vendor Printer Adapter Support

Layer / File(s) Summary
Network router and Epson adapters
build/_expo/static/js/web/network-adapter-300e404dc0027469f95ab174a2f92430.js, build/_expo/static/js/web/epson-native-adapter-b4fa0da6d7d6a8538b0834408fc46bbd.js
NetworkAdapter routes to vendor delegates; EpsonEposAdapter posts ePOS SOAP (hex payload) with abortable timeout and parses XML response; EpsonNativeAdapter normalizes targets and manages a cached native printer for raw printing.
Star adapters (native + WebPRNT)
build/_expo/static/js/web/star-native-adapter-447f65051c90e466214dcaa379cb64cf.js, build/_expo/static/js/web/network-adapter-300e404dc0027469f95ab174a2f92430.js
StarNativeAdapter lazy-initializes native printer and cleans up resources; StarWebPrntAdapter base64-chunks raw data, posts WebPRNT XML with timeout, validates <Status>, and rejects HTML printing.

Storage Migration System and Verification

Layer / File(s) Summary
Migration runner and migration primitives
build/_expo/static/js/web/run-storage-migration-f05d8684c4a6f54aa51497bbc8719e4b.js
runStorageMigration manages migration-local-doc marker lifecycle and claims; migrateStorage/migrateCollection migrate collections in batches, copy/rewire attachments, bulk-write targets, and mark old rows deleted. A small re-export wrapper exposes dependency exports.
Migration verification and cleanup
build/_expo/static/js/web/verify-migration-8b158f6ee6fa844a09031efae0961c1d.js
verifyStorageMigration validates marker status/labels and conditionally performs deferred cleanup via cleanupOldWebDatabase (wraps indexedDB.deleteDatabase), then upserts completion status.

OPFS Worker, Web Assets, and Release

Layer / File(s) Summary
OPFS worker: document persistence and remote storage
build/opfs.worker.js
Full OPFS-backed worker implementing filesystem adapters, queued/locked execution, document persistence, changelog/indexing, optional attachment storage, query evaluation ($sort/$skip/$limit), and worker message routing for collection operations.
Web assets: CSS, scripts, and metadata
build/_expo/static/css/global-68a8a3225c7216959703b116b3266f09.css, build/index.html, build/metadata.json
Adds generated Tailwind v4 global CSS header/properties; index.html switches window.idbWorkerwindow.opfsWorker and updates the deferred entry script path; metadata.json points to new hashed bundle and CSS asset names.
Version release to 1.9.0
package.json
Package version bumped from 1.8.0 to 1.9.0.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

Printers hum and workers spin,
Old DBs fold, new hashes win,
OPFS keeps documents bright,
Adapters print into the night,
One-point-nine sails into light.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: bump version to 1.9.0' accurately describes the primary change—updating the package version from 1.8.0 to 1.9.0 and rebuilding artifacts.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/1.9.0

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor Author

kilbot commented May 15, 2026

Fix round 2 triage

Thread File Issue Decision Commit
PRRT_kwDOLDv0OM6CTfzq index.html index.html referenced deleted __expo-metro-runtime and __common chunks that are not present under build/_expo/static/js/web. Fixed and resolved e28e7af
PRRT_kwDOLDv0OM6CTje5 network-adapter-300e404dc0027469f95ab174a2f92430.js Star WebPRNT treated malformed 200 responses without <Status> as success. Fixed and resolved e28e7af
PRRT_kwDOLDv0OM6CTje- run-storage-migration-f05d8684c4a6f54aa51497bbc8719e4b.js Migration tombstoned old rows without checking target bulkWrite errors. Fixed and resolved e28e7af
PRRT_kwDOLDv0OM6CTjfB verify-migration-8b158f6ee6fa844a09031efae0961c1d.js Deferred cleanup compared against lazy chunk load time instead of launch start. Fixed and resolved e28e7af
PRRT_kwDOLDv0OM6CTjfG opfs.worker.js OPFS index maintenance looked up rows by non-unique encoded index value. Fixed and resolved e28e7af
CodeRabbit review body network-adapter-300e404dc0027469f95ab174a2f92430.js Star WebPRNT URL hardcoded https://, blocking HTTP-only printer environments. Fixed e28e7af

Skipped threads

Thread Reason for skipping
None No excluded actionable threads in this round.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
build/_expo/static/js/web/network-adapter-300e404dc0027469f95ab174a2f92430.js (1)

1-1: ⚡ Quick win

Should Star URL scheme be configurable or protocol-aware?

On Line 1, StarWebPrntAdapter is always initialized with https://.... Could this block printers/environments that expose only HTTP WebPRNT, especially since Epson logic already adapts protocol/port? Would you consider deriving scheme similarly or allowing an explicit scheme in settings?
As per coding guidelines, "When author intent is unclear, ask a question rather than request a change."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@build/_expo/static/js/web/network-adapter-300e404dc0027469f95ab174a2f92430.js`
at line 1, The Star branch in NetworkAdapter.constructor hardcodes https for
StarWebPrntAdapter which can break printers only exposing http; update
NetworkAdapter (constructor) to derive the URL scheme similarly to the Epson
branch (use window.location.protocol when available) or accept an explicit
scheme parameter in the constructor/options and use that to build the
StarWebPRNT URL passed to StarWebPrntAdapter, ensuring the host (s) and port (o)
logic remains unchanged and preserving existing behavior when port is 9100.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@build/_expo/static/js/web/network-adapter-300e404dc0027469f95ab174a2f92430.js`:
- Line 3: In StarWebPrntAdapter.printRaw the response handling only throws when
a <Status> tag exists and is not "Normal", so a 200 non-WebPRNT/malformed
response is treated as success; update the logic after reading response text
(variable c / const u) to treat a missing <Status> as an error (throw) and
include the response body (or status/text) in the error message for debugging,
i.e., if u is null OR u[1] !== 'Normal' then throw a descriptive Error
mentioning the parsed status or the raw response.

In
`@build/_expo/static/js/web/run-storage-migration-f05d8684c4a6f54aa51497bbc8719e4b.js`:
- Line 3: The migration currently tombstones (calls f.bulkWrite on the old
storage) regardless of whether the target write succeeded; in the
migrateCollection function (the async function o and its inner loop N) check the
result of o.storageInstance.bulkWrite(...) (the variable h assigned from that
call) for errors and abort/throw before constructing tombstone rows and calling
f.bulkWrite(...); specifically, validate that h.error is empty (or that
h.success indicates full success), log/propagate the error and return/throw so
the old-storage delete path (f.bulkWrite and subsequent cleanup) is not executed
on partial/failed target writes.

In
`@build/_expo/static/js/web/verify-migration-8b158f6ee6fa844a09031efae0961c1d.js`:
- Line 1: The deferred-cleanup guard currently compares S(M) (migratedAt)
against the module-scoped constant c (moduleLoadedAt), which is wrong for
lazy-loaded chunks; change verifyStorageMigration to accept a launch-scoped
marker (e.g., launchStartedAt or launchId) from the migration runner instead of
using c, replace references to c in the comparison (where S(M) is checked
against c) with that injected launch marker, and update the caller (the
migration runner / runStorageMigration) to pass the shared launch timestamp/ID
so deferred cleanup is consistently deferred to the next app launch.

In `@build/opfs.worker.js`:
- Line 1: The index maintenance currently finds rows by the encoded index value
only (see kn.appendWriteOperations using wn(this.rows,[u],Dn) and
kn.changeDocumentPosition/runChangelogOperation operating on this.rows), which
causes ambiguity for non-unique indexes; change the row representation to
include the primary key (or maintain a per-index metaIdMap from primaryKey->row
index) and use that to disambiguate lookups/updates: update
kn.getIndexableString/appendWriteOperations to store [indexableString,
primaryKey, meta1, meta2], update
kn.initRead/persistInMemoryRows/runChangelogOperation/changeDocumentPosition to
handle the new tuple shape and update metaIdMap usage, and ensure
serialization/deserialization (file read/write) and all binary-search helpers
(wn/mn/vn/etc. usage sites) compare on indexableString+primaryKey or consult
metaIdMap to find the exact row before replacing/deleting so non-unique values
cannot overwrite other documents.

---

Nitpick comments:
In
`@build/_expo/static/js/web/network-adapter-300e404dc0027469f95ab174a2f92430.js`:
- Line 1: The Star branch in NetworkAdapter.constructor hardcodes https for
StarWebPrntAdapter which can break printers only exposing http; update
NetworkAdapter (constructor) to derive the URL scheme similarly to the Epson
branch (use window.location.protocol when available) or accept an explicit
scheme parameter in the constructor/options and use that to build the
StarWebPRNT URL passed to StarWebPrntAdapter, ensuring the host (s) and port (o)
logic remains unchanged and preserving existing behavior when port is 9100.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: wcpos/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: be629341-459b-4bc8-839b-5f39887d5c4d

📥 Commits

Reviewing files that changed from the base of the PR and between 83b6d04 and 48c2c67.

⛔ Files ignored due to path filters (7)
  • build/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png is excluded by !**/node_modules/**, !**/*.png
  • build/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png is excluded by !**/node_modules/**, !**/*.png
  • build/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png is excluded by !**/node_modules/**, !**/*.png
  • build/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png is excluded by !**/node_modules/**, !**/*.png
  • build/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png is excluded by !**/node_modules/**, !**/*.png
  • build/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png is excluded by !**/node_modules/**, !**/*.png
  • build/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png is excluded by !**/node_modules/**, !**/*.png
📒 Files selected for processing (15)
  • build/_expo/static/css/global-68a8a3225c7216959703b116b3266f09.css
  • build/_expo/static/css/global-6e58b490378cf79363a0e49dc257ebf2.css
  • build/_expo/static/js/web/chart-9f67c2091c00e341c0ce22998297f418.js
  • build/_expo/static/js/web/entry-9de6c33a3b5446ee6241ab8139103522.js
  • build/_expo/static/js/web/epson-native-adapter-b4fa0da6d7d6a8538b0834408fc46bbd.js
  • build/_expo/static/js/web/index-345a124fb6802d68234ca030105e6ddd.js
  • build/_expo/static/js/web/index-6dc268e2df9d94a175c10c0bb4f93d53.js
  • build/_expo/static/js/web/network-adapter-300e404dc0027469f95ab174a2f92430.js
  • build/_expo/static/js/web/run-storage-migration-f05d8684c4a6f54aa51497bbc8719e4b.js
  • build/_expo/static/js/web/star-native-adapter-447f65051c90e466214dcaa379cb64cf.js
  • build/_expo/static/js/web/verify-migration-8b158f6ee6fa844a09031efae0961c1d.js
  • build/index.html
  • build/metadata.json
  • build/opfs.worker.js
  • package.json
💤 Files with no reviewable changes (1)
  • build/_expo/static/css/global-6e58b490378cf79363a0e49dc257ebf2.css

Comment thread build/_expo/static/js/web/network-adapter-300e404dc0027469f95ab174a2f92430.js Outdated
Comment thread build/_expo/static/js/web/verify-migration-8b158f6ee6fa844a09031efae0961c1d.js Outdated
Comment thread build/opfs.worker.js Outdated
@wcpos-bot wcpos-bot Bot force-pushed the release/1.9.0 branch from d56fa97 to e28e7af Compare May 15, 2026 08:59
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@build/opfs.worker.js`:
- Line 1: The remove() implementation in Yn.remove only truncates documents,
changelog and index files leaving changes.json, attachment files
(z-attachment-*) and the collection directory behind; update Yn.remove to (1)
await this.internals.statePromise and include internals.changesFileHandle and
each indexStates fileHandlePromise when collecting file handles, (2) for
attachments iterate the collection dirHandle entries and remove files whose name
startsWith "z-attachment-" (using dirHandle.removeEntry or the equivalent)
before truncating, and (3) once all file entries are removed, remove the
collection directory itself via dirHandle.removeEntry to fully delete the OPFS
store; use the existing sn(...) helper to open access handles and ensure the
broadcastChannel shutdown remains intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: wcpos/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a189cbbb-d489-4246-bf74-0efcde5f2665

📥 Commits

Reviewing files that changed from the base of the PR and between d56fa97 and e28e7af.

📒 Files selected for processing (6)
  • build/_expo/static/js/web/entry-9de6c33a3b5446ee6241ab8139103522.js
  • build/_expo/static/js/web/network-adapter-300e404dc0027469f95ab174a2f92430.js
  • build/_expo/static/js/web/run-storage-migration-f05d8684c4a6f54aa51497bbc8719e4b.js
  • build/_expo/static/js/web/verify-migration-8b158f6ee6fa844a09031efae0961c1d.js
  • build/index.html
  • build/opfs.worker.js
🚧 Files skipped from review as they are similar to previous changes (3)
  • build/index.html
  • build/_expo/static/js/web/verify-migration-8b158f6ee6fa844a09031efae0961c1d.js
  • build/_expo/static/js/web/run-storage-migration-f05d8684c4a6f54aa51497bbc8719e4b.js

Comment thread build/opfs.worker.js Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@build/_expo/static/js/web/network-adapter-300e404dc0027469f95ab174a2f92430.js`:
- Line 3: The recovery hint in StarWebPrntAdapter (class t) loses custom ports
by using new URL(this.url).hostname; update the catch block that throws the
connection Error to reference the full origin instead (e.g. new
URL(this.url).origin) so the hint preserves protocol and port (for example
https://printer:9443) and directs users to the exact endpoint to accept the
certificate.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: wcpos/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0f57b20c-6b3b-41a9-97f0-18ab38f48cf9

📥 Commits

Reviewing files that changed from the base of the PR and between d56fa97 and e28e7af.

📒 Files selected for processing (6)
  • build/_expo/static/js/web/entry-9de6c33a3b5446ee6241ab8139103522.js
  • build/_expo/static/js/web/network-adapter-300e404dc0027469f95ab174a2f92430.js
  • build/_expo/static/js/web/run-storage-migration-f05d8684c4a6f54aa51497bbc8719e4b.js
  • build/_expo/static/js/web/verify-migration-8b158f6ee6fa844a09031efae0961c1d.js
  • build/index.html
  • build/opfs.worker.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • build/index.html

Comment thread build/_expo/static/js/web/network-adapter-300e404dc0027469f95ab174a2f92430.js Outdated
@wcpos-bot
Copy link
Copy Markdown

wcpos-bot Bot commented May 15, 2026

Fix round 3 triage

Thread File Issue Decision Commit
PRRT_kwDOLDv0OM6CUHKo opfs.worker.js remove() truncated only a subset of OPFS files, leaving changes.json, attachment blobs, and the collection directory behind. Fixed and resolved f5cbb95
PRRT_kwDOLDv0OM6CUHKo opfs.worker.js Remote remove could run while multiple ports shared the same storage instance, splitting OPFS state for sibling connections. Fixed and resolved f5cbb95
PRRT_kwDOLDv0OM6CUKh0 network-adapter-300e404dc0027469f95ab174a2f92430.js Star WebPRNT certificate recovery hint used hostname, dropping custom ports from the endpoint users need to visit. Fixed and resolved f5cbb95

Skipped threads

Thread Reason for skipping
None No excluded actionable threads in this round.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant