@@ -38,8 +38,9 @@ type Splash interface {
3838}
3939
4040const (
41− SplashScreenPaddingX = 2 // Padding X for the splash screen
4241 SplashScreenPaddingY = 1 // Padding Y for the splash screen
42+
43+ LogoGap = 6
4344)
4445
4546// OnboardingCompleteMsg is sent when onboarding is complete
@@ -56,6 +57,7 @@ type splashCmp struct {
5657 needsAPIKey bool
5758 selectedNo bool
5859
60+ listHeight int
5961 modelList *models.ModelListComponent
6062 apiKeyInput *models.APIKeyInput
6163 selectedModel *models.ModelOption
@@ -134,11 +136,10 @@ func (s *splashCmp) SetSize(width int, height int) tea.Cmd {
134136 s.width = width
135137 s.logoRendered = s.logoBlock()
136138 }
137− infoSectionHeight := lipgloss.Height(s.infoSection())
138− listHeigh := min(40, height-(SplashScreenPaddingY*2)-lipgloss.Height(s.logoRendered)-2-infoSectionHeight)
139− listWidth := min(60, width-(SplashScreenPaddingX*2))
140−
141− return s.modelList.SetSize(listWidth, listHeigh)
139+ // remove padding, logo height, gap, title space
140+ s.listHeight = s.height - lipgloss.Height(s.logoRendered) - (SplashScreenPaddingY * 2) - s.logoGap() - 2
141+ listWidth := min(60, width)
142+ return s.modelList.SetSize(listWidth, s.listHeight)
142143}
143144
144145// Update implements SplashPage.
@@ -347,9 +348,8 @@ func (s *splashCmp) View() string {
347348 t := styles.CurrentTheme()
348349 var content string
349350 if s.needsAPIKey {
350− infoSection := s.infoSection()
351− remainingHeight := s.height - lipgloss.Height(s.logoRendered) - (SplashScreenPaddingY * 2) - lipgloss.Height(infoSection)
352− apiKeyView := s.apiKeyInput.View()
351+ remainingHeight := s.height - lipgloss.Height(s.logoRendered) - (SplashScreenPaddingY * 2)
352+ apiKeyView := t.S().Base.PaddingLeft(1).Render(s.apiKeyInput.View())
353353 apiKeySelector := t.S().Base.AlignVertical(lipgloss.Bottom).Height(remainingHeight).Render(
354354 lipgloss.JoinVertical(
355355 lipgloss.Left,
@@ -359,13 +359,11 @@ func (s *splashCmp) View() string {
359359 content = lipgloss.JoinVertical(
360360 lipgloss.Left,
361361 s.logoRendered,
362− infoSection,
363362 apiKeySelector,
364363 )
365364 } else if s.isOnboarding {
366− infoSection := s.infoSection()
367− remainingHeight := s.height - lipgloss.Height(s.logoRendered) - (SplashScreenPaddingY * 2) - lipgloss.Height(infoSection)
368365 modelListView := s.modelList.View()
366+ remainingHeight := s.height - lipgloss.Height(s.logoRendered) - (SplashScreenPaddingY * 2)
369367 modelSelector := t.S().Base.AlignVertical(lipgloss.Bottom).Height(remainingHeight).Render(
370368 lipgloss.JoinVertical(
371369 lipgloss.Left,
@@ -377,7 +375,6 @@ func (s *splashCmp) View() string {
377375 content = lipgloss.JoinVertical(
378376 lipgloss.Left,
379377 s.logoRendered,
380− infoSection,
381378 modelSelector,
382379 )
383380 } else if s.needsProjectInit {
@@ -441,8 +438,6 @@ func (s *splashCmp) View() string {
441438 Width(s.width).
442439 Height(s.height).
443440 PaddingTop(SplashScreenPaddingY).
444− PaddingLeft(SplashScreenPaddingX).
445− PaddingRight(SplashScreenPaddingX).
446441 PaddingBottom(SplashScreenPaddingY).
447442 Render(content)
448443}
@@ -476,40 +471,47 @@ func (s *splashCmp) infoSection() string {
476471
477472func (s *splashCmp) logoBlock() string {
478473 t := styles.CurrentTheme()
479− const padding = 2
480− return logo.Render(version.Version, false, logo.Opts{
481− FieldColor: t.Primary,
482− TitleColorA: t.Secondary,
483− TitleColorB: t.Primary,
484− CharmColor: t.Secondary,
485− VersionColor: t.Primary,
486− Width: s.width - (SplashScreenPaddingX * 2),
487− })
474+ return t.S().Base.Padding(0, 2).Width(s.width).Render(
475+ logo.Render(version.Version, false, logo.Opts{
476+ FieldColor: t.Primary,
477+ TitleColorA: t.Secondary,
478+ TitleColorB: t.Primary,
479+ CharmColor: t.Secondary,
480+ VersionColor: t.Primary,
481+ Width: s.width - 4,
482+ }),
483+ )
488484}
489485
490−func (m *splashCmp) moveCursor(cursor *tea.Cursor) *tea.Cursor {
486+func (s *splashCmp) moveCursor(cursor *tea.Cursor) *tea.Cursor {
491487 if cursor == nil {
492488 return nil
493489 }
494490 // Calculate the correct Y offset based on current state
495− logoHeight := lipgloss.Height(m.logoRendered)
496− infoSectionHeight := lipgloss.Height(m.infoSection())
497− baseOffset := logoHeight + SplashScreenPaddingY + infoSectionHeight
498− if m.needsAPIKey {
499− remainingHeight := m.height - baseOffset - lipgloss.Height(m.apiKeyInput.View()) - SplashScreenPaddingY
491+ logoHeight := lipgloss.Height(s.logoRendered)
492+ if s.needsAPIKey {
493+ infoSectionHeight := lipgloss.Height(s.infoSection())
494+ baseOffset := logoHeight + SplashScreenPaddingY + infoSectionHeight
495+ remainingHeight := s.height - baseOffset - lipgloss.Height(s.apiKeyInput.View()) - SplashScreenPaddingY
500496 offset := baseOffset + remainingHeight
501497 cursor.Y += offset
502− cursor.X = cursor.X + SplashScreenPaddingX
503− } else if m.isOnboarding {
504− listHeight := min(40, m.height-(SplashScreenPaddingY)-baseOffset)
505− offset := m.height - listHeight + 2
498+ cursor.X = cursor.X + 1
499+ } else if s.isOnboarding {
500+ offset := logoHeight + SplashScreenPaddingY + s.logoGap() + 3
506501 cursor.Y += offset
507− cursor.X = cursor.X + SplashScreenPaddingX + 1
502+ cursor.X = cursor.X + 1
508503 }
509504
510505 return cursor
511506}
512507
508+func (s *splashCmp) logoGap() int {
509+ if s.height > 35 {
510+ return LogoGap
511+ }
512+ return 0
513+}
514+
513515// Bindings implements SplashPage.
514516func (s *splashCmp) Bindings() []key.Binding {
515517 if s.needsAPIKey {
@@ -536,7 +538,7 @@ func (s *splashCmp) Bindings() []key.Binding {
536538}
537539
538540func (s *splashCmp) getMaxInfoWidth() int {
539− return min(s.width-(SplashScreenPaddingX*2), 40)
541+ return min(s.width, 40)
540542}
541543
542544func (s *splashCmp) cwd() string {