Repository navigation
Closed
Labels
enhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is needed
Description
Summary
Turn the current Query Fan-out table into a High frequency table that pages 10 rows at a time. Today the tab renders every observed sub-query in one long list; on brands with a lot of fan-out that's a wall of rows. It's already sorted by Times searched (most-searched first), so paginating at 10/page means page 1 is the 10 highest-frequency sub-queries, page 2 the next 10, and so on, with numbered page controls (1 2 3 4 …).
What to change
- Frame the existing table on the Query Fan-out tab as High frequency (heading/label), keeping the default sort by Times searched descending.
- Paginate at 10 rows per page with numbered page navigation.
- Reset to page 1 when the active brand changes and after a successful track (so the flipped/updated list starts from the top).
Where
web/src/app/[locale]/(dashboard)/dashboard/prompts/_fanout-tab.tsx— the table + apagestate + a page-controls footer.web/src/lib/actions/fanout.ts—getQueryFanoutalready returnssubQueriessorted bytimesSearcheddesc, so pagination can be client-side (slice the array by page). No action change needed for v1.
Notes
- Fan-out is sparse (mostly Copilot/Perplexity, per feat(tracking): capture & store observed query fan-out (Cloro searchQueries / search_model_queries) #332), so client-side pagination over the already-sorted array is fine; move to server-side paging only if a brand's list grows large enough to matter.
- Pairs with the sibling "Query Fanouts by Prompts" view (separate issue) — the two are the two lenses of the Query Fan-out tab (a "High frequency" / "By prompt" toggle would let them share the tab).
- Depends on the Query Fan-out feature (feat(prompts): Query Fan-out tab — observed sub-queries with times-searched + one-click track #342 / feat(prompts): Query Fan-out tab — observed engine sub-queries with times-searched + one-click track #333).
How to test
- On a brand with more than 10 observed sub-queries,
/dashboard/prompts?tab=fanoutshows 10 rows with page controls (1 2 3 4 …); page 1 is the 10 highest Times searched. - Paging forward/back shows the next/previous 10 in the same sort order.
- Switching brand or tracking a sub-query resets to page 1.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is needed
Activity
Maqbool61 commentedon Jul 6, 2026
Hi @gkhngyk 👋 — I'd like to take this one. #342 is merged so the dependency is live. I'll add client-side pagination (10 per page) with numbered controls, reset on brand change and after a successful track, and rename the heading to "High frequency". Single file change in
_fanout-tab.tsx.gkhngyk commentedon Jul 6, 2026
Thanks @Maqbool61 — assigned to you! 🎉 Your plan is spot on: client-side pagination (10/page) with numbered controls, reset on brand change + after a successful track, and the "High frequency" heading, all in
_fanout-tab.tsx.Heads-up: PR #353 (the intent column) also touches
_fanout-tab.tsxand isn't merged yet — you may want to branch offmainafter it lands to avoid a conflict, but it's a small file so a rebase is easy either way. Ping here if anything's unclear.feat(prompts): paginate High frequency table 10/page with numbered co…