Skip to content

Migrate to Ember 7.3 with Vite/Embroider and pnpm - #320

Merged
raucao merged 17 commits into
masterfrom
chore/vite-migration
Sep 24, 2026
Merged

raucao merged 17 commits into
masterfrom
chore/vite-migration

Conversation

@raucao

@raucao raucao commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Moves Hyperchannel off the classic Broccoli build (Ember 6.4 + npm) onto Ember 7.3 with Vite/Embroider and pnpm, replaces the addons removed or deprecated in Ember 7, and fixes the regressions surfaced while validating the migration. A handful of Sockethub/messaging bug fixes and a modal accessibility pass are included.

Build & tooling

  • Replaced ember-cli-build.js with ember-cli-build.mjs
    (@embroider/compat compatBuild + @embroider/vite buildOnce).
  • Added vite.config.mjs, babel.config.mjs, postcss.config.mjs, root
    index.html (moved from app/index.html), testem.cjs (from testem.js),
    and app/config/environment.js (via @embroider/config-meta-loader).
  • app/app.js uses Resolver.withModules(compatModules); app/router.js
    uses @embroider/router.
  • Raised Node requirement to >= 20.19.0.
  • CI installs via pnpm/action-setup@v4 with setup-node's cache: pnpm
    and --frozen-lockfile.

Package manager: npm → pnpm

  • Pinned "packageManager": "pnpm@10.32.1"; removed package-lock.json,
    added pnpm-lock.yaml.
  • Scripts shelling out now use pnpm run; README.md/AGENTS.md updated.
  • pnpm.ignoredBuiltDependencies: ["@parcel/watcher"] documents that its
    install script is intentionally skipped (prebuilt binary is used).
  • Removed the stale Dockerfile rather than porting it.

Styling

  • SCSS kept (app.scss imported from app.js); Tailwind v3 + autoprefixer
    via postcss.config.mjs; removed ember-cli-postcss,
    @csstools/postcss-sass and postcss-scss.

Dependencies replaced / removed

  • ember-promise-modals → local modals service + ModalOverlay.
  • ember-concurrency → guarded async action (single usage).
  • ember-lifeline → native setTimeout/requestAnimationFrame with
    destroy guards.
  • ember-keyboard-shortcuts → shortcut-matches util + rewritten
    keyboard-shortcuts modifier.
  • consistent-color-generation (js-sha1, whose eval("require('crypto')")
    tripped Rolldown's [EVAL] warning) → app/utils/user-color.js
    (XEP-0392 via @noble/hashes + hsluv); output unchanged.
  • Removed unused/build-only deps (ember-fetch, ember-sinon,
    @ember/render-modifiers, ember-auto-import, loader.js, stylelint, webpack,
    etc.); upgraded ember-autofocus-modifier, ember-truth-helpers,
    tracked-built-ins, ember-moment, @ember/test-waiters.

Embroider compatibility

  • Replaced dynamic {{component ...}} with static components in
    add-chat-account.hbs, channel-container.hbs and join-channel.hbs.
  • user-color tolerates missing identifiers so a malformed nickname can't
    abort a render; restored the date-headline branch.

Bug fixes

  • XMPP DMs from the user list: new user-channel-id util; firstObject
    → [0] and empty-channel guards across routes/components.
  • Incoming IRC DMs: skip accounts without a server when matching the
    hostname.
  • IRC leave: stopped sending the invalid empty object: {} (rejected
    by Sockethub's oneOf schema) and added the leave error callback.

Modal accessibility

  • New focus-trap modifier: focuses dialog content on open (first Tab →
    "Add"), traps Tab/Shift+Tab, closes on Escape, restores focus on close.
  • Dialog gets role="dialog", aria-modal, aria-label; background is
    made inert while open.
  • Modal repositioned to sit slightly (~6vh) above vertical center.

Tests / docs

  • tests/index.html + test-helper.js on the new blueprint; testem runs
    against dist after vite build --mode development.
  • Component logic behind four tests extracted into utils (factoryFor no
    longer resolves under Embroider).
  • New regression tests for the fixes above.

Test plan

  • pnpm test → 150 tests: 147 pass, 3 skip, 0 fail
  • pnpm lint (JS, HBS, format) → clean
  • pnpm build, pnpm build-prod, pnpm start → succeed

Notes / follow-ups

  • TypeScript intentionally not adopted; Tailwind kept on v3.
  • docs/UPGRADE_SUMMARY.md documents the full migration.

@silverbucket silverbucket left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Started up and ran without any issues, LGTM

@raucao
raucao merged commit 78ec9fe into master Sep 24, 2026
4 checks passed
@raucao
raucao deleted the chore/vite-migration branch September 24, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants