Skip to content

Monorepo - #531

Open
sloorush wants to merge 913 commits into
mainfrom
monorepo
Open

Monorepo#531
sloorush wants to merge 913 commits into
mainfrom
monorepo

Conversation

@sloorush

@sloorush sloorush commented Sep 1, 2026

Copy link
Copy Markdown
Member

First step towards merging ewc and ewc-client into one repository (#428). Moves the React package into client/ and turns the repo root into a yarn workspace root, so the tree is ready to receive the APL server at the root in a follow-up merge.

Layout:
client/ the React package (src, public, assets, index.html, version.json,
vite.config.js, eslint.config.js, package.json)
root e2e/ and playwright.config.ts stay put, alongside a new workspace
package.json that carries the command surface

client/dist is the build output at exactly the path EWC/Init.aplf already resolves as its final fallback (FOLDER,'client/dist/'), so no server-side discovery change is needed. It is no longer tracked: dist has accounted for ~98% of this repo's history by volume, and it will be shipped as a release asset instead.

Dependencies split by what needs them: @playwright/test, typescript and @types/node move to the root (they exist only to run and type-check playwright.config.ts); the React stack stays in client/. One yarn install at the root covers both, so no command needs cd client.

e2e/ and playwright.config.ts deliberately do not move. They keep their relative positions, so testDir and snapshotDir resolve unchanged and the visual baselines stay valid without regeneration.

.gitattributes adopts APL line-ending rules scoped to APL paths rather than ewc's repo-wide * text=auto eol=lf, which would renormalise the 52 JS files committed with CRLF.

Related Issue(s)

PR Checklist (Remove options that are not relevant)

  • This PR has been tested against applications
  • Demo added
  • Tests updated
  • Documentation complete (decision docs, code comments, etc.)

mkromberg and others added 30 commits January 5, 2025 09:23
Defaults for the upload class
sloorush and others added 18 commits July 6, 2026 14:29
EWC server side for AutoConf and Attach

Also adds support for an EWCLOGFILE environment variable to set EWC.LOGFILE and redirect logs to a file instead of the session.
Timeout wasn't firing in testing, so minor changes were made, and
it is also now more defensive with the :Trap (we suspected there
was an issue here, so made it an error log instead)
* add flappy bird demo

* game of life, bounce and ticker demos

* Pin the bird sprite with Attach
First step towards merging ewc and ewc-client into one repository (#428).
Moves the React package into client/ and turns the repo root into a yarn
workspace root, so the tree is ready to receive the APL server at the root
in a follow-up merge.

Layout:
  client/   the React package (src, public, assets, index.html, version.json,
            vite.config.js, eslint.config.js, package.json)
  root      e2e/ and playwright.config.ts stay put, alongside a new workspace
            package.json that carries the command surface

client/dist is the build output at exactly the path EWC/Init.aplf already
resolves as its final fallback (FOLDER,'client/dist/'), so no server-side
discovery change is needed. It is no longer tracked: dist has accounted for
~98% of this repo's history by volume, and it will be shipped as a release
asset instead.

Dependencies split by what needs them: @playwright/test, typescript and
@types/node move to the root (they exist only to run and type-check
playwright.config.ts); the React stack stays in client/. One `yarn install`
at the root covers both, so no command needs `cd client`.

e2e/ and playwright.config.ts deliberately do not move. They keep their
relative positions, so testDir and snapshotDir resolve unchanged and the
visual baselines stay valid without regeneration.

.gitattributes adopts APL line-ending rules scoped to APL paths rather than
ewc's repo-wide `* text=auto eol=lf`, which would renormalise the 52 JS files
committed with CRLF.
Second step towards a single EWC repository (#428). Brings the full history
of Dyalog/ewc in at the root, so the APL server, the demos, the User Guide and
the React client now live and version together.

  EWC/  demo/  tests/  docs/  mkdocs.yml  RELEASES.md   the APL server
  client/                                                the React frontend
  e2e/                                                   Playwright, drives both

Merged with --allow-unrelated-histories; both histories are preserved intact.
Conflicts were limited to five root files:

  .gitattributes  kept the APL-scoped rules rather than ewc's repo-wide
                  `* text=auto eol=lf`, which would have renormalised the 52
                  JavaScript files committed with CRLF
  .gitignore      union of both sides, plus the APL entries
  LICENSE         took ewc's copy (identical MIT text, without the indent)
  README.md       rewritten for one repository: the release asset is now the
                  runnable download, and a repository-layout table replaces
                  the "related repositories" section
  CONTRIBUTING.md fused into one guide covering both halves, with the
                  cross-repo PR-pairing guidance removed

`.github/` and `ci/` merged cleanly by union — neither shared a filename.

Note: ewc's v0.5.0 tag could not be fetched because this repository already
has a different v0.5.0. That collision needs resolving before any rename.
Third and final local step of the ewc/ewc-client merge (#428). Removes the
cross-repo scaffolding, which has no reason to exist now that both halves
build from one checkout, and fixes what the merge actually broke.

CI

  Deleted .github/actions/checkout-ewc-server/. Its whole job was guessing
  which Dyalog/ewc branch a PR should build against, including the EWC-REF:
  PR-body convention. A PR now carries both halves by construction.

  Deleted .github/workflows/build-and-commit.yml. client/dist is no longer
  committed; the Release workflow builds it instead.

  tests.yml and update-baselines.yml lose the ewc checkout, and the Docker
  invocation drops from three mounts to one -- the server, the demos, the ci
  scripts and the freshly built client/dist are all under the same root.

  release.yml builds the client in-tree rather than cloning ewc-client, and
  publishes ewc-vX.Y.Z.zip: a runnable tree of the APL server plus the built
  client. GitHub's auto-generated "Source code" archive is a git archive and
  so has no client/dist, which makes the named asset the only download that
  actually runs.

Source

  EWC/Init.aplf drops the sibling ewc-client/ and jswc-client/ lookups. With
  the client in this repo, a leftover sibling checkout would silently shadow
  our own build. The not-found error now says what to do, because with dist
  uncommitted that error is what a fresh clone hits.

  Four unit specs under e2e/ imported ../../../../src/...; e2e/ did not move
  but what it imports did, so they now point at client/src.

Docs

  Installation and the READMEs now describe one repository: the release asset
  is the runnable download, and development is clone + yarn build.

  All of them also stop teaching `]link.create # /path/to/ewc`. Linking the
  root walks client/node_modules, where npm names collide as APL names
  (acorn-jsx with acorn, eslint-scope with eslint) and abort the whole link,
  so `#.tests` was never even created. Linking EWC/ and demo/ by name is what
  ci/setup-ewc.apl already did, and EWC.FOLDER still resolves correctly
  because Init derives it from Init.aplf's own path.

Verified: 455 e2e tests pass against the merged tree, the demo container
serves the in-tree build, and tests.test_proxySpace passes.
(tests.test_normaliseEvents fails on LOGMODES, identically on pristine ewc --
it needs EWC.Init to have run first. Pre-existing, untouched.)
@sloorush sloorush changed the title Restructure the client into a yarn workspace under client/ Monorepo Sep 1, 2026
Plugin mechanism. This allows a user of EWC to, at runtime, add arbitrary new components to EWC.

The plugins can add: classes on the EWC side, static resources to serve, and JS to inject for adding the components on the client side.
@sloorush
sloorush marked this pull request as ready for review September 7, 2026 07:46
cursork and others added 2 commits September 8, 2026 13:26
* Add CBits, case insensitivity for coord Pixel, more careful logging
* Fix ∆DQ '.' token depth so eDQ'.' (DQ all objects) works
* Add Trackbar and ColorButton widget classes
We have more to come. These are contained little apps that have
an associated automated test in ewc-client. Start app, launch tests
against it.

This differs from demos in one way: we can test the full lifecycle.
We don't have good demo tests for something like Multi mode,
because it all gets a bit tricky.
Brings the six commits that landed upstream since the branch was cut:
Plugins (#524), Mandelbrot + Arachnid (#518), Extensive tests for Multi
(#520), the Rect and pictures test fixes, and visual baselines run #31.

Git mapped the moved tree automatically: edits to src/ landed in client/src/,
and the eight new components (ColorButton, FloatingForm, BitmapCanvas,
Locator, MenuBarItem, Static, TrackBar, pluginHost) were placed there too.

Resolutions:

  package.json    upstream's 14 new multitests:*/ewc-multi:* scripts go on
                  the workspace root, next to the demotests:* ones -- they
                  drive Playwright and ci/, both of which live at the root
  ci/run-server.sh kept upstream's SETUP_APL indirection, defaulting to the
                  in-tree /work/ewc/ci/setup-ewc.apl rather than /scripts
  dist/           dropped. Upstream still commits it; this branch does not.
                  Git guessed the new bundles belonged in client/public/
                  (the fonts are identical in both trees) -- they are build
                  output and stay untracked.

ci/ewc-multi-start.sh and ci/setup-ewc-multi.apl were adapted to the single
mount, matching ewc-demo-start.sh.

Note: the Multi suite cannot pass yet. It drives test-apps/multitest, which
is still on ewc's unmerged multimode-tests branch with no open PR -- client
tests landed without their APL counterpart, which is precisely the split this
merge exists to end.
Brings the two commits that landed upstream since the branch was cut:
Plugins (#141) and [WIP] Trackbar, ColorButton, CBits for images (#135) --
the APL counterparts to the ewc-client PRs merged in the previous commit.

No conflicts. EWC/Init.aplf auto-merged: upstream added ensurePlugins and
applyPluginResources around the client-discovery block this branch had
already rewritten, and the two changes did not overlap.

Verified on the fully synced tree: 467 passed, 1 skipped, 23 failed -- every
failure a visual regression, which is expected when running macOS against
Linux-generated baselines. Zero functional failures. That is 12 more tests
than before the sync, all of them from the new specs, and all passing:
plugin-registry (8), ribbon-tabpage (3), expunge-overlap (1).

Still outstanding, not introduced here:
  - the Multi suite drives test-apps/multitest, which remains on ewc's
    unmerged multimode-tests branch
  - upstream added package-lock.json; this repo builds with yarn workspaces,
    so an npm lockfile alongside yarn.lock is worth removing separately
Brings test-apps/multitest (10 files) from ewc's multimode-tests branch.
Purely additive, no conflicts.

This closes a cross-repo gap rather than adding a feature. "Extensive tests
for Multi" merged to ewc-client main, but the APL those tests drive never
landed on ewc main and had no open PR, so `yarn multitests` could not pass on
any fresh checkout. With both halves in one tree it does: 12 passed.

Also in this commit:

  package-lock.json       removed. It arrived from ewc-client main, but this
                          repo builds with yarn workspaces -- an npm lockfile
                          beside yarn.lock invites the two to disagree.
  ci/ewc-multi-start.sh   its dist check still looked for a root dist/ and
                          only warned. Now checks client/dist and fails hard,
                          matching ewc-demo-start.sh -- with dist uncommitted
                          a missing build is fatal, not a fall-back.

Verified: Multi suite 12/12 passing; demo suite unchanged at 467 passed,
1 skipped, 23 failed -- all 23 visual regressions from running macOS against
Linux baselines, zero functional failures.
The Multi job failed on the monorepo PR with:

  Can't find 'action.yml' ... under '.github/actions/checkout-ewc-server'

e2e-multi arrived with the ewc-client merge, carrying its own copy of the
cross-repo scaffolding that this branch had already deleted from the e2e job.
Merging the workflow succeeded textually while leaving the new job pointing at
an action that no longer exists.

Applies the same treatment the e2e job got:

  - drops the Checkout Dyalog/ewc step and the composite action it used
  - drops the "does the resolved ewc ref carry test-apps/multitest" guard.
    It existed because the app lived in the other repo and could be missing
    at whatever ref got resolved; it is in this tree now, so the check can
    only ever pass
  - collapses the three docker mounts to one, and points SETUP_APL and the
    entrypoint at the in-tree ci/ scripts
  - aligns the job gate with e2e (the github-actions[bot] skip went with
    build-and-commit.yml; leaving it here would have made e2e-multi skip on
    bot-authored baseline PRs while e2e ran)

Verified with the workflow's exact mount shape: 12 passed. actionlint clean,
and no cross-repo references remain in any workflow.
@sloorush

Copy link
Copy Markdown
Member Author
  • Move demo into test apps
  • check docs build

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.

[Needs intense discussion and low priority] Monorepo for ewc and ewc-client

4 participants