@@ -29,6 +29,10 @@ const confirmDialogStyles = readFileSync(
2929 `${ process . cwd ( ) } /src/components/ui/confirm-dialog/index.module.css` ,
3030 "utf8"
3131) ;
32+ const modalStylesheet = readFileSync (
33+ `${ process . cwd ( ) } /src/components/ui/modal/index.module.css` ,
34+ "utf8"
35+ ) ;
3236
3337function getLastGroupedRuleBlockFrom ( source : string , pattern : RegExp ) {
3438 const matches = Array . from ( source . matchAll ( pattern ) ) ;
@@ -613,6 +617,31 @@ describe("components.css theme-sensitive surfaces", () => {
613617 expect ( hasRuleBlock ( ".workspace-sidebar-panel__header .panel-header__title-row" ) ) . toBe ( false ) ;
614618 } ) ;
615619
620+ it ( "keeps dialog headers on the approved modal header contract" , ( ) => {
621+ const modalTitle = getLastRuleBlockFrom ( modalStylesheet , ".title" ) ;
622+ const dialogHeader =
623+ getRuleBlocksFrom ( modalStylesheet , ".dialogHeader" ) . find ( ( block ) =>
624+ block . includes ( "align-items: flex-start" )
625+ ) ?? "" ;
626+ const dialogIcon = getLastRuleBlock ( ".supervisor-dialog-header-icon" ) ;
627+ const editTone = getLastRuleBlock ( ".supervisor-dialog--edit .supervisor-dialog-header-icon" ) ;
628+ const disableTone = getLastRuleBlock (
629+ ".supervisor-dialog--disable .supervisor-dialog-header-icon"
630+ ) ;
631+
632+ expect ( modalTitle ) . toContain ( "font-size: var(--text-lg)" ) ;
633+ expect ( modalTitle ) . toContain ( "font-weight: var(--font-semibold)" ) ;
634+ expect ( dialogHeader ) . toContain ( "align-items: flex-start" ) ;
635+ expect ( dialogIcon ) . toContain ( "width: 28px" ) ;
636+ expect ( dialogIcon ) . toContain ( "height: 28px" ) ;
637+ expect ( editTone ) . toContain ( "var(--icon-surface-info)" ) ;
638+ expect ( editTone ) . toContain ( "var(--icon-info)" ) ;
639+ expect ( disableTone ) . toContain ( "var(--icon-surface-error)" ) ;
640+ expect ( disableTone ) . toContain ( "var(--icon-error)" ) ;
641+ expect ( hasRuleBlock ( ".supervisor-dialog-header" ) ) . toBe ( false ) ;
642+ expect ( hasRuleBlock ( ".supervisor-dialog-subtitle" ) ) . toBe ( false ) ;
643+ } ) ;
644+
616645 it ( "uses a unified inline sheet treatment for mobile selectors and keeps topbar controls height-aligned" , ( ) => {
617646 const inlineSheet = getLastRuleBlock ( ".mobile-inline-sheet" ) ;
618647 const inlineSheetAction = getLastRuleBlock ( ".mobile-inline-sheet__action" ) ;
0 commit comments