Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • added ability so select certain rows in supabase tools

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Jan 6, 2026

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

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Jan 6, 2026 8:14pm

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 6, 2026

Greptile Summary

Added column selection capability to Supabase query and get_row tools via a new optional select parameter, allowing users to specify which columns to return instead of always returning all columns.

  • Added select parameter to SupabaseQueryParams and SupabaseGetRowParams type definitions
  • Implemented URL encoding for the select parameter using encodeURIComponent() to handle special characters in PostgREST syntax
  • Added UI field in the Supabase block configuration with appropriate placeholder text
  • Updated documentation for both affected operations
  • Fixed unrelated Kalshi documentation by removing non-existent output fields

Confidence Score: 5/5

  • This PR is safe to merge with no issues found
  • The implementation properly addresses the previous review comments about URL encoding, follows existing patterns in the codebase (like text_search.ts), includes comprehensive updates across all layers (types, tools, blocks, documentation), and the changes are straightforward with no logical errors
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/tools/supabase/query.ts Added select parameter with proper URL encoding to allow column selection
apps/sim/tools/supabase/get_row.ts Added select parameter with proper URL encoding to allow column selection
apps/sim/tools/supabase/types.ts Added select field to SupabaseQueryParams and SupabaseGetRowParams interfaces
apps/sim/blocks/blocks/supabase.ts Added UI field for select parameter and included in tool descriptions

Sequence Diagram

sequenceDiagram
    participant User
    participant Block as Supabase Block
    participant Tool as Query/GetRow Tool
    participant Supabase as Supabase REST API

    User->>Block: Configure operation with select parameter
    Note over User,Block: select: "id,name,email" (optional)
    Block->>Tool: Execute with params (including select)
    Tool->>Tool: Encode select parameter
    Note over Tool: encodeURIComponent(selectColumns)
    Tool->>Supabase: GET /rest/v1/{table}?select={encoded_columns}&filter=...
    Supabase-->>Tool: Return only specified columns
    Tool-->>Block: Transform response
    Block-->>User: Display selected columns only
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

6 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1
Copy link
Collaborator Author

@greptile

@waleedlatif1 waleedlatif1 merged commit 46b04a9 into staging Jan 6, 2026
11 checks passed
@waleedlatif1 waleedlatif1 deleted the feat/supabase branch January 6, 2026 20:21
waleedlatif1 added a commit that referenced this pull request Jan 8, 2026
#2689)

* feat(supabase): added ability so select certain rows in supabase tools

* ack PR comments
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.

2 participants