Some checks failed
Deploy Web Apps / deploy (push) Successful in 5m52s
Build Android APK / build-android-apk (push) Failing after 23m15s
Queue Release Build / prepare (push) Successful in 1m42s
Queue Release Build / build-linux (push) Failing after 9m33s
Queue Release Build / build-windows (push) Successful in 26m5s
Queue Release Build / finalize (push) Has been skipped
4.4 KiB
4.4 KiB
Product Client Guidelines
This package is the Angular 21 renderer for the Toju/MetoYou product client.
Before You Edit
- Use the root commands from the repository root:
npm run build,npm run test,npm run lint, andnpm run formatfor template changes. - Read
src/app/domains/README.mdbefore adding or moving business logic. - See
../doc/typescript.mdfor shared TypeScript rules.
Architecture
- Keep business rules in
src/app/domains/<name>/domain/. - Keep orchestration in
src/app/domains/<name>/application/. - Keep technical adapters in
src/app/domains/<name>/infrastructure/orsrc/app/infrastructure/. - Keep domain-owned UI in
src/app/domains/<name>/feature/and app-level shells or composition insrc/app/features/. - Outside a domain, import from
src/app/domains/<name>/index.tsinstead of internal files. - Put cross-domain contracts in
src/app/shared-kernel/when two or more domains need them.
Key Docs
src/app/domains/README.mdsrc/app/shared-kernel/README.mdsrc/app/infrastructure/realtime/README.md
Electron Boundary
- In Angular DI code, use
src/app/core/platform/electron/electron-bridge.service.ts. - In non-DI renderer helpers, use
src/app/core/platform/electron/get-electron-api.ts. - When the renderer/Electron contract changes, keep the Angular bridge, preload API, and IPC handlers in sync.
Mobile / Viewport
- Use
ViewportServicefromsrc/app/core/platform/viewport.service.tsfor mobile/touch detection. Breakpoint ismd(max-width 767.98px); exposesisMobile,isTouch,isDesktopsignals. - Theme-driven grid layouts (
appShell,roomLayout,dmLayout) are bypassed on mobile. Do not introduce mobile-specific theme layouts; gate via@if (isMobile())in templates instead. - On mobile discovery routes (
/dashboard,/people,/servers, …) the globalapp.htmlservers rail stays visible (shouldShowMobileAppServersRailincore/platform/mobile-shell-layout.rules.ts); routed pages render full-width inappWorkspaceand must not embed a second<app-servers-rail>/Swiper stack. - The mobile chat-room shell (
features/room/chat-room) is a 3-page stack (channels -> main -> members); the DM workspace (domains/direct-message/feature/dm-workspace) is 2-page (conversations -> chat). Page state is a component-local signal kept in sync with a Swiper carousel (<swiper-container>/<swiper-slide>fromswiper/element/bundle, registered insrc/main.ts); both components declareCUSTOM_ELEMENTS_SCHEMA. Chat/DM/call routes keep their embedded rail inside Swiper and hide the global app-shell rail. - The Electron-style title bar is hidden on mobile. Screen-share UI must stay hidden on mobile (browsers do not support it reliably on touch devices).
- Context menus and modal dialogs auto-render as bottom sheets on mobile.
ContextMenuComponentandConfirmDialogComponent(insrc/app/shared/components/) injectViewportServiceand switch their templates between the desktop popover/centered modal andBottomSheetComponent(src/app/shared/components/bottom-sheet/) on phone-sized viewports. New menus/dialogs should reuse these components rather than rolling their ownfixed inset-0overlay. For one-off bespoke surfaces, render<app-bottom-sheet>directly whenisMobile(). - Tap targets on interactive controls should be at least 44px on mobile. Use
min-h-11(or explicith-11 w-11) for icon buttons that are tap-only on mobile; desktop sizes can remain smaller viamd:overrides.
i18n
- User-visible UI strings use
@ngx-translate/core(same stack aswebsite/). Edit fragment catalogs inpublic/i18n/catalog/*.json, then runnpm run i18n:syncfrom the repo root to regeneratepublic/i18n/en.json. Onlyenships today. - Bootstrap and locale rules:
src/app/core/i18n/. ImportAPP_TRANSLATE_IMPORTSin standalone components that use thetranslatepipe; useAppI18nService.instant()in TypeScript. - Vitest harnesses:
provideAppI18nForTests()fromsrc/app/core/i18n/app-i18n.testing.ts. - See
agents-docs/features/app-i18n.mdfor the full contract.
Templates
- If you touch Angular HTML templates, run
npm run format. - If template property order matters, run
npm run sort:propsor the matching VS Code task.
Before You Finish
- Validate whether relevant markdown docs or
AGENTS.mdfiles need updates. If behavior, workflows, commands, or architecture changed, update those docs in the same task.