diff --git a/Electrum.sqlite-journal b/Electrum.sqlite-journal new file mode 100644 index 0000000..2ed0965 Binary files /dev/null and b/Electrum.sqlite-journal differ diff --git a/src/tui/screens/ActionWizard.tsx b/src/tui/screens/ActionWizard.tsx index 04291ed..7fb12bd 100644 --- a/src/tui/screens/ActionWizard.tsx +++ b/src/tui/screens/ActionWizard.tsx @@ -250,6 +250,13 @@ export function ActionWizardScreen(): React.ReactElement { // Handle step-specific logic if (stepType === 'variables') { + // Validate that all required variables have values + const emptyVars = variables.filter(v => !v.value || v.value.trim() === ''); + if (emptyVars.length > 0) { + showError(`Please enter values for: ${emptyVars.map(v => v.name).join(', ')}`); + return; + } + // Create invitation and add variables await createInvitationWithVariables(); return; @@ -476,18 +483,30 @@ export function ActionWizardScreen(): React.ReactElement { }); }, []); + // Check if TextInput should have exclusive focus (variables step with content focus) + const textInputHasFocus = currentStepData?.type === 'variables' && focusArea === 'content'; + // Handle keyboard navigation useInput((input, key) => { + // When TextInput has focus, only handle Tab to navigate away + if (textInputHasFocus) { + if (key.tab) { + // Move to next variable or to buttons + if (focusedInput < variables.length - 1) { + setFocusedInput(prev => prev + 1); + } else { + setFocusArea('buttons'); + setFocusedButton('next'); + } + } + // Let TextInput handle all other input + return; + } + // Tab to switch between content and buttons if (key.tab) { if (focusArea === 'content') { // Handle tab based on current step type - if (currentStepData?.type === 'variables' && variables.length > 0) { - if (focusedInput < variables.length - 1) { - setFocusedInput(prev => prev + 1); - return; - } - } if (currentStepData?.type === 'inputs' && availableUtxos.length > 0) { if (selectedUtxoIndex < availableUtxos.length - 1) { setSelectedUtxoIndex(prev => prev + 1);