@@ -109,6 +109,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
110 return a, tea.Batch(cmds...)
110 return a, tea.Batch(cmds...)
111 case tea.WindowSizeMsg:
111 case tea.WindowSizeMsg:
112+ a.wWidth, a.wHeight = msg.Width, msg.Height
112 a.completions.Update(msg)
113 a.completions.Update(msg)
113 return a, a.handleWindowResize(msg.Width, msg.Height)
114 return a, a.handleWindowResize(msg.Width, msg.Height)
@@ -269,7 +270,6 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
269// handleWindowResize processes window resize events and updates all components.
270// handleWindowResize processes window resize events and updates all components.
270func (a *appModel) handleWindowResize(width, height int) tea.Cmd {
271func (a *appModel) handleWindowResize(width, height int) tea.Cmd {
271 var cmds []tea.Cmd
272 var cmds []tea.Cmd
272− a.wWidth, a.wHeight = width, height
273 if a.showingFullHelp {
273 if a.showingFullHelp {
274 height -= 5
274 height -= 5
@@ -400,6 +400,26 @@ func (a *appModel) moveToPage(pageID page.PageID) tea.Cmd {
401// View renders the complete application interface including pages, dialogs, and overlays.
401// View renders the complete application interface including pages, dialogs, and overlays.
402func (a *appModel) View() tea.View {
402func (a *appModel) View() tea.View {
404+ t := styles.CurrentTheme()
405+ view.BackgroundColor = t.BgBase
406+ if a.wWidth < 25 || a.wHeight < 15 {
407+ view.Layer = lipgloss.NewCanvas(
409+ t.S().Base.Width(a.wWidth).Height(a.wHeight).
410+ Align(lipgloss.Center, lipgloss.Center).
414+ Background(t.BgSubtle).
415+ Foreground(t.White).
416+ Render("Too small!"),
403 page := a.pages[a.currentPage]
423 page := a.pages[a.currentPage]
404 if withHelp, ok := page.(core.KeyMapHelp); ok {
424 if withHelp, ok := page.(core.KeyMapHelp); ok {
405 a.status.SetKeyMap(withHelp.Help())
425 a.status.SetKeyMap(withHelp.Help())
@@ -446,10 +466,7 @@ func (a *appModel) View() tea.View {
446 layers...,
466 layers...,
450− t := styles.CurrentTheme()
451 view.Layer = canvas
469 view.Layer = canvas
452− view.BackgroundColor = t.BgBase
453 view.Cursor = cursor
470 view.Cursor = cursor
454 return view
471 return view