@@ -277,6 +277,44 @@ describe("ObjectiveDialog", () => {
277277 expect ( closeButton ) . toHaveClass ( "modal-close" ) ;
278278 } ) ;
279279
280+ it ( "keeps the canonical dialog header anatomy for enable mode" , ( ) => {
281+ const store = createStore ( ) ;
282+ window . localStorage . setItem ( "ui.locale" , JSON . stringify ( "en" ) ) ;
283+ store . set ( localeAtom , "en" ) ;
284+ store . set ( wsClientAtom , { sendCommand : vi . fn ( ) } as never ) ;
285+ store . set (
286+ supervisorDialogAtom ,
287+ createDialogState ( {
288+ mode : "enable" ,
289+ draftObjective : "Ship phase 4B1" ,
290+ } )
291+ ) ;
292+ store . set ( supervisorsAtom , new Map ( ) ) ;
293+
294+ render (
295+ < Provider store = { store } >
296+ < ObjectiveDialog workspaceId = "ws-1" />
297+ </ Provider >
298+ ) ;
299+
300+ const dialog = screen . getByRole ( "dialog" ) ;
301+ const header = dialog . querySelector ( ".dialog-header" ) ;
302+ const leading = header ?. querySelector ( ".dialog-header__leading" ) ;
303+ const icon = header ?. querySelector ( ".dialog-header__icon" ) ;
304+ const copy = header ?. querySelector ( ".dialog-header__copy" ) ;
305+ const description = header ?. querySelector ( ".dialog-header__description" ) ;
306+ const closeButton = screen . getByRole ( "button" , { name : "Close" } ) ;
307+
308+ expect ( header ) . not . toBeNull ( ) ;
309+ expect ( leading ) . not . toBeNull ( ) ;
310+ expect ( icon ) . not . toBeNull ( ) ;
311+ expect ( copy ) . not . toBeNull ( ) ;
312+ expect ( description ) . toHaveTextContent (
313+ "Describe an objective and Supervisor will evaluate progress and suggest the next step after each turn."
314+ ) ;
315+ expect ( closeButton ) . toHaveClass ( "modal-close" ) ;
316+ } ) ;
317+
280318 it ( "renders footer actions with shared button compatibility classes" , ( ) => {
281319 const store = createStore ( ) ;
282320 window . localStorage . setItem ( "ui.locale" , JSON . stringify ( "en" ) ) ;
0 commit comments