Skip to content

Automate vendor/mieweb-ui.tgz Rebuild From the vendor/ui Submodule - #518

Merged
Dharp02 merged 4 commits into
mainfrom
fix/automate-ui-tarball-rebuild
Sep 6, 2026
Merged

Automate vendor/mieweb-ui.tgz Rebuild From the vendor/ui Submodule#518
Dharp02 merged 4 commits into
mainfrom
fix/automate-ui-tarball-rebuild

Conversation

@Dharp02

@Dharp02 Dharp02 commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Overview

Started as automation for the vendor/mieweb-ui.tgz rebuild (replacing the manual "pull submodule, rebuild, repack, commit the tarball by hand" workflow from #517). During review it became clear the tarball itself was no longer necessary — the published @mieweb/ui npm package now covers everything this app actually imports — so this PR now removes the tarball/submodule setup entirely and installs @mieweb/ui from the npm registry, plus a batch of unrelated Playwright stabilization fixes picked up along the way.

Changes

@mieweb/ui now installs from npm (^0.7.3) instead of file:vendor/mieweb-ui.tgz.
Removed the now-dead vendor/tarball infrastructure:
vendor/ui submodule (and its .gitmodules entry)
vendor/mieweb-ui.tgz, vendor/.ui-tarball-commit
scripts/build-ui-tarball.mjs (the rebuild automation this PR originally added)
scripts/ensure-ui-build.mjs (older, already-unreferenced leftover from the pre-tarball era)
"setup:ui" script in package.json
Updated stale references to the tarball/submodule in Dockerfile (dropped the COPY vendor/mieweb-ui.tgz steps in both build stages), .github/workflows/pr-preview.yml, .github/dependabot.yml, and vite.config.ts.
Archived the removed setup to .attic/mieweb-ui-tarball/ (tarball, marker file, both build scripts) instead of deleting it outright, with a README covering why it existed and exact steps to restore vendoring if a future feature needs an unreleased @mieweb/ui component.
src/lib/TeamContext.tsx: honor a ?teamId= deep link over the persisted selection so it isn't clobbered by the "pick first available" effect on load.
Playwright stabilization: replaced brittle waitForLoadState('networkidle')/waitForTimeout() calls with explicit waits across several huddle/org specs, switched large-uploads.spec.ts to committed binary fixtures instead of generating images in-page, and added a slow-DDP login retry to TeamsPage.goto().
Why npm instead of the vendored build (see #517 for the full investigation)
Two things previously blocked using the plain npm package:

Unreleased components: vendor/ui had components (Sparkline, KeyboardShortcutsOverlay) not yet on npm. Checked usage — neither is imported anywhere in this app, so this is a non-issue today.
Type duplication: linking file:vendor/ui directly (no workspace) gave the submodule its own node_modules, causing duplicate @types/react and collapsing every @mieweb/ui component's props to any. Installing from the registry avoids this the same way the tarball did — a single, flat install into the shared node_modules.
If a future feature needs an unreleased @mieweb/ui component again, vendoring can be reintroduced at that point — no need to carry the infrastructure in the meantime.

Verification

npm run typecheck — clean
npm run lint — clean
npm run format — clean
npm run test:unit — 138/138 passed
npm run build — succeeds
npm run test (Playwright e2e) — not yet run against this diff
Manually diffed the two @mieweb/ui builds (vendored vs. npm) against every component this app actually imports — only meaningful differences were in Select/Input/Textarea (multi-select, floating labels, required-asterisk styling), none of which this app uses except the required-asterisk, which renders correctly
Browser-tested the Huddle composer (RichEditor via @mieweb/ui/kerebron) specifically for the one behavioral risk identified in review — editing an existing post opens a live Yjs collab room and correctly seeds the post's existing content (no empty-editor regression); toolbar and formatting confirmed working

Out of Scope (for Now)

Migrating to npm/pnpm workspaces (would only matter if vendoring is reintroduced later)
Closes the automation gap described in #517 — the tarball is no longer part of the install path at all, so there's nothing left to automate.

…dule

Replaces the manual 'update vendor/ui, rebuild, repack, commit the tarball'
workflow with scripts/build-ui-tarball.mjs, run via 'npm run setup:ui':

- Compares vendor/ui's current commit against a marker file
  (vendor/.ui-tarball-commit) and only rebuilds when it has changed, so
  repeated runs are a fast no-op instead of always repacking.
- Streams pnpm/tsup output live (stdio: inherit) instead of buffering it
  silently, which previously made multi-minute rebuilds look hung.
- setup:ui no longer runs 'git submodule update --init' unconditionally —
  that was resetting vendor/ui back to the outer repo's stale pinned commit
  on every run, silently discarding any manual 'git pull' progress. The
  script's own init-only-if-missing check already covers first clone.

Advances the vendor/ui submodule pointer a5887a2a -> fd22cb1b (mieweb/ui
main, includes the Sparkline and KeyboardShortcutsOverlay components) and
rebuilds vendor/mieweb-ui.tgz from it. Verified: typecheck, lint, 138/138
unit tests, and build all pass against the rebuilt tarball.

Refs #517
Copilot AI balanced review requested due to automatic review settings September 3, 2026 22:39
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

🗑️ Preview Environment Cleaned Up

The preview container for this PR has been deleted.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Automates rebuilding the vendored @mieweb/ui tarball from its submodule revision.

Changes:

  • Adds commit-based rebuild detection and streaming output.
  • Updates the UI submodule, tarball, marker, and dependency lock.
  • Replaces the manual setup:ui command sequence with the script.

Reviewed changes

Copilot reviewed 2 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/build-ui-tarball.mjs Implements conditional tarball rebuilding.
package.json Routes setup:ui through the new script.
package-lock.json Locks dependencies from the updated tarball.
vendor/.ui-tarball-commit Records the packaged submodule revision.
vendor/ui Advances the UI submodule revision.
vendor/mieweb-ui.tgz Supplies the rebuilt UI package.
Suppressed comments (1)

scripts/build-ui-tarball.mjs:59

  • Replacing the tarball alone leaves both node_modules/@mieweb/ui and the tarball integrity/dependency graph in package-lock.json stale. The current lockfile diff shows that a rebuild requires lock updates; on the next submodule change, npm ci can reject the new tarball while a current dev process still consumes the old installed package. Refresh the root installation and lockfile before recording the marker.
renameSync(join(UI_DIR, packedFile), TARBALL);
writeFileSync(MARKER, currentCommit + '\n');

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread package.json Outdated
Comment thread .attic/mieweb-ui-tarball/build-ui-tarball.mjs
Poonam Dharamkar added 2 commits September 6, 2026 12:15
…pm registry

- Revert @mieweb/ui dependency from local vendor/mieweb-ui.tgz back to the
  published ^0.7.3 registry package.
- TeamContext: honor a ?teamId= deep link over the persisted selection so it
  isn't clobbered by the 'pick first available' effect on load.
- Replace brittle waitForLoadState('networkidle')/waitForTimeout() calls
  across e2e specs and fixtures with explicit, targeted waits.
- large-uploads.spec.ts: use committed binary fixtures (large-photo.jpg,
  large-screenshot.png) and assert on the upload response body instead of
  intercepting/regenerating images in-page.
- TeamsPage.goto(): detect and recover from a slow-DDP login bounce by
  retrying with re-authentication.
- team.ts: cache the shared seed team id and avoid redundant reloads when
  the selection already matches.
- playwright.config.ts: document the retry rationale (MongoDB replica-set
  monitor timeouts under host contention during the long sequential run).
@Dharp02 Dharp02 self-assigned this Sep 6, 2026
Dharp02 pushed a commit that referenced this pull request Sep 6, 2026
Finishes the @mieweb/ui npm-registry revert from f3c99bb8: the vendored
submodule, build-ui-tarball.mjs/ensure-ui-build.mjs, and their
Dockerfile/CI/dependabot references are no longer needed now that no
in-use component depends on unreleased vendor/ui code. Archived to
.attic/mieweb-ui-tarball/ with restore instructions (see PR #518 / #517).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Finishes the @mieweb/ui npm-registry revert from f3c99bb8: the vendored
submodule, build-ui-tarball.mjs/ensure-ui-build.mjs, and their
Dockerfile/CI/dependabot references are no longer needed now that no
in-use component depends on unreleased vendor/ui code. Archived to
.attic/mieweb-ui-tarball/ with restore instructions (see PR #518 / #517).
@Dharp02
Dharp02 force-pushed the fix/automate-ui-tarball-rebuild branch from d338339 to 8ea7377 Compare September 6, 2026 17:59
@Dharp02
Dharp02 merged commit baf72d8 into main Sep 6, 2026
8 checks passed
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.

2 participants