fix: banking shell screen rendering artifacts and transfer panic
Fix rendering issues where content from previous screens bled through when switching between views of different heights/widths: - Pad every line to full terminal width (ANSI-aware) so shorter lines overwrite leftover content from previous renders - Track terminal height via WindowSizeMsg and pad between content and footer to fill the screen - Send tea.ClearScreen on all screen transitions for height changes - Fix panic in transfer completion when routing number is < 4 chars Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -165,8 +165,12 @@ func (m transferModel) View() string {
|
||||
b.WriteString("\n\n")
|
||||
b.WriteString(titleStyle.Render(" TRANSFER QUEUED FOR PROCESSING"))
|
||||
b.WriteString("\n\n")
|
||||
routing := m.transfer.RoutingNumber
|
||||
if len(routing) > 4 {
|
||||
routing = routing[:4]
|
||||
}
|
||||
b.WriteString(baseStyle.Render(fmt.Sprintf(" CONFIRMATION #: WR-%s-%s",
|
||||
m.transfer.RoutingNumber[:4], "847291")))
|
||||
routing, "847291")))
|
||||
b.WriteString("\n")
|
||||
b.WriteString(baseStyle.Render(" STATUS: PENDING FEDWIRE SETTLEMENT"))
|
||||
b.WriteString("\n")
|
||||
|
||||
Reference in New Issue
Block a user