tenseleyflow/fussr / 62f5997

Browse files

debug bind for upstream menu

Authored by espadonne
SHA
62f59978cafb5c86a98eb4cd9ec12c2cbdae9228
Parents
75b8f70
Tree
4f8ba1d

2 changed files

StatusFile+-
M src/app.rs 14 0
M src/main.rs 4 0
src/app.rsmodified
@@ -393,6 +393,20 @@ impl App {
393393
         self.input_mode = InputMode::Navigation;
394394
     }
395395
 
396
+    /// Force show push modal (for testing)
397
+    pub fn show_push_modal(&mut self) {
398
+        let remotes = self.repo.get_remotes();
399
+        if remotes.is_empty() {
400
+            self.set_status("No remotes configured".to_string());
401
+            return;
402
+        }
403
+        self.input_mode = InputMode::Push {
404
+            remotes,
405
+            selected: 0,
406
+            status: crate::types::PushStatus::SelectRemote,
407
+        };
408
+    }
409
+
396410
     /// Create a commit
397411
     pub fn commit(&mut self, message: &str) -> Result<()> {
398412
         self.repo.commit(message)?;
src/main.rsmodified
@@ -215,6 +215,10 @@ fn handle_navigation_key(app: &mut App, code: KeyCode, modifiers: KeyModifiers)
215215
                 Err(e) => app.set_status(format!("Push failed: {}", e)),
216216
             }
217217
         }
218
+        KeyCode::Char('P') if app.mode == AppMode::Git => {
219
+            // Debug: Force show push modal regardless of upstream status
220
+            app.show_push_modal();
221
+        }
218222
         KeyCode::Char('m') if app.mode == AppMode::Git => {
219223
             app.enter_commit_mode(false);
220224
         }