Skip to content

Dashboard: LLM unconfigured empty state nudge for Ollama #235

@melagiri

Description

@melagiri

Summary

When no LLM provider is configured, the Insights and Patterns pages currently show empty/loading states with no explanation or call to action. Add a friendly nudge that surfaces Ollama as the zero-friction path to unlocking AI analysis — without blocking access to the rest of the dashboard.

Depends on: #234 (Ollama-first experience — auto-detect, model unification)


Problem

A user who installs Code Insights, runs code-insights sync, and opens the dashboard will see their sessions, activity charts, and cost data. But the Insights tab and Patterns tab will be empty or show a spinner that never resolves — because no LLM is configured.

There is currently no messaging explaining why, and no affordance to fix it. The user has to discover code-insights config llm on their own.

This is a missed "aha moment." The fix is a non-blocking nudge that:

  1. Explains why AI features are inactive
  2. Points to Ollama as the free, local, zero-setup path
  3. Offers a shortcut to configure

Proposed UX

On the Insights page (session detail view, AI analysis section) and Patterns page (reflect/weekly synthesis), when llmProvider is null or unconfigured in the user's settings:

Replace the empty/spinner state with a friendly callout:

No AI analysis configured

Install Ollama for free, local AI analysis — no API key or account needed.
Sessions, stats, and timeline are fully available without it.

[Install Ollama]  [Configure LLM]
  • "Install Ollama" links to https://ollama.com
  • "Configure LLM" opens the Settings page (or a modal) pre-scrolled to the LLM section
  • The callout is informational — not a modal, not a gate, not a wall
  • The rest of the dashboard remains fully functional: navigation, stats, activity charts, timeline, cost tracking all work unchanged

Design notes

  • Use a card or inline alert style consistent with existing shadcn/ui components
  • Should not flash on page load — only render after the settings query has resolved and confirmed no LLM is set
  • If the user dismisses the nudge, it should stay dismissed for the session (not persist across restarts — keep it visible as a helpful reminder on next open)

Acceptance Criteria

  • When no LLM is configured, the Insights page AI analysis section shows the nudge instead of an empty or perpetual loading state
  • When no LLM is configured, the Patterns page (reflect/weekly synthesis) shows the nudge instead of empty state
  • The nudge includes a link to https://ollama.com and a link/button to the Settings LLM config section
  • The rest of the dashboard (stats, timeline, activity, cost) is fully usable with no LLM configured — the nudge does not block navigation
  • The nudge does not appear once an LLM is configured (settings query has resolved with a valid provider)
  • The nudge does not flash on load — it renders only after the settings state is known
  • pnpm build passes from repo root with zero errors

Files Expected to Change

  • dashboard/src/pages/InsightsPage.tsx (or equivalent session detail component)
  • dashboard/src/pages/PatternsPage.tsx (or equivalent reflect component)
  • Possibly a new shared LLMNudge component in dashboard/src/components/

Size

M — UI-only change within the dashboard package. No CLI changes, no schema changes, no API changes. Two page components + one shared nudge component.

Notes

  • The auto-detect feature in Ollama-first experience: README callout, model list unification, auto-detect on sync #234 reduces how often this nudge appears (Ollama users get configured automatically on first sync). This nudge is the fallback for users who don't have Ollama and need to set up a paid provider, or who ran sync before Ollama was installed.
  • Do NOT implement this as a modal, interstitial, or anything that blocks dashboard use. The dashboard is valuable without LLM — analytics, session history, cost tracking all work. The nudge is additive, not a gate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions