Repository navigation
feat(content): follow an opportunity through its Action Center work - #952
Merged
Merged
Conversation
The spec's lifecycle is New → Reviewed → Sent → In Progress → Completed → Measured (#857, Phase 4). Opportunities stopped at Sent: nothing moved them once the work was in the Action Center, and the measurement never showed on them. - A Reviewed status, set by "Mark as reviewed" on a new opportunity, and offered in the status filter and MCP. - Migration 00106 adds a trigger on actions that sets the opportunity's status from every action sent from it: all new → sent, any started → in_progress, every live one completed → done, all dismissed → reviewed. It runs however the action changes, and leaves dismissed and archived opportunities alone. The send path no longer sets the status itself. - A Results card on the opportunity lists its actions with status, and for completed ones the measured outcome with each metric before and after, or the date measurement starts.
gkhngyk
force-pushed
the
feature/opportunity-lifecycle
branch
from
October 6, 2026 17:01
b98299b to
0a0e8ba
Compare
This was referenced Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First PR of Phase 4 in #857. The spec defines the opportunity lifecycle as New → Reviewed → Sent to Workflow → In Progress → Completed → Measured (§27). Until now, an opportunity sent to the Action Center (#943) stayed at Sent: nothing moved it once the work was underway, and the action's measurement never showed on the opportunity.
Reviewed
reviewedstatus. A new opportunity's detail page has Mark as reviewed.reviewed.Status follows the work (migration 00106)
A trigger on
actionssets the opportunity's status from every action sent from it. It runs on insert and on status updates:sentin_progressdonereviewedsentitself.Results
The opportunity detail page has a Results card once work has been sent. It lists each action with:
The measurement is the Action Center's existing one, which still reads the whole brand. The next PR scopes it to the opportunity's basket, as §28 asks.
Tried on production data
The migration is applied. In a transaction that was rolled back, a test action moved new → in_progress → completed → dismissed. Its opportunity followed: sent → in_progress → done → reviewed. Nothing was left changed.
Related issue
Part of #857 (Phase 4)
Type of change
feat— New featureHow to test
Checklist
yarn lint,yarn typecheck,yarn format:check,yarn test(418) andyarn buildpass (run fromweb/)yarn lint,yarn format:checkandyarn test(990) pass (run fromserver/)supabase/schema.sqlrebuilt withbuild-schema.sh🤖 Generated with Claude Code