Skip to content

fix(action-center): show the opportunity behind an action sent from Content - #944

Merged
gkhngyk merged 1 commit into
mainfrom
fix/opportunity-action-context
Oct 6, 2026
Merged

gkhngyk merged 1 commit into
mainfrom
fix/opportunity-action-context

Conversation

@gkhngyk

@gkhngyk gkhngyk commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

An action sent from a content opportunity (#943) opened with an empty Primary signals section and a 0 signals tag. The opportunity's prompts, fan-out queries, pages and brief stayed on the opportunity. Whoever works the action's tasks had none of it. The spec's action tasks for #857 include "analyze the opportunity basket", "analyze the prompt cluster", "analyze the fan-out queries" and "generate the content brief", and each of those needs this data.

Overview tab (components/action-center/opportunity-context.tsx)

For a content_opportunity action, the Overview tab shows the opportunity in place of the empty signals section:

  • the opportunity's title, with an Open opportunity link back;
  • the decision badge with its one-line hint, and links to the pages it is about. When a single asset was sent, only that asset's pages are listed;
  • Brief & outline: the suggested title, content type, word target and numbered outline with key points. Without a brief, it shows a link to generate one;
  • the prompts to answer;
  • the searches AI engines ran for them, with counts. The first 15 show and the rest fold away. Each search's inclusion reason shows on hover.

It is read live from the opportunity through the existing getOpportunity and getOpportunityBasket calls. A brief generated after sending therefore shows here too. Actions sent before this change carry the opportunity id, so they get the section as well.

Signals

  • The 0 signals tag is no longer shown for these actions. They have no detection signals by design.
  • The Signals tab says their evidence is the opportunity on the Overview tab.

Brief task

  • When the opportunity already has a brief at send time, create_content_brief opens as completed.
  • Every task row now states its status explicitly (todo otherwise). A bulk insert sends the union of the rows' keys, so a row without a status would send null.

Related issue

Part of #857. Fixes the action view of #943.

Type of change

  • fix — Bug fix
  • test — Adding or updating tests

How to test

  1. Open an action sent from Content Optimization. The Overview tab shows the opportunity, its decision and pages, the brief or a link to make one, the prompts and the searches. There is no "0 signals" tag.
  2. Generate a brief on the opportunity, then reopen the action. The outline shows.
  3. Send an opportunity that already has a brief. Its "Create content brief" task starts completed.

Checklist

  • Branch follows the naming convention
  • Commits follow Conventional Commits
  • yarn lint, yarn typecheck, yarn format:check, yarn test (418) and yarn build pass (run from web/)
  • yarn lint, yarn format:check and yarn test (985) pass (run from server/)

🤖 Generated with Claude Code

…ontent

An action sent from a content opportunity (#943) opened with an empty
"Primary signals" section and "0 signals": its prompts, fan-out queries,
pages and brief stayed on the opportunity, out of reach of whoever works
the action's tasks.

- The Overview tab of a content_opportunity action shows the opportunity
  instead: a link back, the decision and its pages, the brief and outline
  (or a link to generate one), the prompts to answer and the searches AI
  engines ran for them. It is read live, so a brief generated after
  sending shows too.
- The "0 signals" tag is gone for these actions, and the Signals tab says
  where their evidence is.
- When the opportunity already has a brief, the brief task opens
  completed. Every task row now states its status.
@gkhngyk
gkhngyk merged commit bbb47d6 into main Oct 6, 2026
6 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.

1 participant