yeuimu 92e73f7baa fix(automation): fire record triggers on all grid write paths (paste/clear/duplicate)
Investigation of the 'grid edits bypass the REST layer' report found the
ShareDB socket submit path is dead code (adapter db.commit() throws and no
frontend submitOp callsites exist) — grid cell edits already flow through
record.updateCell -> REST updateRecord and DO fire triggers. The real
coverage gaps were the selection-layer writes that call the open-api
SERVICES below the controller where the manual emits live:

- v1 selection paste/paste-by-id, clear/clear-by-id (grid paste, Delete-key
  clear): emitted nothing. Now emit automation.record.create/update with
  full post-write records + changedFieldIds/oldFields diffs (best-effort —
  emission failure logs but never fails the write).
- v1 record duplicate: emitted nothing. Now emits automation.record.create.
- v2 paste endpoints (range paste + paste-stream + paste-by-id-stream):
  returned only counts. PasteResult/PasteStreamDoneEvent now carry per-record
  update diffs and created-record values through to the nest layer, which
  emits create/update events (full record + diff metadata).
- v2 record duplicate: now emits automation.record.create.

Form submissions intentionally remain formSubmitted-only (independent
channel); deletions have no trigger category. Docs corrected: grid cell
edits fire triggers (they are REST), coverage table updated.

Verified live: duplicate / range paste / stream paste on a v2 base each
produced a workflow execution with full triggerInput; selection e2e
114/114, PasteHandler specs 30/30, selection unit 31/31.
2026-08-18 18:54:52 +00:00
S
Description
No description provided
635 KiB
Languages
TypeScript 66.4%
Python 24.8%
Shell 8.1%
JavaScript 0.7%