tree: 84c2507622e01bb1ea42e91f1c31e6f05647ad5e
  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-chat-actions.ts
  10. app-shell-chrome-actions.tsx
  11. app-shell-command-actions.ts
  12. app-shell-copy.ts
  13. app-shell-daily-review-actions.ts
  14. app-shell-daily-review-bridge.ts
  15. app-shell-detail-panel.tsx
  16. app-shell-e2e-fixture.ts
  17. app-shell-effects.ts
  18. app-shell-layout-actions.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.tsx
  36. artifact-list-keyboard.ts
  37. artifact-pane.tsx
  38. artifact-preview-registry-shell.tsx
  39. artifact-preview.tsx
  40. artifact-visibility.ts
  41. astryx-theme-mode.ts
  42. attachment-preflight.ts
  43. bootstrap-selection-lease.ts
  44. branch-banner.ts
  45. browser-panel.tsx
  46. browser-storage.ts
  47. cached-theme-bootstrap.ts
  48. cascade-layers.css
  49. chat-composer-region.tsx
  50. chat-message-surface.tsx
  51. chat-model-selection.ts
  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. daily-review-actions.ts
  59. derive-turn-lineage-badges.ts
  60. desktop-execution-boundary-surface.ts
  61. error-boundary.tsx
  62. index.html
  63. interrupted-resume.ts
  64. keyboard-help.tsx
  65. main.tsx
  66. maka-tokens.css
  67. mcp-brand-contrast.ts
  68. mcp-brand-marks.tsx
  69. mcp-catalog.ts
  70. mcp-editor-validation.ts
  71. mcp-import.ts
  72. mcp-page.tsx
  73. model-catalog-choices.ts
  74. model-connection-errors.ts
  75. model-wait-state.ts
  76. nav-selection.ts
  77. onboarding-hero-copy.ts
  78. OnboardingHero.tsx
  79. open-path.ts
  80. plan-mode-panel.tsx
  81. quote-companion-core.ts
  82. quote-companion-panel-state.ts
  83. quote-companion-panel.tsx
  84. quote-companion-visibility.ts
  85. README.md
  86. reference-shell.css
  87. scroll-motion-policy.ts
  88. session-error-presentation.ts
  89. session-event-health.ts
  90. session-health-notice.ts
  91. session-list-layout.ts
  92. session-message-settlement.ts
  93. session-nav-filter.ts
  94. session-project-grouping.ts
  95. session-read-state.ts
  96. session-revisions.ts
  97. session-status-presentation.ts
  98. session-workbar-layout.ts
  99. session-workbar.tsx
  100. session-workspace-errors.ts
  101. settled-session-transients.ts
  102. shell-run-update-state.ts
  103. skill-invocation-feedback.ts
  104. stable-actions.ts
  105. stale-sessions.ts
  106. styles.css
  107. theme.ts
  108. turn-footer-actions.ts
  109. use-active-execution-boundary.ts
  110. use-app-shell-composer-attachments.ts
  111. use-app-shell-composer-quotes.ts
  112. use-app-shell-session-list.ts
  113. use-app-shell-session-workspace.ts
  114. use-composer-mentions.ts
  115. use-deep-research-run.ts
  116. use-delayed-flag.ts
  117. use-keep-system-awake.ts
  118. use-module-data.ts
  119. use-onboarding-snapshot.ts
  120. use-pending-action-registry.ts
  121. use-project-context.ts
  122. use-quote-companion.ts
  123. use-session-goal.ts
  124. use-session-tasks.ts
  125. use-settings-modal.ts
  126. use-shell-appearance.ts
  127. use-shell-chat-model.ts
  128. use-shell-connections.ts
  129. use-shell-layout.ts
  130. use-shell-live-turn.ts
  131. use-shell-memory-pill.ts
  132. use-shell-resume.ts
  133. use-shell-search.ts
  134. use-stable-actions.ts
  135. use-system-ui-locale.ts
  136. use-voice-input.ts
  137. voice-audio-capture.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
maka-tokens.cssThe main source of CSS tokens (color / shadow / typography / radius / spacing / motion / z / layout), plus a large recipe section at the tail (base styles, utilities, component recipes, animations). 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.

  • Hand-written styles/*.css recipes + overrides on @maka/ui primitives: end state is structure carried by primitives, renderer CSS left only with layout primitives can't cover. 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 the code or contract tests, the code and tests are the source of truth. Key guardrail tests live in apps/desktop/src/main/__tests__/ (style-layer-cascade, important-audit, typography / spacing / radius / state-token / foreground-tier governance). Build/test entry points are the npm scripts in the root package.json (see the top-level README.md).