Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .changeset/25921-types-action-executor-batch-ops.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
'@object-ui/types': patch
---

refactor(types)!: delete `ActionExecutor` and the Batch Operations pair nothing reads

Clause-②: no (narrowing)
Metadata-protocol: none

<!-- adr-0087: not-required (runtime-export-retired @object-ui/types#ActionExecutor, @object-ui/types#BatchOperationConfig, @object-ui/types#BatchOperationSummary) the retired operands are TypeScript-only shapes declared in `ui-action.ts`: a function type for an action executor and a batch-operation config and summary pair that no renderer, adapter or host reads; nothing in the workspace or in hotcrm imports any of them from the package entry, they have no zod twin, they are not arms of `AnySchema`, and no packages/spec schema, registered node type, conversion surface or stored shape names them, so there is nothing for `objectstack migrate meta` to rewrite -->

**BREAKING** for a host that imports any of these three types from `@object-ui/types`. None had an importer anywhere in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected.

They are **gone from the package, not only from the entry**: `src/ui-action.ts` no longer declares them. They were types only, so the built JavaScript is unchanged. The "Transaction Support" block beside them stays (`TransactionIsolationLevel`, `TransactionConfig`, `TransactionResult`; `@object-ui/core`'s `TransactionManager` reads them).

What leaves, and what to write instead:

- FROM `ActionExecutor` TO no replacement in this package. Actions run through `@object-ui/core`'s `ActionRunner`, which registers `ActionRunnerHandler` functions; a host that typed its own executor declares that signature locally.
- FROM `BatchOperationConfig` TO no replacement. No renderer or runner read a batch-operation config; a host that kept one declares it locally.
- FROM `BatchOperationSummary` TO no replacement. Nothing produced this summary; a host that kept one declares it locally.
6 changes: 3 additions & 3 deletions ui/packages/types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1252,9 +1252,9 @@ export type {
// The `undo` payload of `ActionResult`, moved down from `@object-ui/core`'s
// `UndoManager` with it (objectui#6349, batch 4); core re-exports it.
UndoableOperation,
ActionExecutor,
BatchOperationConfig,
BatchOperationSummary,
// `ActionExecutor` / `BatchOperationConfig` / `BatchOperationSummary` were
// retired here (objectstack#25921, batch 11) — see the note at the end of
// `ui-action.ts`.
TransactionIsolationLevel,
TransactionConfig,
TransactionResult,
Expand Down
54 changes: 5 additions & 49 deletions ui/packages/types/src/ui-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1235,55 +1235,6 @@ export interface ActionResult {
undo?: UndoableOperation;
}

/**
* Action executor function type
*/
export type ActionExecutor = (
action: UIActionSchema,
context: ActionContext,
params?: Record<string, any>
) => Promise<ActionResult>;

// ============================================================================
// Batch Operations (Q2 2026 - Spec v2.0.1 Enhancement)
// ============================================================================

/** Batch operation configuration */
export interface BatchOperationConfig {
/** Operation name */
name: string;
/** Display label */
label: string;
/** Target action to execute on each record */
action: string;
/** Whether to run in parallel */
parallel?: boolean;
/** Maximum concurrent operations */
concurrency?: number;
/** Whether to continue on error */
continueOnError?: boolean;
/** Progress callback expression */
onProgress?: string;
/** Completion callback expression */
onComplete?: string;
}

/** Batch operation result */
export interface BatchOperationSummary {
/** Total items processed */
total: number;
/** Successfully processed count */
succeeded: number;
/** Failed count */
failed: number;
/** Individual results */
results: Array<{
recordId: string;
success: boolean;
error?: string;
}>;
}

// ============================================================================
// Transaction Support (Q2 2026 - Spec v2.0.1 Enhancement)
// ============================================================================
Expand Down Expand Up @@ -1323,6 +1274,11 @@ export interface TransactionResult {
rolledBack?: boolean;
}

// `ActionExecutor` and the "Batch Operations" pair (`BatchOperationConfig`,
// `BatchOperationSummary`) are retired (objectstack#25921, batch 11): nothing in
// this workspace or in hotcrm read them. `@object-ui/core`'s `ActionRunner` is
// the executor; it registers `ActionRunnerHandler` functions, not this type.
//
// The undo/redo trio this file used to declare (`UndoRedoEntry`,
// `UndoRedoConfig`, `UndoRedoState`) is retired (objectui#6349, batch 5): when
// it was removed nothing in the repository read or wrote any of the three, and
Expand Down
Loading