Skip to content

Commit 2c948e4

Browse files
authored
refactor(desktop): move Module Hub controller below AppShell (#4315)
Move Module Hub controller ownership below AppShell so Module Hub updates re-render only their actual readers. Add the monotonic controllerOwners architecture contract, keep cross-feature intents on the stable command port, preserve compiler-checked reader wiring, and cover render scope and provenance regressions. Refs #4582 Generated-by: OpenAI Codex Generated-by: Claude Code
1 parent 22715e8 commit 2c948e4

17 files changed

Lines changed: 1741 additions & 91 deletions

apps/desktop/renderer-architecture.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,15 @@
287287
"legacyPlatformImports": [
288288
"src/renderer/platform/desktop/create-workbar-services.ts -> src/renderer/session-message-settlement"
289289
],
290+
"controllerOwners": [
291+
{
292+
"implementation": "src/renderer/features/module-hub/controller/use-module-hub-controller.ts",
293+
"symbol": "useModuleHubController",
294+
"owner": "src/renderer/features/module-hub/ui/module-hub-provider.tsx",
295+
"ownerSymbol": "ModuleHubProvider",
296+
"count": 1
297+
}
298+
],
290299
"legacyAppShell": {
291300
"files": {
292301
"src/renderer/app-shell-app-update.ts": {
@@ -763,11 +772,10 @@
763772
"useEffect": 14,
764773
"useKeyboardHelp": 1,
765774
"useLayoutEffect": 2,
766-
"useModuleHubController": 1,
767775
"useNewTaskChoice": 1,
768776
"useOnboardingSnapshot": 1,
769777
"usePlanModeState": 1,
770-
"useRef": 24,
778+
"useRef": 23,
771779
"useSessionCollaborationDialog": 1,
772780
"useSessionEventHealthPolling": 1,
773781
"useSessionNavigationReads": 1,
@@ -887,8 +895,8 @@
887895
"@maka/ui/icons": 1,
888896
"react": 1
889897
},
890-
"importSpecifiers": 148,
891-
"nonTriviaTokens": 15601
898+
"importSpecifiers": 147,
899+
"nonTriviaTokens": 15588
892900
},
893901
"src/renderer/use-app-shell-composer-quotes.ts": {
894902
"importDeclarations": 2,

0 commit comments

Comments
 (0)