Skip to content

Design: one shared date range control across Visibility, Citations and Prompts #713

Closed

Description

@gkhngyk

Problem

The date range control looks and sits differently on Prompts than it does on Visibility and Citations. Three separate inconsistencies, not one:

Visibility (Insights) Citations Prompts
Options 24h · 7d · 30d · 90d · All · Custom 24h · 7d · 30d · 90d · All · Custom 7d · 30d · 90d
Label "Date Range" above the control "Date Range" above the control none
Placement in the filter bar, first control, bottom-aligned with the other filters same top right, opposite the tab bar
Styling flex rounded-md border overflow-hidden, buttons px-3 py-1.5 identical rounded-md border p-0.5, buttons rounded-sm px-2.5 py-1, different inactive colour

A user moving between the three pages meets the same concept in a different shape and a different place each time, and on Prompts cannot pick the windows the other two offer.

The underlying cause is worth fixing at the same time

Visibility and Citations are not merely similar — their markup is identical, and duplicated. The same segmented-button block, the same class strings, the same custom-range inputs, copy-pasted in two files:

So "make Prompts match" should not mean adding a third copy of the same CSS. Extract one DateRangeFilter component, adopt it in all three, and the inconsistency cannot come back the next time someone adds a page.

The decision this needs

Visual and placement parity is straightforward. The option set is not, and should be decided deliberately rather than by copying:

  • 24h, 7d, 30d, 90d map cleanly onto what Prompts already does — the page takes a days number and passes it to getPromptVisibilitySummaries.
  • All and Custom do not. They are date ranges, and the Prompts data path currently accepts only a day count, so supporting them means threading a from/to range through getPromptsPageData and the summaries query.

Recommended: adopt the shared component and the 24h/7d/30d/90d options now, and treat All/Custom on Prompts as a follow-up once the range plumbing is warranted. That gets full visual and positional consistency without a server-side change riding along in a design PR.

Also keep

The Insights tab on Prompts hides the range control on purpose — that tab shows keyword volume estimates, which have no date dimension, so a range there would be a control that changes nothing. That behaviour should survive the refactor.

Acceptance criteria

  • One shared date range component, used by Visibility, Citations and Prompts; no page keeps its own copy of the markup.
  • On all three pages the control carries the same label, the same styling, and the same position relative to the surrounding filters.
  • Prompts offers 24h, 7d, 30d, 90d; the existing URL sync (?range=) keeps working and the default stays 30 days.
  • Visibility and Citations behave exactly as they do today, including All and Custom and their custom from/to inputs.
  • The range control stays hidden on the Prompts Insights tab.

Activity

  1. added
    enhancement
    ai visibility
    citations
    prompts
    on Aug 12, 2026
  2. self-assigned this
    on Aug 12, 2026
  3. added a commit that references this issue on Aug 15, 2026
    9b9e2fd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ai visibilitycitationsenhancementprompts

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions