@@ -167,6 +167,13 @@ export class DetailsPanel extends LitElement {
167167 color: var(--color-foreground--85);
168168 }
169169
170+ .change-details.composition-summary {
171+ border: 0.1rem solid var(--vscode-panel-border);
172+ border-radius: 0.3rem;
173+ padding: 1.6rem;
174+ gap: 0;
175+ }
176+
170177 .empty-state {
171178 margin-block: 0;
172179 font-weight: bold;
@@ -710,9 +717,10 @@ export class DetailsPanel extends LitElement {
710717 return html `
711718 < article class ="change-details " data-commit-id =${ commit . id } >
712719 < gl-commit-message
713- .message =${ commit . message }
720+ .message =${ commit . message . content }
714721 .commitId =${ commit . id }
715722 .explanation=${ commit . aiExplanation }
723+ ?ai-generated=${ commit . message . isGenerated }
716724 ?generating=${ this . generatingCommitMessage === commit . id }
717725 ?ai-enabled=${ this . aiEnabled }
718726 .aiDisabledReason=${ this . aiDisabledReason }
@@ -764,7 +772,7 @@ export class DetailsPanel extends LitElement {
764772 const summaryMarkdown = generateComposerMarkdown ( this . commits , this . hunks ) ;
765773
766774 return html `
767- < article class ="change-details ">
775+ < article class ="change-details composition-summary ">
768776 < gl-markdown density ="document " .markdown =${ summaryMarkdown } > </ gl-markdown >
769777 </ article >
770778 ` ;
@@ -774,7 +782,7 @@ export class DetailsPanel extends LitElement {
774782 // Handle no changes state
775783 if ( ! this . hasChanges ) {
776784 return html `
777- < div class ="details-panel ">
785+ < div class ="details-panel " @click = ${ this . handlePanelClick } >
778786 < div class ="changes-list scrollable "> ${ this . renderNoChangesState ( ) } </ div >
779787 </ div >
780788 ` ;
@@ -783,12 +791,29 @@ export class DetailsPanel extends LitElement {
783791 const isMultiSelect = this . selectedCommits . length > 1 ;
784792
785793 return html `
786- < div class ="details-panel ${ isMultiSelect ? 'split-view' : '' } ">
794+ < div class ="details-panel ${ isMultiSelect ? 'split-view' : '' } " @click = ${ this . handlePanelClick } >
787795 < div class ="changes-list scrollable "> ${ this . renderDetails ( ) } </ div >
788796 </ div >
789797 ` ;
790798 }
791799
800+ private handlePanelClick ( e : MouseEvent ) {
801+ const target = e . target as HTMLElement ;
802+ const tagName = target . tagName . toLowerCase ( ) ;
803+
804+ const interactiveTags = [ 'input' , 'textarea' , 'button' , 'a' , 'select' , 'gl-button' , 'gl-commit-message' ] ;
805+ const isInteractive =
806+ interactiveTags . includes ( tagName ) ||
807+ target . closest ( 'gl-commit-message, gl-button, button, a, input, textarea, select' ) ;
808+
809+ if ( ! isInteractive ) {
810+ const activeElement = this . shadowRoot ?. activeElement ;
811+ if ( activeElement && 'blur' in activeElement && typeof activeElement . blur === 'function' ) {
812+ activeElement . blur ( ) ;
813+ }
814+ }
815+ }
816+
792817 private renderNoChangesState ( ) {
793818 return html `
794819 < div class ="no-changes-state ">
0 commit comments