Welcome, AI Agent! This document provides essential context and rules for working on the Hyperchannel codebase. Please review this carefully before making changes or planning your tasks.
- Name: Hyperchannel
- Type: Unhosted client application for the Kosmos Chat project.
- Key Technologies: Ember.js (modern, Octane/Glimmer), Sockethub (WebSockets/ActivityStreams), remoteStorage.
- Node.js Version:
>= 18
- Ember.js: This project uses modern Ember. Expect to see
@glimmer/component,@tracked, and@actiondecorators instead of classic Ember constructs. - Component Structure: Components are colocated. You will find both
component-name.jsandcomponent-name.hbsside-by-side in theapp/components/directory. - Ember Data IS NOT USED: This is a critical distinction for this project.
- The application manages models manually as plain classes with
@trackedproperties (seeapp/models/). - Testing Models: Do not use
moduleForModelor Ember Data-specific testing setups. Use standardsetupTest(hooks)fromember-qunit. (Referencetests/unit/models/channel-test.jsorbase-channel-test.jsfor proper testing examples). - Do not try to inject or use the
storeservice.
- The application manages models manually as plain classes with
When operating on this codebase, utilize the following pnpm scripts:
- Install dependencies:
pnpm install - Serve:
pnpm start(Runs development server on port 4200) - Test:
pnpm test(Runs tests in the terminal via QUnit). For a single run, usepnpm test:ember. If Chromium hangs when running the test suite, tryenv -u DBUS_SESSION_BUS_ADDRESS pnpm test:ember - Linting & Formatting:
pnpm lint(Checks JS, HBS, and Formatting via Prettier/ESLint/Template Lint)pnpm lint:fix(Fixes auto-fixable issues)
- Building:
pnpm build(development) orpnpm build-prod(production)
- Search First: Before implementing features, always
globandgrepto understand existing utilities, services (likecoms), and patterns. - Mimic Existing Style: Look closely at how similar components, routes, or services are implemented and match their architectural and formatting choices.
- Verify with Tests: Always ensure the test suite (
pnpm test) passes before considering a task complete. When adding new functionality, add unit or acceptance tests that align with existing patterns. - Linting Rules: Before concluding your task, run
pnpm lint:fixto ensure your code matches the project's rigorous style guidelines and passes automated CI checks.
app/components/: Colocated Glimmer components (UI building blocks).app/models/: Custom, plain-JavaScript/Glimmer-tracked models.app/services/: Services connecting to Sockethub, remoteStorage, and managing state.tests/: Standard QUnit test suites divided intounit,integration, andacceptance.