Skip to content

Upgrade @mieweb/ui to 0.7.1 and Prune Unused Editor Dependencies - #475

Open
Dharp02 wants to merge 3 commits into
mainfrom
chore/mieweb-ui-0.7.1
Open

Upgrade @mieweb/ui to 0.7.1 and Prune Unused Editor Dependencies#475
Dharp02 wants to merge 3 commits into
mainfrom
chore/mieweb-ui-0.7.1

Conversation

@Dharp02

@Dharp02 Dharp02 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Overview

mieweb/ui#344 (Yjs collaborative editing + editor teardown crash fix) merged upstream as ec4bbe0, but the build this app actually consumes still predated it. The app-side collab wiring was already written and merged — it just had nothing real to call.

The gap

@mieweb/ui resolves from file:vendor/mieweb-ui.tgz, a committed pre-built tarball. That tarball was a Jul 28 pack with no collab code in it at all. Separately, the vendor/ui submodule pointer sat on e159b7b — an intermediate commit from the middle of PR #344, not the merge.

So <MarkdownEditor collab={…}> was handing a prop to a component that had no idea what collab meant. Silent no-op.

Changes

  1. Advance the vendor/ui submodule to origin/main (a5887a2). Also brings in ui#350 CollabStatus, In the messaging feature, you cannot edit a channel after it is created (rename or edit permissions) #351, Consistent Rounding Needed in Timesheet Display #354, Problems Assigning Tickets #343, There is no way to tell when the most recent activity/work is logged against a ticket. This makes it hard to look at the tickets page and get a quick status update. #342, Feature:testing feature in dev #312 and the v0.7.0 / v0.7.1 releases.
  2. Rebuild and repack vendor/mieweb-ui.tgz, 0.6.1 → 0.7.1. Built with pnpm — vendor/ui sets "packageManager": "pnpm@10.29.1" and declares patchedDependencies, both of which npm ignores.
  3. Re-resolve the dependency so package-lock.json picks up the new integrity hash. Plain npm install kept restoring the stale cached tarball.
  4. Delete scripts/ensure-ui-build.mjs — unreferenced dead code. It was a postinstall guard from when the app resolved "@mieweb/ui": "file:vendor/ui"; that moved to the tarball and the postinstall hook went with it, but the script stayed. Its docstring still describes the old arrangement. Only a stale line in clock-post-simple-plan.md mentions it.
  5. Drop @kerebron/extension-automerge — not a peer @mieweb/ui asks for (it wants editor, editor-kits, extension-yjs, wasm), never imported from src/, nothing depends on it. Pinned at 0.2.1 while the rest of the kerebron stack is 0.8.6 — reads like a leftover from an experiment that concluded in favour of Yjs. Also prunes @automerge/automerge 2.2.4 and @automerge/automerge-repo 1.1.9.
  6. Ignore .pnpm-store/ in git, eslint and prettier — a ~508 MB local cache the vendor/ui build creates. Also corrects a stale .gitignore note claiming nothing reads vendor/ui; it is the source of the tarball.

No application code changed

Nothing in src/ was touched. huddlePostCollab, MarkdownEditor's collab prop, HuddleComposer's collabRoom and the meteor-backend /yjs relay were already correct.

Acceptance Criteria

  • npm run typecheck passes
  • npm run lint passes
  • npm run test:unit — 97/97
  • npm run build succeeds
  • Shipped dist/kerebron.js contains the collab implementation
  • Two browsers co-editing one post — not verified. See below.

Not verified

The collab code is confirmed present in the new build, and all static checks pass, but I have not run the app and watched two clients edit the same post. That end-to-end path is untested in this PR.

Out of Scope (for Now)

  • Removing the tarball. @mieweb/ui@0.7.1 is now published to the public npm registry, and the original reason for vendoring — vendor/ui being on an unpushed branch, per the comment in pr-preview.yml — no longer holds. Collapsing the tarball + submodule into a plain "@mieweb/ui": "^0.7.1" is a viable follow-up, but it touches CI and belongs in its own PR.
  • Wiring CollabStatus. Now available in the build, but RichEditorProps exposes no way to read the provider's connection or awareness state, so there is nothing to feed it. Needs an upstream change first.
  • @kerebron/extension-codecrock risk. The app installs 0.8.6 transitively via editor-kits, unpatched. Upstream worked around a production-build-only Illegal invocation crash in it by patching 0.8.9 — but that patch covers mieweb/ui's own Storybook install only; consumers get their own unpatched copy. Pre-existing, not introduced here, and worth its own investigation.

Dharp02 added 2 commits August 5, 2026 13:44
mieweb/ui#344 (Yjs collaborative editing + editor teardown crash fix) merged as
ec4bbe0, but the vendored build the app actually consumes still predated it: the
submodule pointer sat on e159b7b (an intermediate PR commit) and
vendor/mieweb-ui.tgz was a Jul 28 pack with no collab code at all.

- Advance the vendor/ui submodule to origin/main (a5887a2), which also brings in
  ui#350 CollabStatus, #351, #354, #343, #342, #312 and the v0.7.0/v0.7.1
  releases.
- Rebuild with pnpm (the repo pins pnpm and applies a patched
  @kerebron/extension-codecrock 0.8.9; npm install skips patchedDependencies)
  and repack vendor/mieweb-ui.tgz, 0.6.1 -> 0.7.1.
- Re-resolve the dependency so package-lock picks up the new integrity hash —
  plain 'npm install' kept restoring the old cached tarball.

The app-side collab wiring (huddlePostCollab, MarkdownEditor's collab prop,
HuddleComposer collabRoom, meteor-backend /yjs relay) was already in place and
now runs against a build that actually implements it.

Also ignore .pnpm-store/ (508MB local package cache created by the vendor/ui
build) in git, eslint and prettier, and correct the stale .gitignore note
claiming nothing in the project reads vendor/ui — it is the source of the
tarball.
Two leftovers found while verifying the @mieweb/ui 0.7.1 upgrade.

scripts/ensure-ui-build.mjs — unreferenced. It was a postinstall guard for
the days when the app resolved "@mieweb/ui": "file:vendor/ui"; that moved to
the committed tarball and the postinstall hook went away with it, but the
script stayed. Its docstring still describes the old arrangement, and it
would build vendor/ui with npm, which ignores the pnpm packageManager pin.
Nothing invokes it — only a stale line in clock-post-simple-plan.md refers
to wiring that no longer exists.

@kerebron/extension-automerge — not a peer @mieweb/ui asks for (it wants
editor, editor-kits, extension-yjs and wasm), never imported from src/, and
nothing depends on it. Pinned at 0.2.1 while the rest of the kerebron stack
is 0.8.6, which reads like a leftover from an experiment that concluded in
favour of Yjs. Removing it also prunes @automerge/automerge 2.2.4 and
@automerge/automerge-repo 1.1.9.

typecheck, lint, 97/97 unit tests and the production build all pass.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

🚀 Preview Deployment Ready

Service URL
App https://mieweb-timehuddle-chore-mieweb-ui-0-7-1.os.mieweb.org
API (Meteor) https://mieweb-timehuddle-chore-mieweb-ui-0-7-1-api.os.mieweb.org

Preview auto-deletes when this PR is closed.

The vendored vendor/mieweb-ui.tgz existed because the RichEditor collab work
lived on an unpushed branch, so no published version carried it. That merged
upstream as mieweb/ui#344 on 2026-08-04 and now ships in the `next` prerelease
line, so the hand-packed tarball no longer earns its keep.

Pin the exact prerelease rather than a caret range: v0.7.1 was tagged three
hours before #344 merged, so `^0.7.1` resolves to a build with no `collab`
prop and would silently break live collaborative editing in the huddle
composer. Move to a range once mieweb/ui cuts a stable release containing it.

- package.json: file:vendor/mieweb-ui.tgz -> 0.7.1-dev.7
- setup:ui no longer packs a tarball; it just builds vendor/ui for source work
- drop both Dockerfile COPY steps for the tarball
- refresh the now-false pr-preview.yml and dependabot.yml comments
- remove the 3.6 MB binary from the tree

Verified: typecheck, lint, format clean; 97 unit tests pass; e2e 144 passed
with one pre-existing failure (team-qr-share clipboard permission is not
granted in playwright.config.ts) and one flaky login that passed on retry.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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