Commit Graph

17 Commits

Author SHA1 Message Date
Alaister Young
45ffa97240 [FE-3096] feat(studio): split edge function secrets into custom and default sections (#45355)
Splits the Edge Function secrets page into two sections so reserved
Supabase env vars are always visible, even on new projects without any
user secrets created.

<img width="1605" height="1006" alt="Screenshot 2026-04-29 at 12 20
43 PM"
src="https://github.com/user-attachments/assets/fc74f10e-557d-45bb-b0f0-66a706a9facb"
/>

**Added:**
- `DefaultEdgeFunctionSecrets` component — a read-only reference list
(Name + Description) of every `SUPABASE_*`, `SB_*`, and `DENO_*` env var
available in every project, sourced from [the
docs](https://supabase.com/docs/guides/functions/secrets#default-secrets)
- `isInternalEdgeFunctionSecret` helper used to filter the custom
secrets table

**Changed:**
- The custom secrets section now renders first (more actionable), with
the educational default secrets section below it
- Custom secrets table now filters out anything matching `SUPABASE_*` or
any of the hardcoded default names

**Removed:**
- `isReservedSecret` regex check + its tooltip branches in
`EdgeFunctionSecret.tsx` — dead code now that the custom table never
receives an internal secret

Addresses
[FE-3096](https://linear.app/supabase/issue/FE-3096/split-edge-function-secrets-into-internal-and-user-defined-views).

## To test

- Open `/project/_/functions/secrets` on a fresh project (no custom
secrets)
- "Default secrets" section is visible and lists all 9 env vars with
descriptions
  - "Custom secrets" section shows the empty state
- Create a custom secret — appears in the Custom section, not the
Default section
- Edit/delete dropdown still works on custom secrets
- Search input only filters the custom secrets table

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added a "Default secrets" section showing built-in edge-function
secrets with names, descriptions, and a "Deprecated" badge where
applicable.
* Secret names are clickable to copy to clipboard with a success
notification; secret names/values use inline code styling.
* UI now separates "Custom secrets" and "Default secrets" with distinct
empty states.

* **Bug Fixes**
* Edit/Delete controls reflect actual permission state (no longer
disabled for default/reserved secrets).

* **Tests**
  * Added tests for default-secret detection and visibility rules.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-04-29 18:08:32 +08:00
Gildas Garcia
0facd341a6 chore: remove UI form components _Shadcn_ suffix (#45212)
## Problem

We used to have a `_Shadcn_` suffix for all the shadcn form components
because we also had `formik` form components.
This is not needed anymore.

## Solution

- Remove the suffix
- Update all usages
2026-04-24 12:14:15 +02:00
Charis
4a0bb36ca8 style: require sorted imports in studio/components (#44408)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-04-01 10:22:37 +02:00
Danny White
c3163fbf74 chore(studio): hide password managers from edge functions (#42667)
## What kind of change does this PR introduce?

- Chore
- Resolves DEPR-163

## What is the current behavior?

1Password and other password managers’ widgets pop up in the _Name_
`input` despite that being irrelevant to password managers.
 
## What is the new behavior?

We tell that field to ignore password mangers.

## Additional context

Apple’s own password manager does not have an attribute and the secret
value is password-like, so I’m unable to hide theirs.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Improved form behavior with password managers by updating input
configuration settings on the edge function secrets form.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-11 17:05:58 +11:00
Joshen Lim
8233902aef chore(studio): Edge functions secrets trim secret value for single value (#42382)
## Context

Addresses a small footgun where copying and paste a single value with
new lines and hitting save in the edge function secrets page will also
save the new lines in the secret name.

Fix is just adding a trim

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Internal code organization and refactoring improvements to enhance
codebase maintainability and consistency across the Functions module.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-03 15:04:35 +08:00
Vaibhav
7981846a0e fix(studio): toggle secret visibility independently in edge function secrets (#41487)
* fix(studio): toggle secret visibility independently in edge function secrets

* nits

* cleanup

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
2025-12-22 13:35:03 +11:00
Danny White
1f84a19608 chore(studio): improve Edge Functions layout (#41176)
* subtitle clarity

* improve secrets presentation

* presentation improvements

* consistency

* improve NoPermission component
2025-12-10 09:41:31 +11:00
Ivan Vasilov
43cc61818c chore: Migrate all isPending uses in react-query (#40642)
* Bump react-query. Minor type and logic fixes.

* Migrate all use of isLoading to isPending in mutations.

* Fix type errors.
2025-11-20 16:44:53 +01:00
Kalleby Santos
5606d07fc2 feat(studio): improve new secret form ux (#40142)
Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-11-07 15:04:25 -05:00
Matt Johnston
68fbcad6cf fix: omit quotes in values when .env contents are pasted into input (#39497)
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-14 10:42:00 +08:00
Danny White
e131e18623 fix(studio): remove password managers from inputs (#39187)
* fix: change name prop value

* chore: use attribute instead and catch other password managers

* chore: add comment

* fix: remove password manager from edge function secrets inputs

* chore: remove comments
2025-10-02 11:26:22 +10:00
Saxon Fletcher
af9310f5b3 ui consistency issues (#37823)
* ui consistency issues

* storage policies

* copy

* Fix storage policies y gap

* Small fixes

* Add deprecated comments

* Use Card component for S3 settings

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-13 10:55:09 +10:00
Lakshan Perera
e4c50cefce feat: Add duplicate key check with confirmation dialog for Edge Function secrets (#36793)
- Created DuplicateSecretWarningModal component following the pattern of DeployEdgeFunctionWarningModal
- Added duplicate key detection logic to AddNewSecretForm before secret creation
- Shows confirmation dialog when attempting to create a secret with an existing name
- Allows users to proceed with replacing the existing secret or cancel the operation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-01 19:15:39 +10:00
Terry Sutton
86f746e363 Chore/fix ef secret paste (#34065)
Fix pasting a single value
2025-03-10 19:30:26 +08:00
Terry Sutton
c02d13bd6c Chore/efs pasting again (#33847)
fix pasting multiple times
2025-02-25 23:14:25 +01:00
Terry Sutton
d1a17b9c61 Chore/ef secret reset (#33842)
* Reset secrets form after submission

* Try a different fix.

* Align the delete button.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-02-25 12:42:05 -03:30
Terry Sutton
dc137679be Edge functions secrets updates (#31329)
* Rename secrets to env vars, add inline form

* Add multiple

* Fix adding multiple

* Change name back

* Sm update

* Add docs for secrets management

* Fix file paths

* Prettier

* Fix image paths

* Images

* clean up

* Fix form submit

* Minor fixes.

* Remove console logs.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-02-25 10:47:59 -03:30