Skip to content

[386] feat: show manual moderator actions in the Recent Decisions log - #1030

Open
calebmcquaid wants to merge 1 commit into
caleb/386-c-feedfrom
caleb/386-d-client
Open

[386] feat: show manual moderator actions in the Recent Decisions log#1030
calebmcquaid wants to merge 1 commit into
caleb/386-c-feedfrom
caleb/386-d-client

Conversation

@calebmcquaid

Copy link
Copy Markdown
Contributor

Context & Requests for Reviewers

Last of four for #386.

Recent Decisions now shows queue decisions and manual actions in one list, with an Origin column telling them apart.

A control switches between All, Decisions and Actions. A bulk run is one row with item and failure counts. The side panel lists every item and failures marked. Filtering by queue or decision type flips Show to Decisions and says why.

Tests

224 tests across 34 files.

multiday-run-count-mismatch narrow-viewport panel-error-kills-whole-page queue-filter-forces-decisions 05-show-actions-only 30day-window-drops-action baseline bulk250-truncated-failures decision-panel-crash-repeat 01-merged-feed-interleaved 02-side-panel-item-list 03-queue-filter-selected 04-filter-flip-applied

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 20847df8-3ee9-42cb-afeb-1c2a2380bcc1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@julietshen

Copy link
Copy Markdown
Member

Thanks @calebmcquaid! I have a few quick questions on the UI:

Screenshot 2026-08-18 at 9 33 35 AM

^ is this search bar supposed to look like this?

Screenshot 2026-08-18 at 9 33 57 AM

^ I'm a little confused on what these hyperlinks are, are they Jobs?

@calebmcquaid

Copy link
Copy Markdown
Contributor Author

Thanks @calebmcquaid! I have a few quick questions on the UI:

Screenshot 2026-08-18 at 9 33 35 AM ^ is this search bar supposed to look like this? Screenshot 2026-08-18 at 9 33 57 AM ^ I'm a little confused on what these hyperlinks are, are they Jobs?

Confirmed that search bar bug happens on main. Should be pre-existing. I'll make a ticket to fix

Those are Items and they link to Investigations


Bulk actions appear in the **Recent Decisions** log alongside queue-based decisions, so there is a full audit trail of what was actioned, by whom, and under which policies.

Use the **Show** control there to switch between all activity, queue decisions only, or manual actions only. The **Origin** column marks where each row came from — `Review Job` for a queue decision, `Manual Action` for anything taken from Bulk Actioning or Investigation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @cassidyjames in case you want to take a look at changes to docs

// That 1000 limit is client-side only and `bulkExecuteActions` caps nothing,
// so a programmatic caller can still exceed it; the truncation notice below
// stays for that case.
const PAGE_SIZE = 1000;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this client-side limit? seems arbitrary?

// Bulk Actioning caps a run at 1000 ids, so this covers everything the UI can
// produce and truncation becomes the exception rather than routine. At 100 a
// 250-item run hid 22 of its 36 failures, and which items you saw was
// arbitrary (`ORDER BY item_id`) — failures are the reason this panel exists.

@taobojlen taobojlen Aug 31, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At 100 a 250-item run hid 22 of its 36 failures, and which items you saw was

this does not seem like it belongs in a comment we commit to the repo! not sure what it's referencing?

* Renders in the page's detail side panel — the same slot a selected
* decision uses (`ManualReviewRecentDecisionSummary` +
* `ManualReviewJobReview`) — not inside the feed table, so a wide run's
* item list has room to breathe instead of wrapping inside a table cell.

@taobojlen taobojlen Aug 31, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this level of detail is needed in the comments, IMO.

// arbitrary slice — failures can fall outside it. Say that
// rather than letting the reader assume they see every one.
<span className="text-coop-alert-red">
{` — showing first ${data.manualActionItems.items.length}; some failures may not be listed`}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some failures may not be listed

I think that's a pretty bad UX. If there's a failure, let's error loudly so the user knows whether something went wrong or not.

}
}

# Skips CSV export. This is untouched by the merged-feed cursor paging

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this comment is redundant? a reader would never be wondering "is this touched by the merged-feed cursor stuff above?"


/**
* The side panel shows exactly one thing at a time — a decision or a manual
* action, never both. Modeling the selection as a single discriminated union

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really there's no need to mention the alternative here.

in general these comments are overly verbose and seem to be written for this PR, not for the long-term codebase.


/**
* The decision-detail side panel and the `getDecidedJob` lookup both predate
* the merged feed and still expect a `ManualReviewDecision`-shaped object.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, no need for this "predate the merged feed" stuff.

// Runaway guard for both CSV exports: stop paging after this many requests
// even if the server keeps returning more (e.g. `nextCursor` never goes
// null, or the offset loop never runs dry).
const CSV_MAX_PAGES = 100;

@taobojlen taobojlen Aug 31, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these silent length limits are a bit of an antipattern. ideally we wouldn't have them at all.

the problem here is that we generate the CSV on the frontend instead of properly, on the backend. i guess that's a separate issue, though -- would you mind creating a follow-up ticket for that?

i'm a bit unsure how best to handle this until we do that, though!


/**
* Mirrors `MERGED_VIEW_WINDOW_MS` in `ModerationActivityFeed` — the server
* bounds how far back a page scans ClickHouse for manual actions. Stated in

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as per other comments, the server should not bound this.

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.

3 participants