Skip to content

Conversation

@emanueca
Copy link

@emanueca emanueca commented Oct 28, 2025

This PR adds a minimal, framework-free HTML/JS demo under /examples to visualize four Salesforce REST API actions through the project's backend proxy.

Includes:

  • examples/salesforce-ui.html
  • examples/README.md

Features:

  • Demonstrates: Get record by Id, Update record by Id, Upsert by External Id, and Describe (list custom fields).
  • Validates required fields and JSON payloads.
  • Shows HTTP status and parsed JSON/text responses.
  • Adds loading states for UX and inline documentation for backend expectations.
  • Accessible labels and aria-live outputs.

Next steps:
Once maintainers confirm endpoint paths and preferred objects (e.g., Account/Contact) or fields (External_Id__c), the UI can be easily adjusted.

Thanks for reviewing!
-Emanuel Ziegler Martins.

Summary by CodeRabbit

  • Documentation

    • Added comprehensive guide for Salesforce Actions Demo describing API endpoint contracts, backend integration patterns, server-side authentication, and usage workflows.
  • New Features

    • Added example HTML-based UI for Salesforce operations including Get record, Update record, Upsert by External Id, and Describe object functionality with built-in validation and error handling.

This file contains a UI for interacting with Salesforce API actions, including retrieving, updating, upserting records, and listing custom fields.
@vercel
Copy link

vercel bot commented Oct 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Oct 28, 2025 6:21pm

@adolfo-pd adolfo-pd added the User submitted Submitted by a user label Oct 28, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 28, 2025

Walkthrough

Adds comprehensive documentation and a new standalone HTML UI for demonstrating Salesforce REST API interactions. The README describes the demo framework, four action types (Get, Update, Upsert, Describe), backend endpoint contracts, and implementation details. The HTML file provides a framework-free interface with input validation and response rendering.

Changes

Cohort / File(s) Change Summary
Documentation
examples/README.md
Adds comprehensive guide describing Salesforce Actions Demo, including UI interactions, backend endpoint contracts, four REST actions (Get by Id, Update by Id, Upsert by External Id, Describe metadata), authentication flow, error handling, accessibility, and server-side implementation notes.
UI Component
examples/salesforce-ui.html
Introduces new standalone HTML UI with embedded JavaScript for Salesforce demo. Defines four action cards with input validation, API handlers (getById, updateById, upsertByExternal, describeObject), response parsing with status metadata, and color-coded result rendering.

Sequence Diagram

sequenceDiagram
    participant User as User (Browser)
    participant UI as Salesforce UI<br/>(HTML/JS)
    participant Server as Backend Server
    participant SF as Salesforce API

    User->>UI: Enter inputs & submit action
    Note over UI: Validate required fields
    UI->>UI: Set loading state
    UI->>Server: POST /api/sf/[action]<br/>with payload
    Note over Server: Authenticate request<br/>Handle CORS<br/>Map method overrides
    Server->>SF: Call Salesforce REST API
    SF-->>Server: Response (JSON/text)
    Server-->>UI: Status + data
    UI->>UI: Parse response<br/>Color-code result
    UI-->>User: Display success/error
Loading

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • New HTML file with straightforward JavaScript logic; no existing code modified
  • Input validation and response handling are basic utility functions
  • Documentation is clear and informative with explicit backend responsibilities
  • Minimal architectural decisions; primarily demo/reference material

Poem

🐰 A UI for Salesforce dreams to take flight,
Framework-free forms with validation just right,
Four little cards make the backend dance,
Color-coded results—green for good chance!
Server keeps secrets, no CORS in sight! 🚀

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Add static HTML/JS demo for Salesforce REST actions" accurately and concisely describes the main change in the changeset. It clearly identifies the primary addition (a static HTML/JS demo), specifies the context (Salesforce REST actions), and indicates the scope (demo). The title is specific enough that a teammate scanning history would understand the core purpose of the change without ambiguity. No misleading or vague terminology is used.
Description Check ✅ Passed The pull request description provides comprehensive information about the changes despite not following the exact template format. While the template requires a "## WHY" section header, the author's description effectively explains the purpose (visualizing Salesforce REST API actions through the backend proxy), details what is included (two files with specific features), and clearly outlines next steps for maintainers. The content is well-structured with labeled sections (Includes, Features, Next steps) and addresses the core requirement of explaining the rationale and scope of the changes.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 36a8917 and 11d59cc.

📒 Files selected for processing (2)
  • examples/README.md (1 hunks)
  • examples/salesforce-ui.html (1 hunks)
🔇 Additional comments (2)
examples/salesforce-ui.html (1)

1-245: Well-structured, accessible HTML/JS demo with solid error handling.

The implementation is clean and framework-free as intended. Proper use of aria-live regions, label associations, and encodeURIComponent() for URL safety. Error handling covers JSON parsing failures and network errors with user-facing feedback. The backend responsibility comment (lines 108–122) is helpful context for maintainers.

examples/README.md (1)

1-58: Clear, accurate documentation that aligns with implementation.

The README correctly documents endpoint contracts (lines 22–25 match the HTML API object), describes the validation flow (lines 40–45 match the code), and notes accessibility features (lines 48–49 correctly reference aria-live implementation). Usage steps (lines 31–38) are practical with concrete examples. Limitations (lines 51–53) are honestly stated.


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.

@emanueca
Copy link
Author

Thanks for reviewing! This is a pre-alpha demo mainly to visualize the Salesforce REST endpoints through the internal proxy. I can adjust endpoints or naming if needed. Thanks!

@emanueca emanueca deleted the add-salesforce-ui-prealpha branch October 29, 2025 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

User submitted Submitted by a user

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants