feat: add secrets page#362
Draft
drankou wants to merge 4 commits into
Draft
Conversation
From design system Icon/20px/Vault. Used by the upcoming Secrets page sidebar entry and empty state.
Add the Secrets page skeleton: route + error boundary under
/dashboard/{teamSlug}/secrets, sidebar entry in the integration group with
the new VaultIcon, layout title config, and the empty-state page content
(search input, helper copy, total label, table with 'No secrets added yet').
The 'Add a secret' button is rendered but inert; the next commit wires it to
the new-secret dialog. tRPC list query lands with the BE ticket.
Adds the create flow for secrets:
- Zod schema (label, value, description, allowList { mode, hosts }). Hosts
are wrapped in '{ value }' objects because RHF's useFieldArray treats
arrays of primitives as 'never' \-- flattenHosts unwraps them before the
payload heads to the BE.
- SecretForm: single reusable form (RHF + FormProvider + zodResolver,
mode: 'onChange'). Submit is gated on formState.isValid (+ optional
requireDirty for the future edit flow). Renders label / secret value /
description / allow-list sections plus the footer.
- SecretValueField: masked input with eye / eye-off reveal toggle.
- HostFieldArray: only mounts when allowList.mode === 'specific'; manages
the host list with useFieldArray, min 1 / max MAX_SECRET_HOSTS.
- NewSecretDialog: thin Dialog wrapper around SecretForm with the create
title / Add label. Submit is a toast stub until the BE lands.
- Wires the 'Add a secret' page button to NewSecretDialog.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.