Skip to content

perf: narrow shared imports and defer optional SDKs - #197

Open
dt2patel wants to merge 9 commits into
mainfrom
codex/lazy-optional-sdks
Open

dt2patel wants to merge 9 commits into
mainfrom
codex/lazy-optional-sdks

Conversation

@dt2patel

@dt2patel dt2patel commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Importing the shared commonUtil object loads CSV, Japanese encoding and cron libraries even when an app only needs authentication or display helpers. Split these utilities into focused modules, migrate shared consumers and Shopify auth screens to named imports, and retain the legacy exports for existing apps. The extraction preserves all 63 utility declarations and 57 legacy API keys.

Defer Firebase messaging, the API cache adapter, federation and image-preview code until used. Start Shopify login at view-will-enter without the redundant blocking overlay, read POS context/token concurrently, and recheck queued automatic sync work so a slow successful refresh is not immediately repeated. Manual refresh, failure retry and facility isolation remain covered by regression cases. Import guidance is in docs/ACCXUI_IMPORTS.md.

CI also needed two existing integration mismatches corrected: check out hotwax/inventory-count as apps/cycle-count, matching its package and lockfile entry, and align Order Manager's Dexie lock entry with its already-declared catalog version. No app manifest or installed local dependency was changed; frozen-lockfile validation remains enabled.

Validation at 69dc97e:

  • All ten app builds passed, including Inventory Count and Order Manager. A pnpm 9.15.9 frozen-lockfile check also passed against all ten current app manifests.
  • Shared suite: 314 passed / six existing failures. An independent run of current main c91b85d produced 297 passed / the same six failures. The failures concern localhost URL handling, invalid-version comparison, product-feature normalization and a Solr query assertion. All 17 added cases pass. Command: pnpm exec vitest run --config vitest.common.config.ts.
  • Both Receiving split candidates passed their 80-test suites after the final settings-failure fix and independent localhost production builds. Earlier live Demo tests covered tracking/Enter navigation, selected-box Scan all, identifiers, under/over discrepancy review, completed detail, history and login/logout in development. One actual receipt per candidate was confirmed through OMS and reload: received quantity 2 → 4, QOH 101 → 103.

Combined Receiving/AccxUI measurements remain in startup measurements and performance audit: initial JavaScript 2.82 MB → 1.70 MB, and prior compiled iPad iframe-to-interactive warm median 2.149 → 1.877 seconds. These gains are from the paired changes, not this shared PR alone. The CI-only follow-up does not change tested runtime source.

Receiving #746 is independent and can merge without this PR. Receiving #745 requires this PR's focused modules; merge this before that follow-up, then rerun Receiving CI. Aditya is handling approvals. No merge or deployment has been performed.

Residual coverage: physical POS was not rerun during the split; earlier device evidence is in the linked audit. Native scanner capture, notification delivery and federation are not fully validated across apps. Existing logout response parsing and Ionic segment console errors remain; compiled localhost logout also has the existing production cookie-domain limitation. These are documented limits, not green end-to-end claims.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@dt2patel dt2patel changed the title perf: defer optional shared SDKs until use perf: narrow shared imports and defer optional SDKs Oct 2, 2026
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