@@ -373,6 +373,16 @@ export function App({
373373 setWrapLines ( ( current ) => ! current ) ;
374374 } ;
375375
376+ /** Switch the active theme and surface the result in the shared footer notice area. */
377+ const selectTheme = useCallback (
378+ ( nextThemeId : string ) => {
379+ const nextTheme = themeOptions . find ( ( theme ) => theme . id === nextThemeId ) ;
380+ setThemeId ( nextThemeId ) ;
381+ showTransientNotice ( `Theme: ${ nextTheme ?. label ?? nextThemeId } ` ) ;
382+ } ,
383+ [ showTransientNotice , themeOptions ] ,
384+ ) ;
385+
376386 /** Toggle the sidebar, forcing it open on narrower layouts when the app can still fit both panes. */
377387 const toggleSidebar = ( ) => {
378388 if ( sidebarVisible && ( responsiveLayout . showSidebar || forceSidebarOpen ) ) {
@@ -596,12 +606,12 @@ export function App({
596606 setFocusArea ( "files" ) ;
597607 } , [ review . cancelDraftNote ] ) ;
598608
599- /** Cycle through the available built-in themes . */
609+ /** Cycle through the themes exposed by the current app configuration . */
600610 const cycleTheme = useCallback ( ( ) => {
601611 const currentIndex = themeOptions . findIndex ( ( theme ) => theme . id === activeTheme . id ) ;
602612 const nextIndex = ( currentIndex + 1 ) % themeOptions . length ;
603- setThemeId ( themeOptions [ nextIndex ] ! . id ) ;
604- } , [ activeTheme . id , themeOptions ] ) ;
613+ selectTheme ( themeOptions [ nextIndex ] ! . id ) ;
614+ } , [ activeTheme . id , selectTheme , themeOptions ] ) ;
605615
606616 const menus = useMemo (
607617 ( ) =>
@@ -617,7 +627,7 @@ export function App({
617627 refreshCurrentInput : triggerRefreshCurrentInput ,
618628 requestQuit,
619629 selectLayoutMode,
620- selectThemeId : setThemeId ,
630+ selectThemeId : selectTheme ,
621631 copyDecorations,
622632 showAgentNotes,
623633 showHelp,
@@ -647,6 +657,7 @@ export function App({
647657 requestQuit ,
648658 review . moveToHunk ,
649659 selectLayoutMode ,
660+ selectTheme ,
650661 triggerRefreshCurrentInput ,
651662 toggleCopyDecorations ,
652663 showAgentNotes ,
0 commit comments