@@ -63,6 +63,7 @@ import type { FileView } from '@cardstack/host/services/operator-mode-state-serv
63
63
import type OperatorModeStateService from ' @cardstack/host/services/operator-mode-state-service' ;
64
64
import type RealmService from ' @cardstack/host/services/realm' ;
65
65
import type RecentFilesService from ' @cardstack/host/services/recent-files-service' ;
66
+ import type SpecPanelService from ' @cardstack/host/services/spec-panel-service' ;
66
67
67
68
import type { CardDef , Format } from ' https://cardstack.com/base/card-api' ;
68
69
import { type SpecType } from ' https://cardstack.com/base/spec' ;
@@ -154,6 +155,7 @@ export default class CodeSubmode extends Component<Signature> {
154
155
@service private declare environmentService: EnvironmentService ;
155
156
@service private declare realm: RealmService ;
156
157
@service private declare loaderService: LoaderService ;
158
+ @service private declare specPanelService: SpecPanelService ;
157
159
158
160
@tracked private loadFileError: string | null = null ;
159
161
@tracked private userHasDismissedURLError = false ;
@@ -530,6 +532,7 @@ export default class CodeSubmode extends Component<Signature> {
530
532
fieldName ,
531
533
onLocalSelection: this .updateCursorByName ,
532
534
});
535
+ this .specPanelService .setSelection (null );
533
536
}
534
537
535
538
private loadScopedCSS = restartableTask (async () => {
@@ -1034,6 +1037,7 @@ export default class CodeSubmode extends Component<Signature> {
1034
1037
{{#if this . showSpecPreview }}
1035
1038
<SpecPreview
1036
1039
@ selectedDeclaration ={{this .selectedDeclaration }}
1040
+ @ isLoadingNewModule ={{this .moduleContentsResource.isLoadingNewModule }}
1037
1041
@ onPlaygroundAccordionToggle ={{fn
1038
1042
this . selectAccordionItem
1039
1043
' playground'
0 commit comments