Decisions: a kit app's hooks
This page is generated from the project corpus and rewritten on every docs build. Edit the source in corpus/, not here.
Settled by the owner on 2026-11-06 for brief 71, so that Todo (a due-date
service) and Bookmarks (palette entries) could leave the image. Built the
same day (93bf282, kit 1.5.0) and walked on 2026-11-09. Changing one needs
an explicit revisit and a log.md entry.
- The descriptor declares each hook. A suite app may say
background: trueandcommandSources: true. Only an app that declares one has its module loaded without a window. Why: loading every app's module at sign-in would cost every install for the few that need it. - The module exports them by name beside
App:BackgroundandcommandSources. A declared hook the module doesn't export is a refusal that names it, shown like a missing entry. - A failure is contained. A hook that throws is hidden with one notification, like a desktop layer; a module that fails to load costs only that app's hooks. Built-in services sit behind the same boundary.
- The kit exports the types (
CommandSource, its context, the windowless handle) from 1.5.0; a command source gets the app's own folders asctx.datafrom 1.6.0, since it has no window to read them through. - Sign-in never waits. Hook apps load once the desktop is idle, so a palette entry or a due-date check may start a beat later. Not measured yet with and without a hook app.
Rejected: loading hooks with the registry at sign-in (slower desktop for every user), and widgets and desktop layers for installed apps (Clock, Calendar and Sticky Notes, the apps that use them, stay built in; revisit when an installable app needs one).
Users: Todo's Background and Bookmarks' commandSources
(recipe). The fixture is
apps/backend/test/fixtures/hooks-repo.ts.