Skip to content

added assembled#319

Merged
Selinali01 merged 1 commit intomainfrom
assembled
Mar 1, 2026
Merged

added assembled#319
Selinali01 merged 1 commit intomainfrom
assembled

Conversation

@Selinali01
Copy link
Contributor

@Selinali01 Selinali01 commented Mar 1, 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

    • Added Assembled service integration enabling users to manage personnel, create and manage activities, handle time-off requests, and list teams and queues through a unified interface.
  • Chores

    • Updated package versions (0.1.210 → 0.1.211) across bubble-core, bubble-runtime, bubble-scope-manager, bubble-shared-schemas, and create-bubblelab-app.

@coderabbitai
Copy link

coderabbitai bot commented Mar 1, 2026

📝 Walkthrough

Walkthrough

Introduces a comprehensive new "AssembledBubble" service integration for managing personnel, activities, time off, and organizational entities. The implementation includes zod-based schema validation, API request utilities with authentication and error handling, credential type registration, and an integration test flow executing multiple sequential operations with conditional branching. Version bumps applied across all packages.

Changes

Cohort / File(s) Summary
Package Version Updates
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, packages/create-bubblelab-app/templates/*/package.json
All packages version bumped from 0.1.210 to 0.1.211.
Assembled Bubble Core Implementation
packages/bubble-core/src/bubbles/service-bubble/assembled/assembled.ts, packages/bubble-core/src/bubbles/service-bubble/assembled/assembled.schema.ts, packages/bubble-core/src/bubbles/service-bubble/assembled/assembled.utils.ts
New ServiceBubble subclass with 12 operation handlers (people management, activities, time off, queues, teams), API request utilities with Basic Auth and timeout handling, and comprehensive zod schemas for parameter validation and result typing.
Assembled Integration Test Flow
packages/bubble-core/src/bubbles/service-bubble/assembled/assembled.integration.flow.ts
New BubbleFlow implementation executing 8 sequential API operations with conditional branching based on person\_id validity, result accumulation, and summary reporting.
Assembled Barrel Export
packages/bubble-core/src/bubbles/service-bubble/assembled/index.ts
New module re-exporting AssembledBubble, schemas, and request utilities for public consumption.
Factory Registration
packages/bubble-core/src/bubble-factory.ts
Wires AssembledBubble into the default bubbles list, dynamic registration, and code-generation boilerplate exposure.
Main Package Export
packages/bubble-core/src/index.ts
Exposes AssembledBubble, parameter schemas, result schemas, and related types at package root API surface.
Shared Schema Configuration
packages/bubble-shared-schemas/src/types.ts, packages/bubble-shared-schemas/src/credential-schema.ts, packages/bubble-shared-schemas/src/bubble-definition-schema.ts, packages/bubble-shared-schemas/src/capability-schema.ts
Adds ASSEMBLED\_CRED credential type with environment variable mapping, UI configuration, bubble-to-credential bindings, and expands CapabilityId and BubbleName union types.
UI Credential Display
apps/bubble-studio/src/pages/CredentialsPage.tsx
Maps CredentialType.ASSEMBLED\_CRED to 'Assembled' display name in credential type resolution.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

  • PR #272: Adds new service bubble integration with credential and schema registration following similar patterns of modification across bubble-factory, shared-schemas, and credential configuration surfaces.
  • PR #312: Modifies bubble factory registration and CredentialsPage credential-to-service mapping for adding a new service bubble, sharing structural approach with this implementation.
  • PR #308: Updates credential-to-service name mapping and introduces new service bubble with credential type registration in shared schemas, following comparable integration patterns.

Poem

🐰 A bubble assembled, so shiny and new,
With people and time-off and queues in its view,
Authentication flows like a carrot so sweet,
Sequential operations, a service complete!
From factory to schemas, each piece in its place—
Our Assembled friend hops through API space! 🚀

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'added assembled' is vague and lacks specificity, using generic phrasing that does not clearly convey the substantial changes made across multiple packages and services. Consider using a more descriptive title such as 'Add AssembledBubble service integration with API operations and schemas' to better reflect the scope of changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch assembled

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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

Deploying bubblelab-documentation with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2ab28ba
Status: ✅  Deploy successful!
Preview URL: https://8f74baa5.bubblelab-documentation.pages.dev
Branch Preview URL: https://assembled.bubblelab-documentation.pages.dev

View logs

Copy link

@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: 4

🤖 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-core/src/bubbles/service-bubble/assembled/assembled.integration.flow.ts`:
- Line 87: The output currently emits the full person payload via
JSON.stringify(createResult.data?.person); change the integration output to only
include non-sensitive identifiers (e.g., person.id, person.uuid, or
person.externalId) instead of the whole object. Locate the template string that
references createResult.data?.person in assembled.integration.flow.ts and
replace the JSON.stringify usage with a concise identifier(s) (for example
`createResult.data?.person.id`) so PII like name/email is not included in flow
output or logs.

In `@packages/bubble-core/src/bubbles/service-bubble/assembled/assembled.ts`:
- Around line 192-193: The path templates in assembled.ts interpolate raw IDs
(e.g., `/people/${params.person_id}` and the other occurrences at the same file
around the other reported spots) which can break routing for IDs containing
reserved URL characters; update those interpolations to use encodeURIComponent
on the ID values before inserting them into the path (e.g., replace direct uses
of params.person_id and the other raw id variables with encoded values) so all
requests build safe paths; ensure you update every occurrence mentioned (the
instances at the earlier `/people/${params.person_id}` and the two other
interpolations noted) and run tests or a quick manual check to confirm endpoints
remain correct.
- Line 315: The current guard if (params.allow_conflicts) body.allow_conflicts =
params.allow_conflicts; drops explicit false; change the check to test for
presence instead of truthiness (e.g., if
(params.hasOwnProperty('allow_conflicts')) or if (typeof params.allow_conflicts
!== 'undefined') ) and then assign body.allow_conflicts = params.allow_conflicts
so false is preserved; update the logic in assembled.ts around the
params.allow_conflicts → body.allow_conflicts assignment.

In `@packages/bubble-shared-schemas/src/bubble-definition-schema.ts`:
- Line 77: Add the new ASSEMBLED_CRED mapping and then run the core build to
regenerate types: ensure CredentialType.ASSEMBLED_CRED is present in the enum
and that the empty config entry in bubble-definition-schema.ts
([CredentialType.ASSEMBLED_CRED]: {}) is committed, then run pnpm build:core to
rebuild the shared schema types so downstream packages pick up the new
credential mapping.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 475bdbe and 2ab28ba.

📒 Files selected for processing (19)
  • apps/bubble-studio/src/pages/CredentialsPage.tsx
  • packages/bubble-core/package.json
  • packages/bubble-core/src/bubble-factory.ts
  • packages/bubble-core/src/bubbles/service-bubble/assembled/assembled.integration.flow.ts
  • packages/bubble-core/src/bubbles/service-bubble/assembled/assembled.schema.ts
  • packages/bubble-core/src/bubbles/service-bubble/assembled/assembled.ts
  • packages/bubble-core/src/bubbles/service-bubble/assembled/assembled.utils.ts
  • packages/bubble-core/src/bubbles/service-bubble/assembled/index.ts
  • packages/bubble-core/src/index.ts
  • packages/bubble-runtime/package.json
  • packages/bubble-scope-manager/package.json
  • packages/bubble-shared-schemas/package.json
  • packages/bubble-shared-schemas/src/bubble-definition-schema.ts
  • packages/bubble-shared-schemas/src/capability-schema.ts
  • packages/bubble-shared-schemas/src/credential-schema.ts
  • packages/bubble-shared-schemas/src/types.ts
  • packages/create-bubblelab-app/package.json
  • packages/create-bubblelab-app/templates/basic/package.json
  • packages/create-bubblelab-app/templates/reddit-scraper/package.json

operation: 'create_person',
success: createResult.success,
details: createResult.success
? `Created person: ${JSON.stringify(createResult.data?.person)}`
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Avoid emitting full person payload in integration output details.

Line 87 includes JSON.stringify(createResult.data?.person), which can leak PII (for example email/name) through flow output and logs. Return only non-sensitive identifiers.

🔧 Proposed fix
     results.push({
       operation: 'create_person',
       success: createResult.success,
       details: createResult.success
-        ? `Created person: ${JSON.stringify(createResult.data?.person)}`
+        ? `Created person ID: ${((createResult.data?.person as Record<string, unknown>)?.id as string | undefined) ?? 'unknown'}`
         : createResult.error,
     });
📝 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
? `Created person: ${JSON.stringify(createResult.data?.person)}`
results.push({
operation: 'create_person',
success: createResult.success,
details: createResult.success
? `Created person ID: ${((createResult.data?.person as Record<string, unknown>)?.id as string | undefined) ?? 'unknown'}`
: createResult.error,
});
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/bubble-core/src/bubbles/service-bubble/assembled/assembled.integration.flow.ts`
at line 87, The output currently emits the full person payload via
JSON.stringify(createResult.data?.person); change the integration output to only
include non-sensitive identifiers (e.g., person.id, person.uuid, or
person.externalId) instead of the whole object. Locate the template string that
references createResult.data?.person in assembled.integration.flow.ts and
replace the JSON.stringify usage with a concise identifier(s) (for example
`createResult.data?.person.id`) so PII like name/email is not included in flow
output or logs.

Comment on lines +192 to +193
path: `/people/${params.person_id}`,
apiKey,
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Encode path IDs before URL interpolation.

Line 192, Line 254, and Line 423 interpolate raw IDs into path segments. Reserved characters in IDs (/, ?, #) can change routing and hit the wrong endpoint.

🔧 Proposed fix
-      path: `/people/${params.person_id}`,
+      path: `/people/${encodeURIComponent(params.person_id)}`,
...
-      path: `/people/${params.person_id}`,
+      path: `/people/${encodeURIComponent(params.person_id)}`,
...
-      path: `/time_off/${params.time_off_id}/cancel`,
+      path: `/time_off/${encodeURIComponent(params.time_off_id)}/cancel`,

Also applies to: 254-255, 423-424

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/bubble-core/src/bubbles/service-bubble/assembled/assembled.ts`
around lines 192 - 193, The path templates in assembled.ts interpolate raw IDs
(e.g., `/people/${params.person_id}` and the other occurrences at the same file
around the other reported spots) which can break routing for IDs containing
reserved URL characters; update those interpolations to use encodeURIComponent
on the ID values before inserting them into the path (e.g., replace direct uses
of params.person_id and the other raw id variables with encoded values) so all
requests build safe paths; ensure you update every occurrence mentioned (the
instances at the earlier `/people/${params.person_id}` and the two other
interpolations noted) and run tests or a quick manual check to confirm endpoints
remain correct.

};
if (params.channels) body.channels = params.channels;
if (params.description) body.description = params.description;
if (params.allow_conflicts) body.allow_conflicts = params.allow_conflicts;
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

allow_conflicts=false is currently dropped from the request.

Line 315 uses a truthy guard, so explicit false is omitted. This can change API behavior if server defaults differ.

🔧 Proposed fix
-    if (params.allow_conflicts) body.allow_conflicts = params.allow_conflicts;
+    if (params.allow_conflicts !== undefined) {
+      body.allow_conflicts = params.allow_conflicts;
+    }
📝 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
if (params.allow_conflicts) body.allow_conflicts = params.allow_conflicts;
if (params.allow_conflicts !== undefined) {
body.allow_conflicts = params.allow_conflicts;
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/bubble-core/src/bubbles/service-bubble/assembled/assembled.ts` at
line 315, The current guard if (params.allow_conflicts) body.allow_conflicts =
params.allow_conflicts; drops explicit false; change the check to test for
presence instead of truthiness (e.g., if
(params.hasOwnProperty('allow_conflicts')) or if (typeof params.allow_conflicts
!== 'undefined') ) and then assign body.allow_conflicts = params.allow_conflicts
so false is preserved; update the logic in assembled.ts around the
params.allow_conflicts → body.allow_conflicts assignment.

[CredentialType.ATTIO_CRED]: {},
[CredentialType.HUBSPOT_CRED]: {},
[CredentialType.SORTLY_API_KEY]: {},
[CredentialType.ASSEMBLED_CRED]: {},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify ASSEMBLED_CRED is defined in CredentialType enum and related files

echo "=== Checking CredentialType enum for ASSEMBLED_CRED ==="
rg -n "ASSEMBLED_CRED" --type=ts -C2 packages/bubble-shared-schemas/src/types.ts

echo ""
echo "=== Checking credential-schema.ts for ASSEMBLED_CRED mappings ==="
rg -n "ASSEMBLED_CRED" --type=ts -C2 packages/bubble-shared-schemas/src/credential-schema.ts

echo ""
echo "=== Checking bubble-definition-schema.ts for context ==="
rg -n "ASSEMBLED_CRED\|CREDENTIAL_CONFIGURATION_MAP" --type=ts -A5 -B5 packages/bubble-shared-schemas/src/bubble-definition-schema.ts | head -60

Repository: bubblelabai/BubbleLab

Length of output: 926


🏁 Script executed:

# Verify the context around line 77 in bubble-definition-schema.ts to see the full CREDENTIAL_CONFIGURATION_MAP structure
sed -n '70,90p' packages/bubble-shared-schemas/src/bubble-definition-schema.ts

Repository: bubblelabai/BubbleLab

Length of output: 790


LGTM! Remember to run pnpm build:core after this change.

The new ASSEMBLED_CRED entry follows the established pattern for credential configuration mappings. The empty config object is appropriate since Assembled doesn't require proxy or special configuration fields like some other credentials (e.g., AMAZON_CRED, LINKEDIN_CRED). Verification confirms ASSEMBLED_CRED is properly defined in the CredentialType enum and has corresponding credential schema mappings.

Since this is a shared schema modification in /packages/bubble-shared-schemas, remember to run pnpm build:core to regenerate the types.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/bubble-shared-schemas/src/bubble-definition-schema.ts` at line 77,
Add the new ASSEMBLED_CRED mapping and then run the core build to regenerate
types: ensure CredentialType.ASSEMBLED_CRED is present in the enum and that the
empty config entry in bubble-definition-schema.ts
([CredentialType.ASSEMBLED_CRED]: {}) is committed, then run pnpm build:core to
rebuild the shared schema types so downstream packages pick up the new
credential mapping.

@Selinali01 Selinali01 merged commit 41ba4e6 into main Mar 1, 2026
8 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