Repository navigation
feat(action-center): show each action's priority and work the list by it - #1072
Conversation
…ls by platform
The Signals list never said which AI platform or location a signal was
about, and named platforms by their raw ids ("Visibility dropped on
gemini-web", "Weak in JP"). Part one of AC-002:
- Each row's Affected cell gets a line with the engines and locations the
signal is about: from the payload for platform and country signals, and
from the prompts' tracked platforms and locations for prompt and topic
signals. A line rather than a column keeps the table within the page
beside a pinned sidebar.
- Platforms and locations read as people know them ("Gemini", "Japan").
- Descriptions carry the measured fact instead of a generic sentence, e.g.
"Your mention rate fell from 34% to 18% against the week before."
- A Platform filter, search over platform and location names, and
platforms and locations columns in the CSV export.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every action's drawer gets Copy Data, Export CSV and Export Excel (AC-005). Copy Data opens the whole action as Markdown, every tab of the drawer, to copy a part or all of it with one click; the copy falls back to the browser's copy command where the clipboard API is blocked. The CSV (action-AC-52.csv, UTF-8 with a BOM) has a row per task and per signal marked by a section column; the Excel workbook has a sheet each for the action, its tasks, its signals and its history. Adds the write-excel-file package, loaded only when a workbook is asked for. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each action gets a priority score from 0 to 100 with a level (critical, high, medium, low), and the facts behind it for "Why this priority?" (AC-006). The score weighs impact, the demand of the most searched prompts, queries or pages, how severe the change is, commercial intent, independent kinds and sources of evidence, whether the ground was held before, and how recent it is, never how many signals repeat. It is worked out when an action is created and again every night, stored in new columns (migration 00144), and orders the queue of waiting findings too, with a little added for each day waited. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The actions list sorts by the server's priority score by default, shows the score beside Impact, and the Top Actions card counts the five highest-priority open actions. The drawer explains the score in "Why this priority?", and Copy Data and the exports carry it. MCP list_actions and get_action return the priority, and list_actions can sort by it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@gkhngyk this is ready for review. It's the second part of AC-006 (priority score), stacked on #1071 (the server scoring) and the PRs under it. Until those merge, this part is the last commit. It puts the score to work in the Action Center: a Priority column beside Impact, priority as the default sort, Top Actions limited to the 5 highest, "Why this priority?" in the drawer, and the score in Copy Data, the exports and MCP. Things to look at:
Code review (5 of 6 findings fixed, the other noted in the description). Web tests (592/592), lint, typecheck, format and build pass. Checked in the browser at 1440px and 1024px, light and dark. |
…mpact The score already weighs impact in, so showing both read as two answers to one question. The Actions and History lists drop their Impact column for a Priority Score column (score and level), filter and sort by priority, and the Potential Impact card becomes Highest Priority. The drawers' headers, Copy Data and Excel show the priority instead of impact, and MCP list_actions now lists the highest priority first by default (sort "updated" for the old order). Signals keep their own impact. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@gkhngyk one more commit on this PR: The score already weighs impact in, and showing both read as a contradiction ("Medium" impact beside an "84 High" priority). So the Actions and History tabs now show a Priority Score column ( One thing to look at: Web tests (595/595), lint, typecheck, format and build pass; checked in the browser in both themes at 1440px and 1024px. |
…rity-score # Conflicts: # supabase/schema.sql
# Conflicts: # web/src/components/action-center/action-drawer.tsx
…ed event text Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # server/src/lib/action-center/from-prompt-improve.js # supabase/schema.sql # web/src/types/supabase.ts
…rity-ui # Conflicts: # web/src/lib/actions/action-center.ts # web/src/lib/actions/action-history.ts
# Conflicts: # supabase/schema.sql
# Conflicts: # supabase/schema.sql
…ure/action-export
…ure/action-priority-score # Conflicts: # supabase/schema.sql
…nto feature/action-priority-ui
…ure/action-export
…ure/action-priority-score # Conflicts: # supabase/schema.sql
…nto feature/action-priority-ui
…ure/action-export
…ure/action-priority-score # Conflicts: # supabase/schema.sql
…nto feature/action-priority-ui
…rity-ui # Conflicts: # supabase/schema.sql
…rity-ui # Conflicts: # web/src/lib/action-center/display.test.ts
…rity-ui # Conflicts: # supabase/schema.sql
gkhngyk
left a comment
There was a problem hiding this comment.
Reviewed. Merged main into the branch: the history select now reads priority_score and priority_level, and the drawer and history fixtures carry the priority fields in place of impact. Tested on the full Action Center chain.
Summary
AC-006, part 2 of 2 (web and MCP). The score #1071 stores is now what the Action Center shows and sorts by, in place of action impact. Each list has a Priority Score column, filters and sorts by priority, and the drawers say why. Copy Data, the exports and MCP carry the score too.
Stacked on #1071 (which sits on #1070 and #1058). Please review this PR's two commits, or merge those first:
feat(action-center): show each action's priority and work the list by itfeat(action-center): use the priority score wherever actions showed impactThis PR reads the columns #1071 adds.
Spec:
AC-006-priority-score.mdandAC-spec-priority-score-signal-intelligence.md.Why priority replaces impact
Impact is one of the score's seven factors (20 of 100 points). Showing both read as two answers to one question. A "Medium" impact next to an "84 High" priority looked like a contradiction, though it is the model working: a medium-impact loss on ground the brand held can matter as much as a high-impact gap. So wherever the Action Center showed an action's impact, it now shows its priority.
Actions list
[84] High. Unscored actions show "—".priority_scoreandpriority_levelinstead ofimpact.Action drawer
[84] High, where impact was.en.json(actionsPage.priority.reason), so another language can reorder the sentence.Priority: 84 (High)and give the sentence. They no longer list impact.History
The same change on the History tab:
An action still running is scored every night. A closed one keeps the score it last had.
MCP and the REST API
list_actionsandget_actionreturnpriority: { score, level, reason }, or null before an action is scored.list_actionsnow lists the highest priority first by default, unscored last, the order the app shows. This is a behaviour change for API clients.sort: "updated"(orGET /api/mcp/actions?sort=updated) gives the old order, most recently updated first. A client that polls for recent changes should add it.docs/guides/mcp-server.mdxis updated.Small moves
comparePrioritymoved fromdisplay.tsto the newlib/action-center/priority.ts, which holds the parsing, ordering, level helpers and sentence.OPEN_ACTION_STATUSESnow lives inregistry.ts, so Top Actions and the other cards agree on what "open" means.compareHistoryinlib/action-center/history.tsso it can be tested.ACTION_IMPACTSand the unusedactionsPage.impactmessages are removed.Review
I ran a code review on each commit.
First commit: five of six findings fixed.
en.json.get_action's priority had no test.One was left as is: an Improve action reads "Lost ground on 1 platform". It is scored from its platforms' states (#1071), so the platforms are what changed.
Second commit: three of five findings fixed.
ACTION_IMPACTSwas left unused.Two were left as is:
topPriority: it is not shown yet. It took the place oftopImpact, which was not shown either.Related issue
None. Product spec AC-006 (Action Center), part 2.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
00144_action_priority_score.sql, and run a signal pass for a brand so its open actions are scored.[84] High, and the list is sorted by it.Priority: 84 (High) · Category:, and a "Why this priority" line follows the tags. Do the same with Export Excel.list_actions. The highest score comes first and each action carriespriority. Withsort: "updated", the most recently updated comes first.Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/): no errors; the 7 warnings are in files this PR does not touchyarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Also run:
yarn test: 595/595. New and changed tests:priority.test.ts:history.test.ts: History's priority sort, with never-scored actions last, and the highest priority in range.action-priority.test.ts(MCP):list_actions' priority, its default andupdatedorders, andget_action's priority.export.test.tsandaction-export-buttons.test.tsx:Priority: 84 (High)and the sentence in Copy Data and the workbook, with no impact line.yarn build: passes.🤖 Generated with Claude Code