Repository navigation
Description
Description
Content opportunities are generated per prompt, but the only place to see them is the Content page, where they are mixed in with every other prompt's. When a user is on a prompt's detail page, the question they are usually asking is "what should I publish to show up here?", and the answer lives on another page. Customer feedback asked for exactly this: seeing a prompt's content opportunities on the prompt's own page.
Proposed change
Add a Content opportunities card to the prompt detail page, web/src/app/[locale]/(dashboard)/dashboard/prompts/[id]/page.tsx, in the Workflow section alongside the Notes and Target URLs cards. Like those cards, it does not depend on the selected date range, so load it once per prompt outside the date-driven load cycle, the same way getPromptWorkflow is loaded.
Data: Load the prompt's opportunities with getOpportunities(brandId, { promptId, status: 'new' }) from web/src/lib/actions/content.ts. This depends on the prompt_id filter from #836. If #836 hasn't landed yet, add that parameter as part of this change: it is the same small addition to GET /api/content/brand/:brandId in server/src/routes/content.js.
Card contents:
- Up to 5 open opportunities, each showing its title, impact and type (owned / earned), and a "Brief ready" marker when a brief has been generated. Each row links to the opportunity's detail page,
/dashboard/content/<id>. - When there are more than 5, a "View all N" link to
/dashboard/content?prompt=<promptId>, the filtered view from feat(content): filter opportunities by prompt #836. - An empty state when the prompt has no open opportunities yet.
How to test
- Open a prompt that has content opportunities: the card lists them, capped at 5, and each row opens its opportunity.
- For a prompt with more than 5, "View all" opens the Content page filtered to that prompt.
- Open a prompt with none: the empty state shows.
- Change the date range: the card does not reload.
Run yarn build from web/ before opening the PR. See CONTRIBUTING.md for conventions.
Activity
Nandinikumari02 commentedon Oct 2, 2026
Hi @gkhngyk, I'd like to work on this issue.
Two quick questions before I start:
gkhngyk commentedon Oct 2, 2026
Assigned — go ahead as written. #857 is still at the design stage, and the card reads a prompt's opportunities through the
prompt_idfilter from #836. When clusters land, that filter changes on the server and the card follows without restructuring.For local data,
supabase/seed.sqlships a demo brand with prompts, results and content opportunities tied to prompts.npx supabase db resetloads it. Sign in as[email protected]/demo123, and run bothweb/andserver/, since the Content data comes through the server API. See the seed data section in CONTRIBUTING.The seed has at most one open opportunity per prompt and none with a brief. To check the "View all" link and the "Brief ready" marker, add a few more
newopportunities to one prompt in your local database and give one of them abrief. Happy to review!gkhngyk commentedon Oct 7, 2026
Hi @Nandinikumari02, how is this going? Since you picked it up, opportunities are now generated per prompt cluster (#930), and the prompt filter matches through cluster membership (#932), so
getOpportunities(brandId, { promptId })already returns this prompt's opportunities. If you're no longer able to work on it, just let us know and we'll free it up for someone else.