Skip to content

improvement(function): secrets access dropdown - #6118

Merged
Sg312 merged 2 commits into
stagingfrom
staging-v18
Jul 31, 2026
Merged

improvement(function): secrets access dropdown#6118
Sg312 merged 2 commits into
stagingfrom
staging-v18

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

Selected secrets access dropdown UI improvement. Personal v Workspace secrets fix.

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

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 31, 2026 3:29am

Request Review

@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI and client-side option fetching for the Function secrets picker; no auth or execution-path changes beyond listing names the resolver already exposes.

Overview
Improves the Function block Secrets multi-select when secret access is narrowed to Selected secrets: secret names stay case-sensitive in the picker and selected chips (via new dropdown preserveLabelCase), matching {{NAME}} references in code instead of being lowercased for display.

Secret name loading now uses only the workspace-environment query (environment.workspace + environment.personal), aligned with executor resolution and {{VAR}} autocomplete, instead of merging a separate personal /api/environment fetch—so shared personal secrets visible at runtime appear in the list.

Multi-select value chips use ChipTag field instead of mono so labels read clearly on combobox/input surfaces; field is a new stepped-surface variant in the design system.

Reviewed by Cursor Bugbot for commit f0959d8. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR corrects and improves the Function block’s selected-secret dropdown.

  • Enumerates workspace secret names from the workspace environment’s flat name-to-value record and combines them with personal secret names.
  • Preserves case-sensitive secret names throughout dropdown option and selected-chip rendering.
  • Adds a field-oriented ChipTag variant to improve selected-secret visibility within form controls.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete correctness, security, or build failures identified.

The workspace environment contract defines workspace secrets as a flat string record, the corrected traversal enumerates that record’s keys, and preserved labels remain compatible with exact-value selection and case-insensitive filtering.

Important Files Changed

Filename Overview
apps/sim/lib/workflows/subblocks/options.ts Correctly enumerates workspace secret names from the flat workspace environment record while retaining personal/workspace deduplication.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/dropdown/dropdown.tsx Adds opt-in case-preserving labels without changing selection identity or case-insensitive search behavior, and adopts the new field chip styling.
apps/sim/blocks/blocks/function.ts Enables case-preserving display specifically for the Function block’s case-sensitive mounted-secret identifiers.
apps/sim/blocks/types.ts Extends SubBlockConfig with the optional dropdown label-case behavior.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx Propagates the new SubBlockConfig option to the dropdown renderer.
packages/emcn/src/components/chip-tag/chip-tag.tsx Adds a typed field variant whose surface tokens distinguish tags from their containing form field.

Reviews (1): Last reviewed commit: "improvement(function): secrets access dr..." | Re-trigger Greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f0959d8. Configure here.

@Sg312
Sg312 merged commit 413784e into staging Jul 31, 2026
26 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.

2 participants