You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(common-patterns): fix patterns that validate but fail at runtime
All ten patterns were dropped verbatim into a scaffolded 16.0.0-rc.1 app
and run through npm run validate — twice: as-published (passes, proving
the gate does NOT catch these) and as-fixed. The fixes target
runtime-fatal issues invisible to validate:
- Both flow patterns lacked the start-node trigger binding
(config.objectName + triggerType: 'record-after-update' …) — they
validated but never fired; approval-flow nodes (auto_approve /
request_approval / update_record) had no config at all, making them
no-ops. Bindings, node configs, status: 'active', and a CEL start
condition added.
- reference: 'user' → 'sys_user' (no 'user' object exists; lookups
silently never resolve).
- notify recipient '{record.assigned_to.email}' → '{record.assigned_to}'
(recipients are user ids; path-walking a string yields empty
recipients and a node error).
- Formula field: bare 'quantity * unit_price' →
'record.quantity * record.unit_price' + returnType (bare identifiers
resolve to null in the CEL scope).
- Cursor-pagination section replaced with keyset pagination (cursor is
schema-reserved, zero engine/driver execution — same finding as
PR #3374).
- Frontmatter description no longer promises realtime; import callout
gains definePermissionSet.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Kj2MJEPXoUXC4LiC3XYJc
Copy file name to clipboardExpand all lines: content/docs/getting-started/common-patterns.mdx
+67-18Lines changed: 67 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
---
2
2
title: Common Patterns
3
-
description: Top 10 patterns for building applications with ObjectStack — CRUD, search, auth, realtime, and more
3
+
description: Top 10 patterns for building applications with ObjectStack — CRUD, views, flows, agents, security, and more
4
4
---
5
5
6
6
# Common Patterns Guide
7
7
8
8
This guide covers the most common patterns you will use when building applications with ObjectStack. Each pattern includes a complete, copy-pasteable example.
9
9
10
10
<Callouttype="info">
11
-
**Import:**`import { defineStack, defineView, defineApp, defineFlow, defineAgent } from '@objectstack/spec'`
0 commit comments