Skip to content

FEAT: Add lazy loading for email bodies #654

@andrinoff

Description

@andrinoff

Is your feature request related to a problem? All email bodies fetched eagerly when opening inbox. Wastes bandwidth and memory. Slow initial load for large inboxes.

Describe the solution you would like:

  • Fetch headers only initially
  • Load body on demand when viewing email
  • Show "Loading..." while fetching body
  • Cache loaded bodies in memory
  • Evict old bodies from cache (LRU)
  • Pre-fetch next/prev email for smooth navigation

Describe alternatives you have considered: Fetch all (current - slow). Lazy loading reduces initial load time.

Additional context:

  • Files: fetcher/fetcher.go, tui/email_view.go, config/cache.go
  • Need LRU cache implementation
  • Background pre-fetching for UX
  • Handle cache misses gracefully
  • Complexity: High - async loading + caching

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions