tree: e4930f175c54e3adec797cb5836a9bb1c2c4b5b4
  1. assets/
  2. astryx-theme/
  3. computer-use-overlay/
  4. locales/
  5. public/
  6. settings/
  7. styles/
  8. agent-graph-panel.tsx
  9. app-shell-app-update.ts
  10. app-shell-chat-actions.ts
  11. app-shell-chrome-actions.tsx
  12. app-shell-command-actions.ts
  13. app-shell-copy.ts
  14. app-shell-daily-review-actions.ts
  15. app-shell-daily-review-bridge.ts
  16. app-shell-detail-panel.tsx
  17. app-shell-e2e-fixture.ts
  18. app-shell-effects.ts
  19. app-shell-open-skill-action.ts
  20. app-shell-overlays.tsx
  21. app-shell-pending-attachments.ts
  22. app-shell-plan-actions.ts
  23. app-shell-project-actions.ts
  24. app-shell-revision-actions.ts
  25. app-shell-session-events.ts
  26. app-shell-session-row-actions.ts
  27. app-shell-session-settings-actions.ts
  28. app-shell-session-start-actions.ts
  29. app-shell-session-ui-state.ts
  30. app-shell-skill-actions.ts
  31. app-shell-stop-action.ts
  32. app-shell-turn-actions.ts
  33. app-shell-turn-view-model.ts
  34. app-shell.tsx
  35. app-update-install.ts
  36. app.tsx
  37. artifact-list-keyboard.ts
  38. artifact-pane.tsx
  39. artifact-preview-registry-shell.tsx
  40. artifact-preview.tsx
  41. artifact-visibility.ts
  42. astryx-theme-mode.ts
  43. attachment-preflight.ts
  44. bootstrap-selection-lease.ts
  45. branch-banner.ts
  46. browser-panel.tsx
  47. browser-storage.ts
  48. cached-theme-bootstrap.ts
  49. cascade-layers.css
  50. chat-composer-region.tsx
  51. chat-message-surface.tsx
  52. chat-workbar.tsx
  53. command-palette-commands.ts
  54. command-palette-types.ts
  55. command-palette.tsx
  56. composer-defaults.ts
  57. conversation-markdown.ts
  58. custom-pet-companion-model.ts
  59. custom-pet-companion.tsx
  60. daily-review-actions.ts
  61. derive-turn-lineage-badges.ts
  62. desktop-execution-boundary-surface.ts
  63. error-boundary.tsx
  64. external-session-import-dialog.tsx
  65. external-session-import-lifecycle.ts
  66. index.html
  67. interrupted-resume.ts
  68. keyboard-help.tsx
  69. live-turn-reconciler.tsx
  70. live-turn-snapshot.ts
  71. main.tsx
  72. maka-tokens.css
  73. mcp-brand-contrast.ts
  74. mcp-brand-marks.tsx
  75. mcp-catalog.ts
  76. mcp-editor-validation.ts
  77. mcp-import.ts
  78. mcp-page.tsx
  79. model-catalog-choices.ts
  80. model-connection-errors.ts
  81. model-wait-state.ts
  82. nav-selection.ts
  83. new-task-reload-intent.ts
  84. onboarding-hero-copy.ts
  85. onboarding-hero.tsx
  86. onboarding-provider-types.ts
  87. open-path.ts
  88. plan-mode-panel.tsx
  89. project-path-display.ts
  90. quote-companion-core.ts
  91. quote-companion-panel-state.ts
  92. quote-companion-panel.tsx
  93. quote-companion-visibility.ts
  94. README.md
  95. reference-shell.css
  96. scroll-motion-policy.ts
  97. session-copy-attempt.ts
  98. session-error-presentation.ts
  99. session-event-health.ts
  100. session-health-notice.ts
  101. session-inspector-filter.ts
  102. session-inspector-overview-model.ts
  103. session-inspector-panel-model.ts
  104. session-inspector-panel.tsx
  105. session-list-layout.ts
  106. session-message-settlement.ts
  107. session-nav-filter.ts
  108. session-project-grouping.ts
  109. session-rail.ts
  110. session-read-state.ts
  111. session-review-panel.tsx
  112. session-revisions.ts
  113. session-status-presentation.ts
  114. session-terminal-panel.tsx
  115. session-trace-refresh.ts
  116. session-workbar-layout.ts
  117. session-workbar-tabs.ts
  118. session-workbar.tsx
  119. session-workspace-errors.ts
  120. settled-session-transients.ts
  121. shell-chat-model-selection.ts
  122. shell-run-update-state.ts
  123. side-chat-close-confirmation.tsx
  124. side-chat-command.ts
  125. skill-invocation-feedback.ts
  126. stable-actions.ts
  127. stale-sessions.ts
  128. styles.css
  129. theme.ts
  130. turn-footer-actions.ts
  131. use-active-execution-boundary.ts
  132. use-app-shell-composer-attachments.ts
  133. use-app-shell-composer-quotes.ts
  134. use-app-shell-session-list.ts
  135. use-app-shell-session-ui-reads.ts
  136. use-app-shell-session-ui-selector.ts
  137. use-app-shell-session-workspace.ts
  138. use-composer-mentions.ts
  139. use-deep-research-run.ts
  140. use-delayed-flag.ts
  141. use-keep-system-awake.ts
  142. use-module-data.ts
  143. use-onboarding-snapshot.ts
  144. use-pending-action-registry.ts
  145. use-project-context.ts
  146. use-quote-companion.ts
  147. use-session-goal.ts
  148. use-session-tasks.ts
  149. use-session-trace.ts
  150. use-settings-modal.ts
  151. use-shell-appearance.ts
  152. use-shell-chat-model.ts
  153. use-shell-connections.ts
  154. use-shell-layout.ts
  155. use-shell-live-turn.ts
  156. use-shell-memory-pill.ts
  157. use-shell-resume.ts
  158. use-shell-search.ts
  159. use-side-conversation-workspace.ts
  160. use-stable-actions.ts
  161. use-system-ui-locale.ts
  162. workspace-readiness-recovery.ts
apps/desktop/src/renderer/README.md

Renderer (apps/desktop/src/renderer)

The Electron renderer process: the React UI body of the Maka desktop app. React + Vite, consuming Astryx through @maka/ui primitives.

For the main/preload/renderer split and the IPC contract, see apps/desktop/README.md. This file covers the renderer interior.

Entry

main.tsxapp.tsxAppShell (app-shell.tsx). index.html is the Vite HTML shell. main.tsx prefetches the onboarding snapshot before mounting React so the normal-path first commit paints the real surface (if the prefetch times out it mounts with null and a fail-soft loading state); app.tsx wraps AppShell in ToastProvider + ErrorBoundary.

styles.css is the only bundled style entry: it imports Astryx, fonts, maka-tokens.css, reference-shell.css, and every styles/*.css. It contains only top-level orchestration; real selector rules go in styles/*.css. One contract-pinned exception: index.html carries an inline .maka-preload skeleton with hardcoded colors (no CSS variables — maka-tokens.css hasn‘t loaded yet) so there’s no blank window during the CSS + JS load gap; createRoot replaces it on mount.

AppShell + the action modules

app-shell.tsx is the shell component: owns session state, wires the @maka/ui panels (SessionListPanel, ChatView, Composer — ChatView renders the tool stream via ToolTrow), and lazy-mounts SessionWorkbar, which owns the task ledger, browser, and generated files. It is supported by a set of app-shell-* modules, each a narrow slice of shell logic split by one concern (e.g. app-shell-session-events.ts, app-shell-chat-actions.ts, app-shell-plan-actions.ts, app-shell-effects.ts, app-shell-stop-action.ts, app-shell-overlays.tsx). Most follow app-shell-<scope>-<action>.ts(x); a few single-word slices like app-shell-effects.ts or app-shell-copy.ts drop the action segment. Keep a slice to one concern; if it grows, split along the same seam.

settings/ holds the settings pages and the SettingsModal shell — one page per SettingsSection (defined in @maka/core); the models/providers page is ProvidersPanel. Plus the provider-* files and the shared settings-rows / settings-skeleton / settings-surface helpers.

Styles & tokens

FileRole
astryx-theme/makaTheme.tsSource for the Astryx type scale, neutral remaps, and theme-level component overrides.
astryx-theme/maka.cssGenerated Astryx theme imported by styles.css; regenerate it from makaTheme.ts, never edit it directly.
maka-tokens.cssThe main source of product CSS tokens (color / shadow / typography aliases / radius / spacing / motion / z / layout), plus a large recipe section at the tail. Transitional: tokens and recipes coexist in one file.
reference-shell.cssA target-layout shell rebuild, hand-authored from a reference-implementation extract (its header comment documents the provenance). Transitional — meant to be folded back into the token/style system and removed.
styles/*.cssPer-surface hand-written recipes (e.g. chat-*, sidebar, composer, palette, settings/*, module-pages/*).

Token authoring rule: custom CSS variables go in maka-tokens.css. New component-local vars should carry /* local: ... */ (existing ones don't all have it yet). No new hardcoded color / radius / z-index.

Note the --foreground-N split: the wash stops (-2/-3/-5/-8/-10) are surface fills for backgrounds and borders, not text. The 3-tier semantic aliases (--foreground / --foreground-secondary / --muted-foreground) are the text-color vocabulary. They are separate concerns — don't collapse the wash stops into the text aliases.

New code: primitive first, CSS last

  1. Reach for an Astryx-backed @maka/ui primitive first.
  2. Only if no primitive carries it, write CSS in the matching styles/<surface>.css, following docs/frontend-css-governance.md (layer rules, the unlayered override list, the !important audit, the dead-CSS allowlist).
  3. Don't add a token without registering it in maka-tokens.css.

Convergence direction (transitional surfaces)

Acknowledged transitional states — not TODOs; track work in issues/PRs.

  • Existing hand-written styles/*.css recipes and internal-DOM overrides on Astryx-backed @maka/ui primitives are acknowledged transitional states, not precedent for new work. New styling uses published props, tokens, or stable themeProps extension points; track concrete retirement work in GitHub issues and PRs.
  • reference-shell.css: end state is folded into the token/style system and the file removed.
  • maka-tokens.css mixing tokens + recipes: end state is tokens-only here, recipes living on primitives / styles/.

Contracts & guardrails

  • Product design intent: DESIGN.md.
  • CSS cascade / layer / !important / dead-CSS / token rules: docs/frontend-css-governance.md. The dead-CSS check runs from the repo root via check:release (scripts/check-dead-css.mjs --check); its baseline is scripts/check-dead-css-baseline.json.
  • Component state, ARIA, token, and copy behavior is owned by source and focused contract tests.
  • Where prose disagrees with code or behavioral tests, code and tests are the source of truth. CSS conventions are checked by review, focused scripts/check-*.mjs commands, and rendered-surface verification; the former source-scanning CSS contract suite has been removed. Build/test entry points are the npm scripts in the root package.json (see the top-level README.md).