Repository navigation
feat(action-center): show what to do today, the Next 7 and what was done this week (AC-011) - #2146
Merged
Merged
Conversation
…one this week (AC-011) The Today card at the top of Action Center › Actions (ROADMAP-plan §06, mockup screen 3): up to three open actions that are the person's or no one's yet, each with why it matters, its first step and page, and who does it (Me / Agent / Team, read from the assignee and the first open task's mode). Under it the Next 7 and "Done this week" (actions completed since Monday in the person's time zone, linked to History). While Getting started runs, the card lists its next three ready steps instead. The order is the Inbox's daily suggestion ranking (CHAT-26), kept in one place: rules.js rankActions, which pickSuggestion now uses too, over the same reads (moved from job.js to chat-suggestions/reads.js). The new GET /api/action-center/today ranks with it and puts today's suggestion for the person first, unless they removed it or put it off. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…Help reads them A formatter had spread its keywords and synonyms over several lines, which help/README.md's front matter doesn't allow and lib/help/articles.ts doesn't read. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…oved Help yarn test -u src/lib/help, after the article's Today section. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…one this week" links to History next-intl's navigation can't be loaded under vitest, so the page's tests stub it, as the Action Center's other component tests do. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…rday, and count the tables Today reads At 09:30 UTC no zone is on tomorrow yet, so the zone test uses Pago Pago (UTC−11), where it's still Oct 29. The open actions are read in two queries (the unassigned ones and the person's own): the test now checks that nothing but actions is read. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
8 of 13 tasks
gkhngyk
approved these changes
Nov 5, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Non-blocking: the Today card keeps only ids found in the page's getActions list (unordered, limit 1000), so a brand past 1000 actions can lose ranked items silently. Returning the rows' fields from /today would avoid the join.
8 of 13 tasks
cihan-gyk
pushed a commit
to cihan-gyk/ansvisor
that referenced
this pull request
Nov 5, 2026
Main brought ansvisor#2146, ansvisor#2148 and ansvisor#2149. help/chat/agents.md's front matter keeps both keyword and synonym lists; approved-articles.json regenerated; schema.sql rebuilt. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
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
AC-011, ROADMAP-plan §06 "One 'do this today' path" (Drive › Ansvisor Product Developments › Diğer ›
ROADMAP-plan.md), mockupROADMAP-mockup.htmlscreen 3.This is the first of the AC-011 PRs. It adds the Today card, with Next 7 and Done this week: web code plus one read-only API route, and no migration. The owner chose this split and its ranking on 2026-11-05.
What the person sees (Action Center › Actions)
agent;One ranking, kept in one place (the owner's rule: no second copy of the formula)
The ranking function. The Inbox's daily suggestion (CHAT-26) ranks in
server/src/lib/chat-suggestions/rules.js. That rule is now one exported function,rankActions, cut out ofpickSuggestionwith no change to the formula:new,in_progress), unassigned or the person's own;scoreCandidate) andSTART_NOW_LIFT;The Inbox job.
pickSuggestioncallsrankActionswith its Inbox-only skips, then applies variety, exactly as before. The skips are actions suggested in the last 14 days, removed or put off, or waiting in Needs you.Shared reads.
loadCandidates,loadStartNowandloadAnswerZonesmoved byte for byte fromjob.jstochat-suggestions/reads.js. The job and the Today card now rank the same rows.New route
GET /api/action-center/today?brandId=(lib/action-center/today.js), open to any role that can see the brand:rankActions;chat_suggestions, read only whereCHAT_AGENTICis on;{ today: [3], next: [7] }."Today" is the day the job dates the suggestion in, with the same time-zone resolution.
Why a route rather than a shared module. Web and server share no code here. The existing pattern is a web "twin" checked against the server's fixtures, which would be a second copy. So the server ranks with the one function. The web only reads the order and adds what it shows (first step, who, and the week's count), read as the person under RLS in
lib/actions/action-center-today.ts.Help: a Today section in
help/action-center/action-center-actions.md(about 140 words) and updated keywords.approved-articles.jsonis regenerated (yarn test -u src/lib/help).Not in this PR
Related issue
None. AC-011 (ROADMAP-plan §06), PR 1 of the owner's split of 2026-11-05.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a feature (rankActionsandreads.js, no change in behaviour)test— Adding or updating testsHow to test
CHAT_AGENTIC), the action in today's Inbox suggestion is fix(tracking): keep job active until webhook results drain #1, labelled "Also today's suggestion in your Chat Inbox". Click Not now or Remove on it in the Inbox, and it drops back to its rank.cd server && npx vitest run src/lib/chat-suggestions src/lib/action-center/today.test.js src/routes/action-center-today.test.jscd web && npx vitest run src/lib/action-center/today.test.ts src/components/action-center/today-card.test.tsx "src/app/[locale]/(dashboard)/dashboard/action-center/actions/page.test.tsx" src/lib/helpChecklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)help/(or no user-visible change) — see help/README.mdChecks run locally on this branch, using CI's jobs:
format:check,lint,typecheckandbuildpass.yarn test: 988 of 989 files passed (10,578 tests, 1 skipped).format:checkandlintpass.npm test: 418 of 421 files passed.today.test.jscases had wrong expectations (a time zone and a read count). They are fixed in 2d77c12.content-agent"quickly" (467 ms against 400 ms) andcontent-people(242 ms against 150 ms). This PR touches neither.supabase/build-schema.sh(no change) andversion:checkpass.main.Open questions for the owner
Please confirm these defaults:
Generated by Claude Code