typebot.io icon indicating copy to clipboard operation
typebot.io copied to clipboard

Implement a "Flush" logic block

Open baptisteArno opened this issue 8 months ago • 6 comments

Flush Block Feature Specification

Overview

New Logic block that forces the engine to send accumulated content as a chunk to the client and wait for resume. Enables creators to display messages before slow operations. Would do exactly the same as Wait block with Pause the flow option. But it would just make more sense to have a dedicated block

Block Properties

  • Category: Logic
  • Name: "Flush"
  • Configuration: None

Behavior

  1. Engine sends all accumulated blocks up to the Flush as one chunk
  2. Engine waits for empty request from client to resume
  3. Client automatically sends empty resume request when processing flush action
  4. Multiple Flush blocks allowed in single flow

Implementation

  • Backend: Handle chunk sending and empty resume requests
  • Frontend: Block component + client-side action processor integration
  • Search terms: "Flush"

Use Case

Creator places Flush after "Hold on, let me check this..." bubble and before HTTP request block to show message immediately before the slow operation.

baptisteArno avatar Mar 11 '25 09:03 baptisteArno