Skip to content

Query Fan-out: open on the "By prompt" view by default #445

Closed

Description

@gkhngyk

Problem

The Query Fan-out tab on the prompts page opens on the High frequency view — a flat list of every observed sub-query sorted by how often it was searched. Users orient themselves by their own tracked prompts, so the more natural entry point is the By prompt view, which groups the observed sub-queries under the prompt whose answers triggered them. High frequency remains valuable as the second, exploratory view.

Fix

In web/src/app/[locale]/(dashboard)/dashboard/prompts/_fanout-tab.tsx, the view state defaults to 'frequency':

const [view, setView] = useState<View>('frequency');

Change the default to 'by-prompt'. While you're there, swap the order of the two toggle buttons in the card header so the default view ("By prompt") is the left/first option — the current order puts "High frequency" first.

No other behavior should change: the toggle still switches views, and the empty state (no fan-out captured yet) renders the same regardless of the selected view.

Acceptance criteria

  • Opening Prompts → Query Fan-out shows the By prompt grouping by default.
  • The By prompt toggle button comes first, High frequency second; switching between them works as before.
  • The empty state and the per-view descriptions under the title are unchanged.

Getting started

See CONTRIBUTING.md for setup. From web/, yarn lint, yarn typecheck and yarn format:check must pass. Comment here to claim the issue before opening a PR.

Activity

  1. added
    enhancement
    good first issue
    on Jul 16, 2026
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

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions