Skip to content

[codex] Extract export runtime wiring#1044

Merged
elkimek merged 7 commits into
mainfrom
codex/extract-export-runtime-wiring
Jul 5, 2026
Merged

[codex] Extract export runtime wiring#1044
elkimek merged 7 commits into
mainfrom
codex/extract-export-runtime-wiring

Conversation

@elkimek

@elkimek elkimek commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add js/export-runtime.js for export/import browser runtime adapters, including wallet globals, demo-loading sentinel, import shell refresh, and global publishing.
  • Update js/export.js to delegate runtime wiring instead of calling browser globals directly.
  • Precache and typecheck the new module, bump version.js, and update source assertions for the new ownership boundary.

Validation

  • npm run typecheck
  • npm run typecheck:checkjs
  • npm run quality
  • node tests/test-crypto.js
  • node tests/test-cashu-wallet.js
  • npm test
  • npx playwright test tests/playwright/report-export-browser-coverage.spec.js
  • npx playwright test tests/playwright/core-browser-flows.spec.js
  • ./run-tests.sh

Notes

  • Reduces js/ window global references from 669 to 636.
  • Stabilizes the UI flows sidebar-search fixture by aligning its static category list with nav.js.

@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
get-based Error Error Jul 5, 2026 10:06am

@greptile-apps

greptile-apps Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR moves export/import runtime wiring into a dedicated browser adapter. The main changes are:

  • Added js/export-runtime.js for wallet, demo-loading, shell refresh, and global publishing helpers.
  • Updated js/export.js to delegate browser runtime calls through the new module.
  • Added the new module to service-worker precache and type-check configs.
  • Updated tests and source assertions for the new ownership boundary.

Confidence Score: 5/5

This looks safe to merge.

No blocking issues found in the changed code.

No files need attention.

T-Rex T-Rex Logs

What T-Rex did

  • Validated the import-runtime contract by running the shared harness on base and head, with before and after artifacts showing exit code 0.
  • Validated wallet runtime by comparing before and after artifacts; both runs show the same post-clear DOM refresh string, indicating consistent behavior after wallet clear.
  • Produced a P1 finding proof for a posted finding; a corresponding review comment exists.
  • Captured and analyzed the sidebar search behavior before and after head, confirming Import & Sync and Data & Integrations sections were not present in both states; logs show initial conditions false for those categories.
  • Validated module boundary: base run shows no export-runtime; head run includes precache/typecheck and all export globals published; no contract mismatch observed.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
js/export-runtime.js Adds the extracted runtime adapter for export/import browser wiring.
js/export.js Delegates wallet, demo-loading, shell refresh, and global publishing behavior to the runtime adapter.
service-worker.js Precaches the new runtime adapter with the app shell.

Comments Outside Diff (1)

  1. General comment

    P1 Sidebar-search fixture does not cover the claimed Import & Sync category

    • Bug
      • The validation claim says the sidebar/search surface should still render expected category navigation including the category label changed from Data & Integrations to Import & Sync, and sidebar search should find/navigate that category. In the real head UI, the sidebar generated by js/nav.js does not render Import & Sync or Data & Integrations at all. Searching import leaves only the static nav items visible and does not expose a matching category. The actual diff only adds biology-scores and context to the test/static allow-list and biology-scores to filterSidebar; it does not add or align any Import & Sync category.
    • Cause
      • js/nav.js has no nav item or static filter entry for an Import & Sync/Data & Integrations category, and tests/test-ui-flows.js was aligned around different static categories (biology-scores, context) rather than the claimed renamed category.
    • Fix
      • Either update the PR/test claim to match the actual nav contract being stabilized, or add the real Import & Sync sidebar item in js/nav.js and include its category key in both filterSidebar()'s static-category list and tests/test-ui-flows.js's staticNavCategories set. Then add a UI-flow assertion that searches for the visible Import & Sync label and activates/navigates it.

    T-Rex Ran code and verified through T-Rex

Reviews (7): Last reviewed commit: "Refresh chat shell after clearing data" | Re-trigger Greptile

Comment thread js/export-runtime.js Outdated
Comment thread js/export-runtime.js Outdated
Comment thread js/export-runtime.js
Comment thread js/export-runtime.js
Comment thread js/export.js Outdated
@elkimek elkimek merged commit 9f1a03e into main Jul 5, 2026
5 of 6 checks passed
@elkimek elkimek deleted the codex/extract-export-runtime-wiring branch July 5, 2026 10:14
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