Skip to content

refactor: consume shared packages via sparse global-packages submodule - #454

Open
rezaelahidev wants to merge 217 commits into
masterfrom
refactor/consume-global-packages
Open

refactor: consume shared packages via sparse global-packages submodule#454
rezaelahidev wants to merge 217 commits into
masterfrom
refactor/consume-global-packages

Conversation

@rezaelahidev

@rezaelahidev rezaelahidev commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Move shared packages out of this repo into blockeraai/blockera-global-packages and consume them through a sparse git submodule at packages/global-packages (only the remote packages/ tree is checked out).
  • Retarget Composer path repos, npm file: deps, webpack, zip build, Cypress/Playwright/PHPUnit, and related tooling to packages/global-packages/packages/* (no sibling clone or symlinks).
  • Init the private submodule in CI via ensure-global-packages-sparse.sh + BLOCKERABOT_PAT (full git submodule update --init, not actions/checkout submodules: — shallow SHA fetches fail for non-default-branch pins).
  • Auto-sync the submodule pin: global-packages notifies consumers on push; this repo’s sync-global-packages-submodule workflow opens a bump PR on master or pushes onto a matching feature branch. Local helpers: Husky branch mirroring + npm run submodule:bump.
  • Keep production bootstrap clean: autoloader-coordinator lives in the submodule for dev; zip build copies it into inc/ and keeps require-dev packages out of the production autoload.

Test plan

  • Fresh clone: git submodule update --init packages/global-packages then bash .github/scripts/ensure-global-packages-sparse.sh; composer install + npm ci succeed
  • Local: npm start / editor load without missing shared-package path errors
  • Local: npm run submodule:bump (and optional branch/SHA arg) updates the gitlink cleanly
  • CI: lint, Jest, PHPUnit, Cypress, Playwright all pass with submodule init (no clone/symlink actions)
  • Production zip: blockera.zip still bootstraps; coordinator present under inc/; no require-dev packages in production vendor autoload
  • After merge to default branch: push to blockera-global-packages triggers consumer sync (master → bump PR; matching feature branch → direct pin push)

Notes

  • repository_dispatch only runs workflows that already exist on the default branch — merge this PR (or at least the sync workflow) before expecting automatic bumps.
  • Cursor / docs: local core trees live under source-codes/; shared-package workflow is documented in .github/CONTRIBUTING.md.

@rezaelahidev rezaelahidev self-assigned this Aug 9, 2026
@rezaelahidev rezaelahidev added this to the Blockera 2.0 milestone Aug 9, 2026
@rezaelahidev rezaelahidev added Enhancement New feature or request Help Wanted Extra attention is needed labels Aug 9, 2026
Point npm file: deps and Composer path repos at ../packages so CI can use
/home/runner/work/blockera/packages.
Checkout into .blockera-global-packages, symlink ../packages for consumer
deps, and update linker plus related workflow/path references.
@blockerabot

blockerabot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Block Editor Performance Report (PR vs Core)

Compare Blockera vs Core (plugin off) using Chromium tracing metrics adapted from the Gutenberg post-editor performance suite.

Only scenarios without requiresBlockera (or requiresBlockera: false) are gated in this report.

Numbers are median interaction durations in milliseconds (lower is faster).

All gated numbers are median values over 1 repetition(s) with 10 sample(s) each.

Scenario Metric Core Blockera (PR) Diff ms Diff % Threshold Status
Select blocks focus 81.14ms 679.46ms +598.32 +737.37% 1000% ✅ pass
  • Theme: Twenty Twenty-Five · Locale: en_US · samples: 10 (+1 throwaway) per Gutenberg pattern
  • Gate: fail if |Diff %| exceeds per-scenario thresholdPercent (either direction)
  • Diff is Blockera (PR) − Core (positive means PR is slower)
Full metrics (median / STD / MAD)

Select blocks

Metric Core Blockera Diff abs. Diff % STD MAD
focus 81.14 ms 679.46 ms 598.32 ms 737.37 % 49.31 ms 22.24 ms

Default threshold: 20% (from editor-scenarios.json).

@blockerabot

blockerabot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

📈 Performance Report

Compare Blockera vs Core (plugin off) using the WordPress Playwright Server-Timing harness.

Numbers in the table are how long WordPress takes on the server to fully process each page (median, in milliseconds). Lower is faster.

All gated numbers are median values over 2 repetition(s) with 20 iteration(s) each.

Scenario Core Blockera Diff ms Diff % Threshold Status
Home page 394.94ms 469.53ms +74.59 +18.89% 25% ✅ pass
Blocks: Large page 1 393.71ms 468.64ms +74.93 +19.03% 25% ✅ pass
Admin: Dashboard 441.42ms 492.71ms +51.29 +11.62% 20% ✅ pass
Admin: Posts list 446.81ms 499.76ms +52.95 +11.85% 20% ✅ pass
Admin: Media library 440.11ms 491.58ms +51.47 +11.69% 20% ✅ pass
Admin: Block editor (Large page 1) 545.6ms 616.09ms +70.5 +12.92% 25% ✅ pass
Admin: Blockera dashboard 486.14ms 20% ⏭️ skip
  • Theme: Twenty Twenty-Five · Locale: en_US · TEST_RUNS default from harness
  • Gate: fail if |Diff %| exceeds per-scenario thresholdPercent (either direction)
  • Diff is Blockera − Core (positive means Blockera is slower)

Skipped

  • Admin: Blockera dashboard: Informational only (requires Blockera); gate not applied
Full metrics (median / STD / MAD)

Home page

Metric Core Blockera Diff abs. Diff % STD MAD
timeToFirstByte 407.35 ms 482.35 ms 75.00 ms 18.41 % 13.76 ms 8.45 ms
wpBeforeTemplate 366.96 ms 437.80 ms 70.84 ms 19.30 % 12.15 ms 8.22 ms
wpTemplate 27.84 ms 31.56 ms 3.72 ms 13.38 % 2.14 ms 1.69 ms
wpTotal 394.94 ms 469.52 ms 74.59 ms 18.89 % 13.54 ms 8.36 ms
wpMemoryUsage 7.90 MB 10.71 MB 2.81 MB 35.57 % 0.08 MB 0.00 MB
wpDbQueries 25 36 11 44.00 % 3.3907963666371965 0.5
wpExtObjCache no no no no
largestContentfulPaint 460.00 ms 532.00 ms 72.00 ms 15.65 % 15.15 ms 8.00 ms
lcpMinusTtfb 50.85 ms 48.45 ms -2.40 ms -4.72 % 2.41 ms 1.75 ms

Blocks: Large page 1

Metric Core Blockera Diff abs. Diff % STD MAD
timeToFirstByte 406.15 ms 481.40 ms 75.25 ms 18.53 % 15.23 ms 13.50 ms
wpBeforeTemplate 362.88 ms 429.62 ms 66.73 ms 18.39 % 12.73 ms 10.40 ms
wpTemplate 30.94 ms 38.49 ms 7.55 ms 24.42 % 2.97 ms 2.64 ms
wpTotal 393.71 ms 468.64 ms 74.93 ms 19.03 % 15.05 ms 13.28 ms
wpMemoryUsage 7.96 MB 10.75 MB 2.79 MB 35.06 % 0.00 MB 0.00 MB
wpDbQueries 21 32.5 11.5 54.76 % 0.5 0.5
wpExtObjCache no no no no
largestContentfulPaint 464.00 ms 536.00 ms 72.00 ms 15.52 % 17.60 ms 12.00 ms
lcpMinusTtfb 58.50 ms 58.70 ms 0.20 ms 0.34 % 6.73 ms 2.70 ms

Admin: Dashboard

Metric Core Blockera Diff abs. Diff % STD MAD
timeToFirstByte 455.65 ms 506.70 ms 51.05 ms 11.20 % 59.71 ms 7.90 ms
wpTotal 441.42 ms 492.71 ms 51.29 ms 11.62 % 58.68 ms 7.42 ms
wpMemoryUsage 8.01 MB 8.88 MB 0.87 MB 10.85 % 8.44 MB 0.00 MB
wpDbQueries 40 46 6 15.00 % 0 0
wpExtObjCache no no no no

Admin: Posts list

Metric Core Blockera Diff abs. Diff % STD MAD
timeToFirstByte 460.80 ms 513.70 ms 52.90 ms 11.48 % 5.83 ms 3.40 ms
wpTotal 446.81 ms 499.76 ms 52.95 ms 11.85 % 5.73 ms 3.31 ms
wpMemoryUsage 8.01 MB 9.63 MB 1.62 MB 20.21 % 0.00 MB 0.00 MB
wpDbQueries 40 47.5 7.5 18.75 % 0.5 0.5
wpExtObjCache no no no no

Admin: Media library

Metric Core Blockera Diff abs. Diff % STD MAD
timeToFirstByte 455.15 ms 506.85 ms 51.70 ms 11.36 % 17.90 ms 5.35 ms
wpTotal 440.11 ms 491.58 ms 51.47 ms 11.69 % 17.89 ms 5.30 ms
wpMemoryUsage 7.96 MB 8.84 MB 0.88 MB 11.11 % 0.00 MB 0.00 MB
wpDbQueries 23 29 6 26.09 % 0 0
wpExtObjCache no no no no

Admin: Block editor (Large page 1)

Metric Core Blockera Diff abs. Diff % STD MAD
timeToFirstByte 565.16 ms 635.78 ms 70.62 ms 12.50 % 20.43 ms 9.44 ms
wpTotal 545.60 ms 616.09 ms 70.50 ms 12.92 % 20.31 ms 9.32 ms
wpMemoryUsage 11.20 MB 15.91 MB 4.71 MB 42.03 % 0.00 MB 0.00 MB
wpDbQueries 47 64 17 36.17 % 3.207802986469089 0
wpExtObjCache no no no no

Admin: Blockera dashboard

Metric Core Blockera Diff abs. Diff % STD MAD
timeToFirstByte N/A 499.30 ms 8.41 ms 5.10 ms
wpTotal N/A 486.14 ms 8.11 ms 5.18 ms
wpMemoryUsage N/A 8.73 MB 0.00 MB 0.00 MB
wpDbQueries N/A 28 0 0
wpExtObjCache N/A no no no
Scenario URLs

Default threshold: 25% (from scenarios.json).

@blockerabot

blockerabot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Block Editor Performance Report (PR vs Master)

Compare Blockera on this PR vs Blockera on master using Chromium tracing metrics adapted from the Gutenberg post-editor performance suite.

Only scenarios with requiresBlockera: true are gated in this report.

Numbers are median interaction durations in milliseconds (lower is faster).

All gated numbers are median values over 1 repetition(s) with 10 sample(s) each.

Scenario Metric Master Blockera (PR) Diff ms Diff % Threshold Status
Workspace tabs switchTab 171.2ms 181.66ms +10.46 +6.11% 20% ✅ pass
Block bg color blockBgColor 117.78ms 126.63ms +8.85 +7.51% 20% ✅ pass
Block bg image blockBgImage 319.95ms 323.12ms +3.17 +0.99% 20% ✅ pass
GS variation bg color gsVariationBgColor 123.99ms 135.72ms +11.72 +9.45% 20% ✅ pass
GS variation bg image gsVariationBgImage 107.56ms 119.15ms +11.59 +10.78% 20% ✅ pass
GS variation duplicate gsVariationDuplicate 115.88ms 119.94ms +4.07 +3.51% 20% ✅ pass
GS default bg color gsDefaultBgColor 121.09ms 129.39ms +8.31 +6.86% 20% ✅ pass
GS default bg color variable gsDefaultBgColorVariable 304.76ms 321.86ms +17.1 +5.61% 20% ✅ pass
GS seed border preset gsSeedBorderPreset 1143.38ms 1134.98ms -8.4 -0.73% 20% ✅ pass
  • Theme: Twenty Twenty-Five · Locale: en_US · samples: 10 (+1 throwaway) per Gutenberg pattern
  • Gate: fail if |Diff %| exceeds per-scenario thresholdPercent (either direction)
  • Diff is Blockera (PR) − Master (positive means PR is slower)
Full metrics (median / STD / MAD)

Workspace tabs

Metric Master Blockera Diff abs. Diff % STD MAD
switchTab 171.20 ms 181.66 ms 10.46 ms 6.11 % 19.69 ms 13.30 ms

Block bg color

Metric Master Blockera Diff abs. Diff % STD MAD
blockBgColor 117.78 ms 126.63 ms 8.85 ms 7.51 % 5.48 ms 3.67 ms

Block bg image

Metric Master Blockera Diff abs. Diff % STD MAD
blockBgImage 319.95 ms 323.12 ms 3.17 ms 0.99 % 8.45 ms 4.97 ms

GS variation bg color

Metric Master Blockera Diff abs. Diff % STD MAD
gsVariationBgColor 123.99 ms 135.72 ms 11.72 ms 9.45 % 4.19 ms 3.88 ms

GS variation bg image

Metric Master Blockera Diff abs. Diff % STD MAD
gsVariationBgImage 107.56 ms 119.15 ms 11.59 ms 10.78 % 11.75 ms 6.37 ms

GS variation duplicate

Metric Master Blockera Diff abs. Diff % STD MAD
gsVariationDuplicate 115.88 ms 119.94 ms 4.07 ms 3.51 % 5.63 ms 2.31 ms

GS default bg color

Metric Master Blockera Diff abs. Diff % STD MAD
gsDefaultBgColor 121.09 ms 129.39 ms 8.31 ms 6.86 % 6.90 ms 5.50 ms

GS default bg color variable

Metric Master Blockera Diff abs. Diff % STD MAD
gsDefaultBgColorVariable 304.76 ms 321.86 ms 17.10 ms 5.61 % 23.21 ms 25.48 ms

GS seed border preset

Metric Master Blockera Diff abs. Diff % STD MAD
gsSeedBorderPreset 1143.38 ms 1134.98 ms -8.40 ms -0.73 % 54.35 ms 21.84 ms

Default threshold: 20% (from editor-scenarios.json).

Resolve env/app PHP from vendor or ../packages, restore via backups
instead of git checkout, and keep git clean from removing package links.
@blockerabot

blockerabot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

🔗 PR Playground Demo

Branch Links

aliaghdam and others added 30 commits August 20, 2026 02:47
…obal-packages@8bc9b8f...4af613c

- test(width): cover core/button WP 7.1 width compatibility
- compat(core/button): map width through WP 7.1 dimensions
- feat(blocks monitoring): update dictionary
- test(inner blocks): updates inner blocks count
- test(variation switch): fix test to cover WP 7.1 change
- ...and 22 more commits
Match the README badge suffix to the catalog total of 115 WordPress blocks.
…bal-packages@4af613c...e348e4a

- feat(post featured image bock): update selector for aspect ratioo
- feat(accordion block): sync editor vs front end design
- test(inspector): cover inner-block styles in pattern edit
- fix(inspector): keep inner-block extensions visible in pattern edit
- test: change category
- ...and 3 more commits
…bal-packages@f82f5bb...0ba9552

- test: cover Cypress PR spec category mapping
- fix: resolve Cypress PR specs from listed files
- ci: skip Cypress pre-test when PR spec filter is set
- ci: detect all leftover PR-only config file types
- chore: improve default values
- ...and 1 more commits
…bal-packages@0ba9552...4a754ca

- feat: remove `development.json` from the gitignore
- refactor(autoloader-coordinator): require options array in bootstrap helper
…bal-packages@4a754ca...9c6872c

- Merge branch 'fix/issues' of github.com:blockeraai/blockera-global-packages into fix/issues
- test: cover heading right-slot watching marker and clock
- feat: watch bootstrap templates during npm start
- chore: remove the old package-root EditorConfig copy
- chore: keep EditorConfig with the other root-config templates
- ...and 1 more commits
…aai/blockera into refactor/consume-global-packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request Help Wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants