Skip to content

AI chat model overlay: show download progress, and keep the overlay when the tab is switched away and back #3841

Closed

Description

@malibio

Problem

Selecting a model in an AI chat's dropdown that isn't downloaded yet shows only a generic "Preparing model…" overlay with an indeterminate spinner. The overlay (ai-chat-native-node-viewer.svelte) has phases for "Verifying model integrity…" and "Loading model…" but none for downloading, so a multi-GB download looks like a hang.

Separately, if the user switches away from the chat tab while the model is loading and then returns, the overlay is gone even though the model is still being prepared, so the chat looks ready when it isn't.

Changes

  • Add a downloading phase to the model-load overlay, fed from the existing download state in model-store.svelte.ts (the one settings/model-manager.svelte uses): "Downloading … 42% (1.2 of 4.5 GB)", then verifying, then loading.
  • Derive the overlay from the store's current model-readiness state rather than component-local state, so it survives the tab being deactivated and reactivated. Check first whether the overlay's isEnsuringModel is local to the viewer and is reset when the tab remounts.
  • Consider a cancel action for large downloads.
  • Check first whether ensureModelReady reports download progress or only start and finish; if only the latter, it needs to.

Acceptance Criteria

  • An undownloaded model shows download progress with size and percentage
  • The overlay moves through downloading, verifying and loading, each labelled
  • A cached model skips the download phase
  • Switching to another tab and back while a model is preparing still shows the overlay, at the current phase
  • A failed or cancelled download leaves the chat usable and says why
  • Tests cover each phase's label and the tab switch

Activity

  1. self-assigned this
    on Oct 20, 2026
  2. mstomar125 commented on Oct 20, 2026

    @mstomar125
    Contributor

    Taking this for core v0.3.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions