Skip to content

added name for history executions#359

Merged
Selinali01 merged 2 commits intomainfrom
history_enhances
Apr 21, 2026
Merged

added name for history executions#359
Selinali01 merged 2 commits intomainfrom
history_enhances

Conversation

@Selinali01
Copy link
Copy Markdown
Contributor

@Selinali01 Selinali01 commented Apr 20, 2026

Summary

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactor
  • New Bubble Integration
  • Other (please describe):

Checklist

  • My code follows the code style of this project
  • I have added appropriate tests for my changes
  • I have run pnpm check and all tests pass
  • I have tested my changes locally
  • I have linked relevant issues

Screenshots (Required)

For New Bubble Integrations

📋 Integration Flow Tests: When creating a new bubble, you must write an integration flow test that exercises all operations end-to-end in realistic scenarios—including edge cases. This flow should be runnable in bubble studio and return structured results tracking each operation's success/failure with details. See packages/bubble-core/src/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.ts for a complete reference implementation.

⚠️ If your integration requires API credits for testing, please reach out to the team for test credentials.

  • Integration flow test (.integration.flow.ts) covers all operations
  • Screenshots showing full test results in Bubble Studio attached above

Additional Context

Summary by CodeRabbit

  • New Features

    • Allow users to assign optional custom names to execution checkpoints for easier tracking and organization.
  • Chores

    • Version bump across packages and updated starter templates to reference the new package versions.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 95ed5646-e176-4195-932b-6f02f2b80ad7

📥 Commits

Reviewing files that changed from the base of the PR and between 67dda3f and fd304e1.

📒 Files selected for processing (8)
  • packages/bubble-core/package.json
  • packages/bubble-runtime/package.json
  • packages/bubble-scope-manager/package.json
  • packages/bubble-shared-schemas/package.json
  • packages/bubble-shared-schemas/src/bubbleflow-execution-schema.ts
  • packages/create-bubblelab-app/package.json
  • packages/create-bubblelab-app/templates/basic/package.json
  • packages/create-bubblelab-app/templates/reddit-scraper/package.json
✅ Files skipped from review due to trivial changes (5)
  • packages/bubble-runtime/package.json
  • packages/create-bubblelab-app/templates/basic/package.json
  • packages/bubble-scope-manager/package.json
  • packages/bubble-shared-schemas/package.json
  • packages/create-bubblelab-app/package.json
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/bubble-core/package.json
  • packages/create-bubblelab-app/templates/reddit-scraper/package.json
  • packages/bubble-shared-schemas/src/bubbleflow-execution-schema.ts

📝 Walkthrough

Walkthrough

This PR bumps package versions from 0.1.302 to 0.1.303 across core packages and templates, and extends the bubble flow execution schema by adding an exported MAX_EXECUTION_NAME_LENGTH = 120 constant and an optional/nullable name field to bubbleFlowExecutionSchema.

Changes

Cohort / File(s) Summary
Core Package Versions
packages/bubble-core/package.json, packages/bubble-runtime/package.json, packages/bubble-scope-manager/package.json, packages/bubble-shared-schemas/package.json, packages/create-bubblelab-app/package.json
Version bumps from 0.1.302 to 0.1.303.
Schema Enhancement
packages/bubble-shared-schemas/src/bubbleflow-execution-schema.ts
Added exported MAX_EXECUTION_NAME_LENGTH = 120 and new optional/nullable name property to bubbleFlowExecutionSchema (user-assigned execution label).
Template Dependencies
packages/create-bubblelab-app/templates/basic/package.json, packages/create-bubblelab-app/templates/reddit-scraper/package.json
Template runtime dependency ranges updated to reference ^0.1.303 for relevant @bubblelab/* packages.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 Hop-hop, a tiny version hop,

Names now fit, one-two-oh on top,
Packages updated, templates too,
A gentle bump — we’re good as new! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'added name for history executions' accurately describes the main change: adding a name field to the BubbleFlowExecution schema for user-assigned checkpoint labels.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch history_enhances

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 20, 2026

Deploying bubblelab-documentation with  Cloudflare Pages  Cloudflare Pages

Latest commit: fd304e1
Status: ✅  Deploy successful!
Preview URL: https://ea877653.bubblelab-documentation.pages.dev
Branch Preview URL: https://history-enhances.bubblelab-documentation.pages.dev

View logs

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/bubble-shared-schemas/src/bubbleflow-execution-schema.ts`:
- Around line 183-193: The exported MAX_EXECUTION_NAME_LENGTH is defined but not
enforced: update bubbleFlowExecutionSchema to apply
.max(MAX_EXECUTION_NAME_LENGTH) on the name field and add openapi metadata
maxLength: MAX_EXECUTION_NAME_LENGTH; next add a nullable VARCHAR/TEXT `name`
column to the bubbleFlowExecutions table via a new migration that preserves
existing rows and indexes; implement a PATCH handler (e.g., route that updates
execution name by id) that validates input against the same
MAX_EXECUTION_NAME_LENGTH (use the shared schema) and persists to the new
column, and add unit/integration tests for the migration, schema validation, and
PATCH behavior; finally run pnpm build:core to regenerate types after changing
the shared schema.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4c15c17a-28e7-42f8-982d-724b904ebc3c

📥 Commits

Reviewing files that changed from the base of the PR and between 84bf51c and 67dda3f.

📒 Files selected for processing (8)
  • packages/bubble-core/package.json
  • packages/bubble-runtime/package.json
  • packages/bubble-scope-manager/package.json
  • packages/bubble-shared-schemas/package.json
  • packages/bubble-shared-schemas/src/bubbleflow-execution-schema.ts
  • packages/create-bubblelab-app/package.json
  • packages/create-bubblelab-app/templates/basic/package.json
  • packages/create-bubblelab-app/templates/reddit-scraper/package.json

Comment on lines +183 to +193
// Max length for user-assigned execution labels. Shared between the PATCH
// request schema, the DB-agnostic response schema, and the frontend input
// maxLength attribute so the three sides can't drift apart.
export const MAX_EXECUTION_NAME_LENGTH = 120;

// BubbleFlow execution history item schema
export const bubbleFlowExecutionSchema = z.object({
id: z.number().openapi({ description: 'Execution ID' }),
name: z.string().nullable().optional().openapi({
description: 'User-assigned label for this execution (checkpoint name)',
}),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Read-only checks for execution-name persistence and generated/shared-schema updates.

set -euo pipefail

echo "DB schemas / migrations mentioning bubble_flow_executions or execution name:"
rg -n -C3 \
  'bubble_flow_executions|bubbleFlowExecutions|\bname\b' \
  --glob '!node_modules/**' \
  --glob '!dist/**' \
  --glob '!build/**'

echo
echo "API handlers or schemas using MAX_EXECUTION_NAME_LENGTH / execution name:"
rg -n -C3 \
  'MAX_EXECUTION_NAME_LENGTH|execution.*name|name.*execution' \
  --glob '!node_modules/**' \
  --glob '!dist/**' \
  --glob '!build/**'

Repository: bubblelabai/BubbleLab

Length of output: 50379


🏁 Script executed:

# Check the actual schema definition for bubble_flow_executions
cat -n apps/bubblelab-api/src/db/schema-postgres.ts | head -120

Repository: bubblelabai/BubbleLab

Length of output: 5823


🏁 Script executed:

# Search for PATCH schema and MAX_EXECUTION_NAME_LENGTH usage
rg -n "MAX_EXECUTION_NAME_LENGTH" --type ts --type tsx -A 3 -B 1

Repository: bubblelabai/BubbleLab

Length of output: 92


🏁 Script executed:

# Check for PATCH endpoint schema
rg -n "PATCH|patch" apps/bubblelab-api/src --type ts --type tsx -A 5 -B 1 | head -100

Repository: bubblelabai/BubbleLab

Length of output: 92


🏁 Script executed:

# Check for any drizzle migrations that might add the name column
fd -e sql -e ts . apps/bubblelab-api/drizzle-postgres | head -20

Repository: bubblelabai/BubbleLab

Length of output: 1175


🏁 Script executed:

# Check if pnpm build:core was part of the PR or recently run
git log --oneline --all -20 2>/dev/null | grep -i "build:core\|shared.*schema" || echo "Git history not available"

Repository: bubblelabai/BubbleLab

Length of output: 90


🏁 Script executed:

# Check latest migrations for name column addition
cat apps/bubblelab-api/drizzle-postgres/0017_cuddly_kang.sql

Repository: bubblelabai/BubbleLab

Length of output: 441


🏁 Script executed:

# Also check 0016
cat apps/bubblelab-api/drizzle-postgres/0016_add-evaluations-and-execution-logs.sql

Repository: bubblelabai/BubbleLab

Length of output: 989


🏁 Script executed:

# Search for MAX_EXECUTION_NAME_LENGTH more carefully
rg "MAX_EXECUTION_NAME_LENGTH" -n -A 3 -B 1

Repository: bubblelabai/BubbleLab

Length of output: 618


🏁 Script executed:

# Search for PATCH endpoints in API
rg "PATCH|patch.*execut" -n -A 5 -B 2 --glob="apps/bubblelab-api/src/**"

Repository: bubblelabai/BubbleLab

Length of output: 5361


🏁 Script executed:

# Check if build:core is in package.json scripts
cat package.json | grep -A 20 '"scripts"'

Repository: bubblelabai/BubbleLab

Length of output: 2295


🏁 Script executed:

# Read the complete bubbleflow-execution-schema.ts to see the full name field definition
cat packages/bubble-shared-schemas/src/bubbleflow-execution-schema.ts | head -220

Repository: bubblelabai/BubbleLab

Length of output: 7551


🏁 Script executed:

# Also check if there are any execution name PATCH handlers elsewhere
rg -n "execution.*name\|patch.*execution" apps/bubblelab-api/src --glob="**/*.ts" -B 2 -A 5

Repository: bubblelabai/BubbleLab

Length of output: 47


🏁 Script executed:

# Check the dist output of shared-schemas to see if build:core was run
ls -la packages/bubble-shared-schemas/dist/ 2>/dev/null | head -20

Repository: bubblelabai/BubbleLab

Length of output: 47


Wire MAX_EXECUTION_NAME_LENGTH into the schema and back the execution name with persistence, API handler, and migration.

The shared response schema adds a name field for execution labels, but three critical pieces are missing:

  1. Unenforced max length: MAX_EXECUTION_NAME_LENGTH is exported (line 186) but not applied to the name field. The schema should enforce .max(MAX_EXECUTION_NAME_LENGTH) and include maxLength in OpenAPI metadata.

  2. Missing DB column and migration: The bubbleFlowExecutions table has no name column, and no migration adds it. Execution labels cannot persist without backing storage.

  3. No PATCH endpoint: No API handler exists to update execution names. A PATCH endpoint must accept and validate the execution name against MAX_EXECUTION_NAME_LENGTH.

Also, per coding guidelines, run pnpm build:core after modifying shared schemas to regenerate types.

Schema fix: apply max length constraint
-  name: z.string().nullable().optional().openapi({
-    description: 'User-assigned label for this execution (checkpoint name)',
-  }),
+  name: z
+    .string()
+    .max(MAX_EXECUTION_NAME_LENGTH)
+    .nullable()
+    .optional()
+    .openapi({
+      description: 'User-assigned label for this execution (checkpoint name)',
+      maxLength: MAX_EXECUTION_NAME_LENGTH,
+    }),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Max length for user-assigned execution labels. Shared between the PATCH
// request schema, the DB-agnostic response schema, and the frontend input
// maxLength attribute so the three sides can't drift apart.
export const MAX_EXECUTION_NAME_LENGTH = 120;
// BubbleFlow execution history item schema
export const bubbleFlowExecutionSchema = z.object({
id: z.number().openapi({ description: 'Execution ID' }),
name: z.string().nullable().optional().openapi({
description: 'User-assigned label for this execution (checkpoint name)',
}),
// Max length for user-assigned execution labels. Shared between the PATCH
// request schema, the DB-agnostic response schema, and the frontend input
// maxLength attribute so the three sides can't drift apart.
export const MAX_EXECUTION_NAME_LENGTH = 120;
// BubbleFlow execution history item schema
export const bubbleFlowExecutionSchema = z.object({
id: z.number().openapi({ description: 'Execution ID' }),
name: z
.string()
.max(MAX_EXECUTION_NAME_LENGTH)
.nullable()
.optional()
.openapi({
description: 'User-assigned label for this execution (checkpoint name)',
maxLength: MAX_EXECUTION_NAME_LENGTH,
}),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/bubble-shared-schemas/src/bubbleflow-execution-schema.ts` around
lines 183 - 193, The exported MAX_EXECUTION_NAME_LENGTH is defined but not
enforced: update bubbleFlowExecutionSchema to apply
.max(MAX_EXECUTION_NAME_LENGTH) on the name field and add openapi metadata
maxLength: MAX_EXECUTION_NAME_LENGTH; next add a nullable VARCHAR/TEXT `name`
column to the bubbleFlowExecutions table via a new migration that preserves
existing rows and indexes; implement a PATCH handler (e.g., route that updates
execution name by id) that validates input against the same
MAX_EXECUTION_NAME_LENGTH (use the shared schema) and persists to the new
column, and add unit/integration tests for the migration, schema validation, and
PATCH behavior; finally run pnpm build:core to regenerate types after changing
the shared schema.

@Selinali01 Selinali01 merged commit 73ecea2 into main Apr 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant