Skip to content

Add before-change and record-deleted triggers - #65

Open
Ziinc wants to merge 2 commits into
mainfrom
claude/project-thread-bufphj
Open

Ziinc wants to merge 2 commits into
mainfrom
claude/project-thread-bufphj

Conversation

@Ziinc

@Ziinc Ziinc commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Requested by Zn · project thread

Before: triggers fired only after a record was created or updated, and nothing could check or adjust a record before it was saved.

After: a "Before a record is saved" trigger can set fields (new Set field step) or reject the save with a message, and a "Record deleted" trigger runs after deletes. Both fire on action-query writes too.

How: before-change actions are limited to setField, condition, fail, read queries and runAction, so a rejection never leaves a partial write. Action queries take two calls: Rust returns the pending rows, TS runs the triggers, and Rust reruns with the fields set and a fingerprint check. Config version 5. Records: async-trigger-queue.md, action-queries.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_012iLZgQTvMnEZufP6GdoWy2


Generated by Claude Code

Before-change triggers run before a create or update is written. Their
actions may set fields (new setField step), check conditions, read
queries and fail, so a rejection never leaves a partial write. Deleted
triggers run after a delete, sync or async. Both fire on action-query
writes: deletes and replaces report removed rows, and before-change
triggers decide on pending rows through a two-call flow with a
fingerprint. Config version 5.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLZgQTvMnEZufP6GdoWy2
@Ziinc Ziinc self-assigned this Oct 10, 2026
@Ziinc
Ziinc marked this pull request as ready for review October 10, 2026 21:41
Show only the before-change help text on a before-change trigger.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLZgQTvMnEZufP6GdoWy2

This branch has not been deployed

No deployments
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.

2 participants