fix(integrations): show disabled role combobox for readonly members#3958
fix(integrations): show disabled role combobox for readonly members#3958waleedlatif1 wants to merge 4 commits intostagingfrom
Conversation
* feat(block): add cloudwatch integration * Fix bun lock * Add logger, use execution timeout * Switch metric dimensions to map style input * Fix attribute names for dimension map * Fix import styling --------- Co-authored-by: Theodore Li <theo@sim.ai>
* feat(analytics): posthog audit — remove noise, add 10 new events Remove task_marked_read (fires automatically on every task view). Add workspace_id to task_message_sent for group analytics. New events: - search_result_selected: block/tool/trigger/workflow/table/file/ knowledge_base/workspace/task/page/docs with query_length - workflow_imported: count + format (json/zip) - workflow_exported: count + format (json/zip) - folder_created / folder_deleted - logs_filter_applied: status/workflow/folder/trigger/time - knowledge_base_document_deleted - scheduled_task_created / scheduled_task_deleted * fix(analytics): use usePostHog + captureEvent in hooks, track custom date range * fix(analytics): always fire scheduled_task_deleted regardless of workspaceId * fix(analytics): correct format field logic and add missing useCallback deps
…g billing (#3916) * feat(knowledge): add Live sync option to KB connector modal for Max/Enterprise users Adds a "Live" (every 5 min) sync frequency option gated to Max and Enterprise plan users. Includes client-side badge + disabled state, shared sync intervals constant, and server-side plan validation on both POST and PATCH connector routes. * fix(knowledge): record embedding usage cost for KB document processing Adds billing tracking to the KB embedding pipeline, which was previously generating OpenAI API calls with no cost recorded. Token counts are now captured from the actual API response and recorded via recordUsage after successful embedding insertion. BYOK workspaces are excluded from billing. Applies to all execution paths: direct, BullMQ, and Trigger.dev. * fix(knowledge): simplify embedding billing — use calculateCost, return modelName - Use calculateCost() from @/providers/utils instead of inline formula, consistent with how LLM billing works throughout the platform - Return modelName from GenerateEmbeddingsResult so billing uses the actual model (handles custom Azure deployments) instead of a hardcoded fallback string - Fix docs-chunker.ts empty-path fallback to satisfy full GenerateEmbeddingsResult type * fix(knowledge): remove dev bypass from hasLiveSyncAccess * chore(knowledge): rename sync-intervals to consts, fix stale TSDoc comment * improvement(knowledge): extract MaxBadge component, capture billing config once per document * fix(knowledge): add knowledge-base to usage_log_source enum, fix docs-chunker type * fix(knowledge): generate migration for knowledge-base usage_log_source enum value * fix(knowledge): add knowledge-base to usage_log_source enum via drizzle-kit * fix(knowledge): fix search embedding test mocks, parallelize billing lookups * fix(knowledge): warn when embedding model has no pricing entry * fix(knowledge): call checkAndBillOverageThreshold after embedding usage
PR SummaryHigh Risk Overview Enforces plan-based “live sync” for knowledge-base connectors by rejecting Refactors embeddings to return Expands PostHog analytics: emits new server/client events for folder/schedule/document actions, workflow import/export, logs filter usage, and search result selection; removes the Reviewed by Cursor Bugbot for commit 768eda9. Configure here. |
Greptile SummaryThis PR re-lands a previously merged fix (originally #3921) that shows a disabled role
Confidence Score: 5/5Safe to merge — focused, single-file UI fix with no logic regressions Single-file change with a clear, correct intent. The disabled condition properly handles both the permissions guard (!isSelectedAdmin) and the last-admin guard. Grid layout and role-value display are both preserved. Badge import is still used elsewhere in the file. No new issues introduced. No files require special attention Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Render member row] --> B[Always render Combobox]
B --> C{isSelectedAdmin?}
C -- No --> D[disabled = true]
C -- Yes --> E{Last admin?}
E -- Yes --> F[disabled = true]
E -- No --> G[disabled = false]
D --> H[Render empty div spacer]
F --> H
G --> I[Render Remove button]
I --> J{Last admin?}
J -- Yes --> K[Remove button disabled]
J -- No --> L[Remove button enabled]
Reviews (1): Last reviewed commit: "fix(integrations): show disabled role co..." | Re-trigger Greptile |
Re-opening of #3921 — originally merged into staging but lost when the branch was accidentally deleted and recreated from main.