@@ -61,7 +61,11 @@ import { useTerminalStateStore } from "~/terminalStateStore";
6161import { useUiStateStore } from "~/uiStateStore" ;
6262import { WsTransport } from "../../rpc/wsTransport" ;
6363import { createWsRpcClient , type WsRpcClient } from "../../rpc/wsRpcClient" ;
64- import { derivePhysicalProjectKey } from "../../logicalProject" ;
64+ import {
65+ deriveLogicalProjectKeyFromSettings ,
66+ derivePhysicalProjectKey ,
67+ } from "../../logicalProject" ;
68+ import { getClientSettings } from "~/hooks/useSettings" ;
6569
6670type EnvironmentServiceState = {
6771 readonly queryClient : QueryClient ;
@@ -468,9 +472,11 @@ function coalesceOrchestrationUiEvents(
468472
469473function syncProjectUiFromStore ( ) {
470474 const projects = selectProjectsAcrossEnvironments ( useStore . getState ( ) ) ;
475+ const clientSettings = getClientSettings ( ) ;
471476 useUiStateStore . getState ( ) . syncProjects (
472477 projects . map ( ( project ) => ( {
473478 key : derivePhysicalProjectKey ( project ) ,
479+ logicalKey : deriveLogicalProjectKeyFromSettings ( project , clientSettings ) ,
474480 cwd : project . cwd ,
475481 } ) ) ,
476482 ) ;
@@ -541,9 +547,11 @@ function applyRecoveredEventBatch(
541547 useStore . getState ( ) . applyOrchestrationEvents ( uiEvents , environmentId ) ;
542548 if ( needsProjectUiSync ) {
543549 const projects = selectProjectsAcrossEnvironments ( useStore . getState ( ) ) ;
550+ const clientSettings = getClientSettings ( ) ;
544551 useUiStateStore . getState ( ) . syncProjects (
545552 projects . map ( ( project ) => ( {
546553 key : derivePhysicalProjectKey ( project ) ,
554+ logicalKey : deriveLogicalProjectKeyFromSettings ( project , clientSettings ) ,
547555 cwd : project . cwd ,
548556 } ) ) ,
549557 ) ;
0 commit comments