Skip to content

feat: support action chaining with pipe operator - #485

Open
nightcityblade wants to merge 2 commits into
PrefectHQ:mainfrom
nightcityblade:fix/issue-135
Open

feat: support action chaining with pipe operator#485
nightcityblade wants to merge 2 commits into
PrefectHQ:mainfrom
nightcityblade:fix/issue-135

Conversation

@nightcityblade

Copy link
Copy Markdown

What Problem This Solves

Composing sequential actions currently requires an explicit list, making simple action flows harder to read.

Why This Change Was Made

  • Add a list-like internal action chain returned by Action.__or__.
  • Preserve existing list serialization and component action handling.
  • Support repeated left-associative composition such as a | b | c.

User Impact

Users can compose action sequences with the pipe operator while existing list-based action APIs continue to work unchanged.

Evidence

  • uv run pytest -q tests/test_actions.py — 74 passed
  • uv run pytest -q — 1295 passed
  • uv run prek run --all-files — all hooks passed

Fixes #135

@marvin-context-protocol marvin-context-protocol Bot added enhancement Improvement to existing functionality or new capabilities. python Related to the Python SDK: components, actions, serialization. labels Jul 26, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7432b8138d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/prefab_ui/actions/base.py
Comment thread src/prefab_ui/actions/base.py
Comment thread tests/test_actions.py Outdated
🤖 Generated with Codex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement to existing functionality or new capabilities. python Related to the Python SDK: components, actions, serialization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Action chaining with | operator

1 participant