@@ -354,40 +354,63 @@ impl AnimationEngine {
354354 self . last_update = Instant :: now ( ) ;
355355 self . pause_until = None ;
356356
357- // Time travel to commit date
358- let parent_hash = format ! ( "{}^" , & metadata. hash[ ..7 ] ) ;
359- let datetime_str = metadata. date . format ( "%Y-%m-%d %H:%M:%S" ) . to_string ( ) ;
360- self . add_terminal_command ( & format ! ( "time-travel {}" , datetime_str) ) ;
361- self . steps . push ( AnimationStep :: Pause {
362- multiplier : CHECKOUT_PAUSE ,
363- } ) ;
364- self . steps . push ( AnimationStep :: TerminalOutput {
365- text : "⚡ Initializing temporal displacement field..." . to_string ( ) ,
366- } ) ;
367- self . steps . push ( AnimationStep :: Pause {
368- multiplier : CHECKOUT_OUTPUT_PAUSE * 0.5 ,
369- } ) ;
370- self . steps . push ( AnimationStep :: TerminalOutput {
371- text : "✨ Warping through spacetime..." . to_string ( ) ,
372- } ) ;
373- self . steps . push ( AnimationStep :: Pause {
374- multiplier : CHECKOUT_OUTPUT_PAUSE * 0.5 ,
375- } ) ;
376- self . steps . push ( AnimationStep :: TerminalOutput {
377- text : format ! ( "🕰️ Arrived at {}" , datetime_str) ,
378- } ) ;
379- self . steps . push ( AnimationStep :: TerminalOutput {
380- text : format ! (
381- "📍 Location: commit {} by {}" ,
382- & metadata. hash[ ..7 ] ,
383- metadata. author
384- ) ,
385- } ) ;
386- self . steps . push ( AnimationStep :: Pause {
387- multiplier : CHECKOUT_OUTPUT_PAUSE ,
388- } ) ;
389-
390- // Apply new metadata after time-travel animation
357+ // Check if this is a working tree diff (not a real commit)
358+ let is_working_tree = metadata. hash == "working-tree" ;
359+
360+ if is_working_tree {
361+ // Simplified intro for working tree diffs
362+ self . add_terminal_command ( "git diff --stat" ) ;
363+ self . steps . push ( AnimationStep :: Pause {
364+ multiplier : CHECKOUT_PAUSE ,
365+ } ) ;
366+ self . steps . push ( AnimationStep :: TerminalOutput {
367+ text : format ! ( "📝 {}" , metadata. message) ,
368+ } ) ;
369+ self . steps . push ( AnimationStep :: TerminalOutput {
370+ text : format ! (
371+ "📁 {} file{} changed" ,
372+ metadata. changes. len( ) ,
373+ if metadata. changes. len( ) == 1 { "" } else { "s" }
374+ ) ,
375+ } ) ;
376+ self . steps . push ( AnimationStep :: Pause {
377+ multiplier : CHECKOUT_OUTPUT_PAUSE ,
378+ } ) ;
379+ } else {
380+ // Time travel to commit date
381+ let datetime_str = metadata. date . format ( "%Y-%m-%d %H:%M:%S" ) . to_string ( ) ;
382+ self . add_terminal_command ( & format ! ( "time-travel {}" , datetime_str) ) ;
383+ self . steps . push ( AnimationStep :: Pause {
384+ multiplier : CHECKOUT_PAUSE ,
385+ } ) ;
386+ self . steps . push ( AnimationStep :: TerminalOutput {
387+ text : "⚡ Initializing temporal displacement field..." . to_string ( ) ,
388+ } ) ;
389+ self . steps . push ( AnimationStep :: Pause {
390+ multiplier : CHECKOUT_OUTPUT_PAUSE * 0.5 ,
391+ } ) ;
392+ self . steps . push ( AnimationStep :: TerminalOutput {
393+ text : "✨ Warping through spacetime..." . to_string ( ) ,
394+ } ) ;
395+ self . steps . push ( AnimationStep :: Pause {
396+ multiplier : CHECKOUT_OUTPUT_PAUSE * 0.5 ,
397+ } ) ;
398+ self . steps . push ( AnimationStep :: TerminalOutput {
399+ text : format ! ( "🕰️ Arrived at {}" , datetime_str) ,
400+ } ) ;
401+ self . steps . push ( AnimationStep :: TerminalOutput {
402+ text : format ! (
403+ "📍 Location: commit {} by {}" ,
404+ & metadata. hash[ ..7 ] ,
405+ metadata. author
406+ ) ,
407+ } ) ;
408+ self . steps . push ( AnimationStep :: Pause {
409+ multiplier : CHECKOUT_OUTPUT_PAUSE ,
410+ } ) ;
411+ }
412+
413+ // Apply new metadata after intro animation
391414 self . steps . push ( AnimationStep :: ResetState ) ;
392415
393416 // Sort file changes to match FileTree display order (directory -> filename)
@@ -527,65 +550,74 @@ impl AnimationEngine {
527550 }
528551 }
529552
530- // Git commit
531- let commit_message = metadata. message . lines ( ) . next ( ) . unwrap_or ( "Update" ) ;
532- self . add_terminal_command ( & format ! ( "git commit -m \" {}\" " , commit_message) ) ;
533- self . steps . push ( AnimationStep :: Pause {
534- multiplier : GIT_COMMIT_PAUSE ,
535- } ) ;
536- self . steps . push ( AnimationStep :: TerminalOutput {
537- text : format ! ( "💾 [main {}] {}" , & metadata. hash[ ..7 ] , commit_message) ,
538- } ) ;
539- self . steps . push ( AnimationStep :: TerminalOutput {
540- text : format ! (
541- "📝 {} file{} changed - immortalized forever!" ,
542- metadata. changes. len( ) ,
543- if metadata. changes. len( ) == 1 { "" } else { "s" }
544- ) ,
545- } ) ;
546- self . steps . push ( AnimationStep :: Pause {
547- multiplier : COMMIT_OUTPUT_PAUSE ,
548- } ) ;
549-
550- // Git push
551- self . add_terminal_command ( "git push origin main" ) ;
552- self . steps . push ( AnimationStep :: Pause {
553- multiplier : GIT_PUSH_PAUSE ,
554- } ) ;
555- self . steps . push ( AnimationStep :: TerminalOutput {
556- text : "🚀 Launching code into the cloud..." . to_string ( ) ,
557- } ) ;
558- self . steps . push ( AnimationStep :: Pause {
559- multiplier : PUSH_OUTPUT_PAUSE ,
560- } ) ;
561- self . steps . push ( AnimationStep :: TerminalOutput {
562- text : "📦 Compressing digital dreams: 100% (5/5)" . to_string ( ) ,
563- } ) ;
564- self . steps . push ( AnimationStep :: Pause {
565- multiplier : PUSH_OUTPUT_PAUSE ,
566- } ) ;
567- self . steps . push ( AnimationStep :: TerminalOutput {
568- text : "✍️ Signing with invisible ink: done." . to_string ( ) ,
569- } ) ;
570- self . steps . push ( AnimationStep :: Pause {
571- multiplier : GIT_PUSH_PAUSE ,
572- } ) ;
573- self . steps . push ( AnimationStep :: TerminalOutput {
574- text : "📡 Beaming to origin/main via satellite..." . to_string ( ) ,
575- } ) ;
576- self . steps . push ( AnimationStep :: Pause {
577- multiplier : PUSH_OUTPUT_PAUSE ,
578- } ) ;
579- self . steps . push ( AnimationStep :: TerminalOutput {
580- text : format ! (
581- " {}..{} ✨ SUCCESS" ,
582- & parent_hash[ ..7 ] ,
583- & metadata. hash[ ..7 ]
584- ) ,
585- } ) ;
586- self . steps . push ( AnimationStep :: Pause {
587- multiplier : PUSH_FINAL_PAUSE ,
588- } ) ;
553+ // Skip git commit/push animation for working tree diffs
554+ if is_working_tree {
555+ // Just add a final pause for working tree mode
556+ self . steps . push ( AnimationStep :: Pause {
557+ multiplier : PUSH_FINAL_PAUSE ,
558+ } ) ;
559+ } else {
560+ // Git commit
561+ let parent_hash = format ! ( "{}^" , & metadata. hash[ ..7 ] ) ;
562+ let commit_message = metadata. message . lines ( ) . next ( ) . unwrap_or ( "Update" ) ;
563+ self . add_terminal_command ( & format ! ( "git commit -m \" {}\" " , commit_message) ) ;
564+ self . steps . push ( AnimationStep :: Pause {
565+ multiplier : GIT_COMMIT_PAUSE ,
566+ } ) ;
567+ self . steps . push ( AnimationStep :: TerminalOutput {
568+ text : format ! ( "💾 [main {}] {}" , & metadata. hash[ ..7 ] , commit_message) ,
569+ } ) ;
570+ self . steps . push ( AnimationStep :: TerminalOutput {
571+ text : format ! (
572+ "📝 {} file{} changed - immortalized forever!" ,
573+ metadata. changes. len( ) ,
574+ if metadata. changes. len( ) == 1 { "" } else { "s" }
575+ ) ,
576+ } ) ;
577+ self . steps . push ( AnimationStep :: Pause {
578+ multiplier : COMMIT_OUTPUT_PAUSE ,
579+ } ) ;
580+
581+ // Git push
582+ self . add_terminal_command ( "git push origin main" ) ;
583+ self . steps . push ( AnimationStep :: Pause {
584+ multiplier : GIT_PUSH_PAUSE ,
585+ } ) ;
586+ self . steps . push ( AnimationStep :: TerminalOutput {
587+ text : "🚀 Launching code into the cloud..." . to_string ( ) ,
588+ } ) ;
589+ self . steps . push ( AnimationStep :: Pause {
590+ multiplier : PUSH_OUTPUT_PAUSE ,
591+ } ) ;
592+ self . steps . push ( AnimationStep :: TerminalOutput {
593+ text : "📦 Compressing digital dreams: 100% (5/5)" . to_string ( ) ,
594+ } ) ;
595+ self . steps . push ( AnimationStep :: Pause {
596+ multiplier : PUSH_OUTPUT_PAUSE ,
597+ } ) ;
598+ self . steps . push ( AnimationStep :: TerminalOutput {
599+ text : "✍️ Signing with invisible ink: done." . to_string ( ) ,
600+ } ) ;
601+ self . steps . push ( AnimationStep :: Pause {
602+ multiplier : GIT_PUSH_PAUSE ,
603+ } ) ;
604+ self . steps . push ( AnimationStep :: TerminalOutput {
605+ text : "📡 Beaming to origin/main via satellite..." . to_string ( ) ,
606+ } ) ;
607+ self . steps . push ( AnimationStep :: Pause {
608+ multiplier : PUSH_OUTPUT_PAUSE ,
609+ } ) ;
610+ self . steps . push ( AnimationStep :: TerminalOutput {
611+ text : format ! (
612+ " {}..{} ✨ SUCCESS" ,
613+ & parent_hash[ ..7 ] ,
614+ & metadata. hash[ ..7 ]
615+ ) ,
616+ } ) ;
617+ self . steps . push ( AnimationStep :: Pause {
618+ multiplier : PUSH_FINAL_PAUSE ,
619+ } ) ;
620+ }
589621
590622 // Start with empty editor (no file opened yet)
591623 self . buffer = EditorBuffer :: new ( ) ;
0 commit comments