feat(action): conditional visibility + undoable actions (CRM demo)#1992
Merged
Conversation
- spec: UI Action gains `undoable` (single-record update actions offer an Undo affordance on success). `visible`/`disabled` CEL predicates already existed. - app-crm: Convert Lead action gains `visible: record.status != "converted"` (the button hides on converted leads instead of relying on the flow's guard screen). New "Reassign Lead" list action (`undoable`) demonstrates the Undo affordance — reassigns `assigned_to`, restorable from the toast. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 89 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
added a commit
that referenced
this pull request
Jun 17, 2026
…#1992 Pre-existing red on the spec-liveness gate (not from this branch's timezone change): #1990 added flow.successMessage/errorMessage + action.errorMessage and #1992 added action.undoable, none classified in the ledgers. - flow.successMessage → live (service-automation/src/engine.ts:1292) - flow.errorMessage → live (service-automation/src/engine.ts:1348) - action.errorMessage → live (objectui toast, error counterpart of successMessage) - action.undoable → experimental: declared + demoed in #1992 but no runtime reader yet in framework or objectui (objectui has an UndoManager but does not key off the action's `undoable` flag). Promote to live once a consumer lands. Greens the liveness gate (was red on main too). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
os-zhuang
added a commit
that referenced
this pull request
Jun 17, 2026
) * feat(runtime): resolve reference timezone onto ExecutionContext (#1978) ADR-0053 Phase 2 foundation. Adds `ExecutionContext.timezone` (optional IANA zone) and resolves it once per request in resolveExecutionContext, precedence user preference -> org default -> UTC: - user override: sys_user_preference (user_id, key='timezone') - org default: tenant-scoped sys_setting (namespace='localization', key='timezone', scope='tenant') — one org per physical tenant (ADR-0002), so no tenant_id filter - invalid IANA zone ignored, falls through; every read defensive via tryFind, never blocks auth Pure plumbing, no behavior change: nothing reads ctx.timezone yet and an absent value resolves to UTC (today's behavior). Foundation consumed by the rest of Phase 2 — tz-aware today()/daysFromNow() (#1980), datetime rendering (#1981), analytics bucketing (#1982). A discoverable `localization` settings manifest for the org default is a follow-up; the resolver already reads the row if present. Tests: user pref > org default > UTC; invalid zone falls through; anonymous leaves it unset. Runtime suite green (387), spec kernel green (682). Closes #1978. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(spec): classify 4 liveness properties left unclassified by #1990/#1992 Pre-existing red on the spec-liveness gate (not from this branch's timezone change): #1990 added flow.successMessage/errorMessage + action.errorMessage and #1992 added action.undoable, none classified in the ledgers. - flow.successMessage → live (service-automation/src/engine.ts:1292) - flow.errorMessage → live (service-automation/src/engine.ts:1348) - action.errorMessage → live (objectui toast, error counterpart of successMessage) - action.undoable → experimental: declared + demoed in #1992 but no runtime reader yet in framework or objectui (objectui has an UndoManager but does not key off the action's `undoable` flag). Promote to live once a consumer lands. Greens the liveness gate (was red on main too). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
os-zhuang
added a commit
that referenced
this pull request
Jun 25, 2026
…ability) (#2317) * chore: bump objectui to 8a3b351a5a32 fix(console): gate the AI surface on the service-ai capability, not the agent catalog (#1992) objectui@8a3b351a5a320e6769a1616e85a6fd05aabd3279 * chore(showcase): remove the AI agent — service-ai is an enterprise capability The showcase defined a `showcase_assistant` agent + a skill + two tools, all of which need the enterprise `@objectstack/service-ai` runtime to be served. The open-source showcase shouldn't require an enterprise capability, so drop the AI block entirely: - delete `src/agents/index.ts` (agent + skill + tools) and its config wiring (`agents` / `skills` / `tools`); - remove the `@objectstack/service-ai` dependency (added in #2311 to back the agent — no longer needed); - drop the descriptive `ai` entry from the coverage map and update the seed test (`agents.length` 1 → 0). The showcase now boots as a Community-Edition shape: no AI service is registered, discovery reports `services.ai` unavailable, and `/api/v1/ai/agents` 404s — so the console hides its AI surface. `tsc --noEmit` + all 39 showcase tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Action UX follow-ups (the third batch from the conversion-wizard review): conditional action visibility and an undoable action affordance.
1. Conditional action visibility
Action.visible/Action.disabledCEL predicates were already evaluated by the action renderers — this wires the CRM example up to use them: Convert Lead now declaresvisible: record.status != "converted", so the button disappears on already-converted leads instead of the user clicking it and hitting the flow's guard screen (kept as a server-side backstop).2. Undoable actions
New
Action.undoableflag. A single-record update action that sets it gets an Undo affordance on its success toast (backed by the client UndoManager). New CRM Reassign Lead list action demonstrates it — reassignsassigned_to, restorable from the toast (and Ctrl+Z).Changes
Action.undoable.Convert Leadgainsvisible; newReassign Leadundoable action.Verification
Browser E2E (console + app-crm):
assigned_to, toast shows "Undo" → clicking Undo restores the prior owner.Smoke test (29) passes. Pairs with the objectui companion PR.
🤖 Generated with Claude Code