debug bind for upstream menu
- SHA
62f59978cafb5c86a98eb4cd9ec12c2cbdae9228- Parents
-
75b8f70 - Tree
4f8ba1d
62f5997
62f59978cafb5c86a98eb4cd9ec12c2cbdae922875b8f70
4f8ba1d| Status | File | + | - |
|---|---|---|---|
| M |
src/app.rs
|
14 | 0 |
| M |
src/main.rs
|
4 | 0 |
src/app.rsmodified@@ -393,6 +393,20 @@ impl App { | ||
| 393 | 393 | self.input_mode = InputMode::Navigation; |
| 394 | 394 | } |
| 395 | 395 | |
| 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 | + | |
| 396 | 410 | /// Create a commit |
| 397 | 411 | pub fn commit(&mut self, message: &str) -> Result<()> { |
| 398 | 412 | self.repo.commit(message)?; |
src/main.rsmodified@@ -215,6 +215,10 @@ fn handle_navigation_key(app: &mut App, code: KeyCode, modifiers: KeyModifiers) | ||
| 215 | 215 | Err(e) => app.set_status(format!("Push failed: {}", e)), |
| 216 | 216 | } |
| 217 | 217 | } |
| 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 | + } | |
| 218 | 222 | KeyCode::Char('m') if app.mode == AppMode::Git => { |
| 219 | 223 | app.enter_commit_mode(false); |
| 220 | 224 | } |