Skip to content

Insights: Topic & Prompt Opportunities teaser cards in place of the removed results tree #459

Closed

Description

@gkhngyk

Problem

Once the "Prompt Results by Topic" tree is removed (#458), the bottom of the Insights page loses its section — and Insights currently offers analytics but no "so what, what should I do next?" step. The prompt/topic recommendations that answer that question live on the Prompts page's Insights tab, where they are easy to miss.

Depends on #458 — this fills the space that removal frees up.

Fix

Add a two-card Recommendations row at the bottom of Insights (web/src/app/[locale]/(dashboard)/dashboard/insights/page.tsx):

  • Topic Opportunities — top few similar-topic ideas (the SimilarTopicsList data on the Prompts page's Insights tab).
  • Prompt Opportunities — top few stored prompt suggestions (prompt_suggestions table, read via the existing prompt-suggestions action).

Each card gets a See all button navigating to the Prompts page.

Navigation — anchors must be created, and the tab comes from a query param

The proposed #topic-ai-recommendations / #ai-recommendations anchors do not exist today, and the Prompts page switches tabs via ?tab= (VALID_TABS in web/src/app/[locale]/(dashboard)/dashboard/prompts/page.tsx) — a bare hash link would land on tab=all where the target sections aren't rendered. So:

  • Add stable ids to the two sections on the Prompts page's Insights tab (e.g. id="topic-opportunities" on the SimilarTopics block, id="prompt-opportunities" on SuggestionsCard).
  • Link as /dashboard/prompts?tab=insights#topic-opportunities / ...#prompt-opportunities, and make sure the browser scrolls to the anchor after the tab content renders (a small effect that re-applies location.hash once the Insights tab mounts is enough).

Cheap reads only

Both cards must read stored data (suggestions are persisted and only generated on demand). No LLM call may be added to the Insights load path — the point of #458 was making this page lighter.

  • Empty state (no stored suggestions yet): show a short CTA ("Generate ideas →") linking to the same anchor, not a blank card.

Visual contract

The KPI row re-computes with the date filter; these cards do not. Keep them visually distinct — a separate "Recommendations" section heading, no delta badges — so they don't read as period-scoped metrics (see the reasoning in #457).

Acceptance criteria

  • Insights shows the two cards below the SoV row, each listing up to ~5 items with a See all button.
  • See all lands on the Prompts page with the Insights tab active and the correct section scrolled into view — including on a cold page load of that URL.
  • No new LLM or heavy fetches on Insights load; only bounded reads of stored suggestions/volumes.
  • With no stored data, cards show the generate CTA instead of rendering empty.
  • Cards carry no date-filter styling (no deltas), under a distinct Recommendations heading.

Getting started

See CONTRIBUTING.md for setup. From web/, yarn lint, yarn typecheck and yarn format:check must pass. This pairs naturally with #458 — claiming both together is welcome. Comment here to claim before opening a PR.

Activity

  1. added
    enhancement
    on Jul 17, 2026
  2. gkhngyk commented on Jul 17, 2026

    @gkhngyk
    ContributorAuthor

    Heads-up: #461 moves the Prompt Suggestions card to the All Prompts tab (top, above the table). If #461 lands first, the Prompt Opportunities "See all" link here should target /dashboard/prompts?tab=all#prompt-opportunities instead of the Insights-tab anchor. The Topic Opportunities link is unaffected.

  3. gkhngyk commented on Jul 17, 2026

    @gkhngyk
    ContributorAuthor

    Second link-target update: #463 makes the Topics page the canonical home of topic suggestions (persisted card with id="topic-opportunities"). If #463 lands, the Topic Opportunities "See all" here should target /dashboard/topics#topic-opportunities instead of the Prompts page's similar-topics section. Combined with the earlier note about #461, both See-all targets may end up outside ?tab=insights.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions