### 🧩 Problem
- Tables **without primary keys** were previously selectable in the form
generator, leading to issues with data operations that require unique
identifiers.
- **Snowflake datasources** defaulted to `READ_ONLY` mode, unnecessarily
limiting users from performing query generation operations.
---
### ✅ Solution
- Disabled selection of tables that **lack primary keys** in the form
generator dropdown.
- Added **tooltips and helper text** to explain why certain tables are
disabled.
- Updated the **Snowflake query generator** to default to `READ_WRITE`
mode.
- Improved UI components to:
- Gracefully handle disabled options
- Clearly communicate restrictions to users
---
### 💡 Why This Solution Works
- Prevents users from selecting **invalid or unsuitable tables**,
reducing runtime errors.
- Improves the **user experience** through helpful visual cues and
explanations.
- Aligns Snowflake’s behavior with user expectations for **write
capabilities**.
- Maintains **backward compatibility** for both new and existing
configurations.
Fixes - https://github.com/appsmithorg/appsmith-ee/issues/6913
## Automation
/ok-to-test tags="@tag.JSONForm, @tag.PropertyPane, @tag.GenerateCRUD,
@tag.Datasource, @tag.Sanity, @tag.Widget"
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/14510160658>
> Commit: 380e8515ae5ba4ad737c8e41f2678eb43dce22ea
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14510160658&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.JSONForm, @tag.PropertyPane, @tag.GenerateCRUD,
@tag.Datasource, @tag.Sanity, @tag.Widget`
> Spec:
> <hr>Thu, 17 Apr 2025 08:51:45 UTC
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Dropdown options now visually indicate when a table lacks primary
keys, disabling selection and displaying an explanatory message.
- An informational message about primary key requirements is shown below
the table selection dropdown.
- Dropdown options can now display additional subtext for improved
context.
- **Enhancements**
- Improved handling of datasource-specific behaviors, including support
for MongoDB and Google Sheets.
- Added connection mode detection for Snowflake datasources.
- **Chores**
- Added new utility functions and constants to support enhanced dropdown
behavior and messaging.
- **Tests**
- Added tests to verify connection mode detection for Snowflake
datasources.
- Added comprehensive tests for datasource-specific dropdown option
behavior in the table/spreadsheet selector.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->