Skip to content

feat(prompts): put the Tracked/Suggestions switch above the date range - #1008

Merged
gkhngyk merged 2 commits into
ansvisor:mainfrom
cihan-gyk:feature/prompts-control-order
Oct 13, 2026
Merged

gkhngyk merged 2 commits into
ansvisor:mainfrom
cihan-gyk:feature/prompts-control-order

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

On the Prompts page the controls read, top to bottom: section tabs → date range + location → Tracked Prompts / Prompt Suggestions → table. Users picked a period before choosing which list they were looking at. This PR moves the list switch up so the page goes from general to specific:

  1. Prompts · Query Fan-out · Insights: which area
  2. Tracked Prompts · Prompt Suggestions: which list (only on the Prompts tab)
  3. Date Range + Location: which period and market
  4. The table

Only the order changes. The switch keeps its existing segmented-control style, which already reads as secondary to the section tabs. State and URL params (?tab=, ?view=, ?range=) are unchanged, so existing links keep working, and the selected range and location stay put when switching lists.

Related issue

None. Product task PROMPT-010 ("Top-down order: section tabs → list switch → date range").

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

  1. Open Prompts: the order is section tabs, Tracked/Suggestions switch, Date Range + Location, then the table.
  2. Pick 7d, then switch to Prompt Suggestions: 7d stays selected and the URL keeps range=7d.
  3. Open Query Fan-out: the date range sits directly under the section tabs, with no gap where the switch was.
  4. Open Insights: unchanged.

Notes for reviewers

  • The task spec also mentions a date range on Insights. The page deliberately hides it there (keyword volume estimates have no date dimension, see the existing comment). This PR keeps that behavior, since the task is scoped to "only the order and spacing change".
  • Independent of feat(prompts): keep the prompts table header and Prompt column pinned while scrolling #1007 (sticky table header). Both touch prompts/page.tsx but in different places, so they merge cleanly in either order.
  • No new unit test: the change only moves JSX, with no logic to assert. I checked all three tabs in the browser.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

yarn test (466 passed) and yarn build (with the CI placeholder env) also pass.

🤖 Generated with Claude Code

The list switch came after the date range and location filters, so users
picked a period before choosing which list they were looking at. The
Prompts page now reads from general to specific: section tabs, list
switch, date range + location, then the table. The switch only renders on
the Prompts tab, so Query Fan-out keeps the date range right under the
section tabs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

@gkhngyk this is ready for review too. Could you approve the CI workflows here as well so the checks can run?

The switch now sits directly in the Tabs root, a flex column, which stretched it across the page. w-fit keeps it to its buttons, as TabsList does.

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks. I pushed one fix: the switch now sits in the Tabs root, a flex column, so it stretched across the page; w-fit keeps it to its buttons.

@gkhngyk
gkhngyk merged commit d52808a into ansvisor:main Oct 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants