@@ -86,7 +86,7 @@ describe("config resolution", () => {
8686 } ) ;
8787 } ) ;
8888
89- test ( "falls back to the global config path outside a repo " , ( ) => {
89+ test ( "defaults unspecified themes to graphite, including piped pager-style patch input " , ( ) => {
9090 const home = createTempDir ( "hunk-config-home-" ) ;
9191 const cwd = createTempDir ( "hunk-config-cwd-" ) ;
9292
@@ -96,6 +96,7 @@ describe("config resolution", () => {
9696 } ) ;
9797
9898 expect ( resolved . repoConfigPath ) . toBeUndefined ( ) ;
99+ expect ( resolved . input . options . theme ) . toBe ( "graphite" ) ;
99100 } ) ;
100101
101102 test ( "command-specific config sections also apply to show mode" , ( ) => {
@@ -196,4 +197,28 @@ describe("config resolution", () => {
196197 expect ( bootstrap . initialShowHunkHeaders ) . toBe ( false ) ;
197198 expect ( bootstrap . initialShowAgentNotes ) . toBe ( true ) ;
198199 } ) ;
200+
201+ test ( "loadAppBootstrap exposes graphite when no theme is configured" , async ( ) => {
202+ const home = createTempDir ( "hunk-config-home-" ) ;
203+ const repo = createTempDir ( "hunk-config-repo-" ) ;
204+ createRepo ( repo ) ;
205+
206+ const before = join ( repo , "before.ts" ) ;
207+ const after = join ( repo , "after.ts" ) ;
208+ writeFileSync ( before , "export const alpha = 1;\n" ) ;
209+ writeFileSync ( after , "export const alpha = 2;\n" ) ;
210+
211+ const resolved = resolveConfiguredCliInput (
212+ {
213+ kind : "diff" ,
214+ left : before ,
215+ right : after ,
216+ options : { } ,
217+ } ,
218+ { cwd : repo , env : { HOME : home } } ,
219+ ) ;
220+ const bootstrap = await loadAppBootstrap ( resolved . input ) ;
221+
222+ expect ( bootstrap . initialTheme ) . toBe ( "graphite" ) ;
223+ } ) ;
199224} ) ;
0 commit comments