Repository navigation
Description
Problem
On the Content Optimization page (/dashboard/content), the whole opportunity list flashes to its loading skeleton on almost every interaction — changing a filter (Status / Impact / Type) or running a bulk action (Done / Dismiss all / Send all) briefly wipes the list and re-renders skeletons. It's jarring and makes the page feel like it fully reloads each time. The skeleton should only show on the initial load; subsequent refreshes should update the list in place.
Root cause (from the code)
In web/src/app/[locale]/(dashboard)/dashboard/content/page.tsx:
loadDataalways starts withsetLoading(true), and the list render is gated on thatloadingflag (skeletons while true).loadDatais auseCallbackwhose deps includestatusFilter,impactFilter,typeFilter, so changing any filter recreates it, and theuseEffect(() => { loadData() }, [loadData])re-runs it — full skeleton every filter change.- The bulk handlers (
handleBulkDone,handleBulkDismiss,handleBulkSend) eachawait loadData()afterward — full skeleton after every bulk action too.
So every filter change and every bulk action toggles the full-page skeleton.
Proposed change
Distinguish the initial load from re-fetches, so only the first load shows the skeleton:
- Add a
{ silent }option toloadDatathat skipssetLoading(true)(mirrors the pattern the Insights page already uses:loadData(overrideFilters, { silent })). - Call the silent variant for filter-change refreshes and after bulk actions, keeping the current list visible while it updates (optionally a subtle inline/“refreshing” indicator instead of the skeleton).
Alternatively (simpler), only render the skeleton when the list is actually empty — e.g. gate it on loading && opportunities.length === 0 — so a populated list stays put during a refetch.
How to test
- Load
/dashboard/content→ the skeleton shows once on first load. - Change the Status / Impact / Type filter → the list updates without flashing back to the skeleton.
- Select some opportunities and click Done / Dismiss all / Send all → the list updates in place, no skeleton flash.
- Switching brand (a genuinely new dataset) may still show the skeleton — that's fine.
Notes
- Same class of issue as fix(prompts): Query Fan-out track flashes the whole table to a skeleton instead of flipping just the row #346 (the Query Fan-out track skeleton flash) — reusing the initial-vs-refetch distinction.
- Small, self-contained UI change.
Activity
Sam-syntax35 commentedon Jul 7, 2026
i really read all the documentation ! and so far i am enjoying contributing on this project. could you please assign this to me
gkhngyk commentedon Jul 7, 2026
Thanks for the interest, @Sam-syntax35! This one's already being worked on — @Maqbool61 has PR #367 open for it (currently in review), so I'll leave it with them to avoid duplicate work. There are plenty of other open good-first-issues if you'd like to pick up another one! 🙌
fix(content): suppress skeleton flash on filter change and bulk actio…
feat(agent): add copy button to assistant messages in AI agent chat (c…