Repository navigation
Conversation
…e settings route was active
Apikeys pgconfig fix
better description for the insufficient resources issue when creating and cloning a branch
fixed an issue with the remote build
deleted a commented page that would cause the build to fail
added meat ball menu to the branch card, fixed empty env badge
There was a problem hiding this comment.
Pull request overview
Release PR for “Vela 26.4”, bundling several Studio UX and platform-integration updates (API keys, branch actions, PgBouncer config updates) plus a small Docker dev tweak.
Changes:
- Add SELinux-compatible bind mount labels to the remote dev docker-compose setup.
- Consolidate API Keys UI into the
/settings/api-keysindex route and adjust related layout behavior. - Improve branch management UX (actions dropdown + controllable resize modal) and adjust PgBouncer config update payload handling/typing.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| docker/docker-compose.remote.yml | Adds :Z to bind mounts for SELinux compatibility. |
| apps/studio/pages/org/[slug]/project/[ref]/branch/[branch]/settings/api-keys/new.tsx | Removes the /api-keys/new page route. |
| apps/studio/pages/org/[slug]/project/[ref]/branch/[branch]/settings/api-keys/index.tsx | Replaces legacy API keys page content with the new API keys UI. |
| apps/studio/data/database/pgbouncer-config-update-mutation.ts | Broadens PgBouncer update variables and forwards a rest-body payload. |
| apps/studio/components/layouts/APIKeys/APIKeysLayout.tsx | Disables API keys sub-navigation (commented prop) and keeps legacy/new navigation item definitions. |
| apps/studio/components/interfaces/Sidebar.tsx | Prevents “Branch Settings” nav item from showing active state on database settings routes. |
| apps/studio/components/interfaces/Settings/Database/ConnectionPooling/ConnectionPooling.tsx | Changes PgBouncer update payload construction (merge response + form values, delete fields). |
| apps/studio/components/interfaces/Branch/ResizeBranchModal.tsx | Adds controlled open state support and optional trigger hiding. |
| apps/studio/components/interfaces/Branch/NewBranchForm.tsx | Improves disabled-state UX (tooltip reasons) and resource slider validation messaging. |
| apps/studio/components/interfaces/Branch/BranchCard.tsx | Replaces inline branch action buttons with a new actions menu. |
| apps/studio/components/interfaces/Branch/BranchActionsMenu.tsx | Introduces a dropdown actions menu (resize/clone/logs/settings/delete). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <PageLayout | ||
| title="API Keys" | ||
| subtitle="Configure API keys to securely control access to your project" | ||
| navigationItems={navigationItems} | ||
| // navigationItems={navigationItems} | ||
| > |
There was a problem hiding this comment.
navigationItems is commented out, which makes the navigationItems variable unused (likely failing lint/noUnusedLocals) and also hides the API Keys sub-navigation entirely. Either re-enable navigationItems (updating the items if needed) or remove the unused navigationItems definition and this commented prop.
| <PageLayout | ||
| title="API Keys" | ||
| subtitle="Configure API keys to securely control access to your project" | ||
| navigationItems={navigationItems} | ||
| // navigationItems={navigationItems} | ||
| > |
There was a problem hiding this comment.
The navigationItems you’ve commented out still includes an href to /settings/api-keys/new, but this PR removes the corresponding pages/.../settings/api-keys/new.tsx page. Please update any remaining references to /api-keys/new (or add a redirect/stub page) to avoid broken navigation/bookmarks.
| // const ApiKeysLegacyPage: NextPageWithLayout = () => { | ||
| // return <DisplayApiSettings showTitle={false} showNotice={false} /> | ||
| // } | ||
|
|
There was a problem hiding this comment.
Please avoid keeping the legacy page implementation as commented-out code. If the legacy view is still needed for rollback, gate it behind a runtime flag/route; otherwise remove the commented block to reduce maintenance noise.
| // const ApiKeysLegacyPage: NextPageWithLayout = () => { | |
| // return <DisplayApiSettings showTitle={false} showNotice={false} /> | |
| // } |
| import BranchEnvBadge from 'components/interfaces/Branch/BranchEnvBadge' | ||
| import { BranchResourceBadge } from 'components/interfaces/Branch/BranchResourceBadge' | ||
| import ResizeBranchModal from 'components/interfaces/Branch/ResizeBranchModal' | ||
| import { BranchActionsMenu } from './BranchActionsMenu' |
There was a problem hiding this comment.
ResizeBranchModal is now imported but no longer rendered in this component after moving actions into BranchActionsMenu. Also, Trash2 is still imported from lucide-react but no longer used. Please remove these unused imports to avoid TS/ESLint build failures.
| orgSlug={orgSlug} | ||
| projectRef={projectRef} | ||
| openAllowed={openAllowed} | ||
| cloneHref={`/new/${orgSlug}/${projectRef}/${branch.id}?name=Clone%20of%20${branch.name}`} |
There was a problem hiding this comment.
cloneHref interpolates branch.name directly into the query string. If the branch name contains spaces or reserved URL characters, this will produce an invalid URL / incorrect name value. URL-encode the dynamic portion (e.g., the branch name) when building this href.
| cloneHref={`/new/${orgSlug}/${projectRef}/${branch.id}?name=Clone%20of%20${branch.name}`} | |
| cloneHref={`/new/${orgSlug}/${projectRef}/${branch.id}?name=${encodeURIComponent(`Clone of ${branch.name}`)}`} |
| <> | ||
| <DropdownMenu> | ||
| <DropdownMenuTrigger asChild> | ||
| <Button type="text" size="tiny" icon={<MoreVertical size={16} />} /> |
There was a problem hiding this comment.
The kebab/"more" menu trigger is an icon-only button but doesn’t provide an accessible label (title/aria-label). Other menus in the codebase set title="More options" on this kind of trigger; please add an accessible label here as well.
| <Button type="text" size="tiny" icon={<MoreVertical size={16} />} /> | |
| <Button | |
| type="text" | |
| size="tiny" | |
| title="More options" | |
| aria-label="More options" | |
| icon={<MoreVertical size={16} />} | |
| /> |
| export type PgbouncerConfigurationUpdateVariables = { | ||
| ref: string | ||
| slug: string | ||
| branchId: string | ||
| } & Pick< | ||
| components['schemas']['UpdatePgbouncerConfigBody'], | ||
| 'default_pool_size' | 'max_client_conn' | 'ignore_startup_parameters' | ||
| > | ||
| } & components['schemas']['UpdatePgbouncerConfigBody'] | ||
|
|
||
| export async function updatePgbouncerConfiguration({ | ||
| slug, | ||
| ref, | ||
| branchId, | ||
| default_pool_size, | ||
| max_client_conn, | ||
| ignore_startup_parameters, | ||
| ...body | ||
| }: PgbouncerConfigurationUpdateVariables) { |
There was a problem hiding this comment.
PgbouncerConfigurationUpdateVariables is typed as components['schemas']['UpdatePgbouncerConfigBody'], but this endpoint’s OpenAPI spec uses the Vela schema BranchPgbouncerConfigUpdate for the PATCH request body. Using the platform type here allows deprecated/unsupported fields (e.g. ignore_startup_parameters, pgbouncer_enabled, pool_mode) and can mask payload shape issues—please switch this to the Vela schema type that matches the endpoint.
| // 1. Merge the original data with the form values | ||
| const payload = { | ||
| ...data, // Include all original fields the backend might require | ||
| slug, | ||
| ref, | ||
| branchId: branch, | ||
| ...values, | ||
|
|
||
| // 2. Explicitly map the form values to ensure nulls are preserved | ||
| // instead of dropping them if they evaluate to undefined | ||
| default_pool_size: values.default_pool_size, | ||
| max_client_conn: values.max_client_conn ?? null, | ||
| reserve_pool_size: values.reserve_pool_size ?? null, | ||
| server_idle_timeout: values.server_idle_timeout ?? null, | ||
| server_lifetime: values.server_lifetime ?? null, | ||
| query_wait_timeout: values.query_wait_timeout ?? null, | ||
| } |
There was a problem hiding this comment.
payload is built by spreading ...data (the GET response) and then casting to any for the mutation. This risks sending response-only fields (and relying on manual delete calls) which can break PATCH validation as the API expects only the update schema fields. Prefer constructing the payload strictly from the allowed update-body properties (and type it as PgbouncerConfigurationUpdateVariables) so TS can prevent accidental extra keys and you can drop the as any/delete logic.
| // 3. Remove the fields that PgBouncerPayload explicitly omits | ||
| // (in case the backend rejects the request if they are present) | ||
| delete (payload as any).pgbouncer_enabled | ||
| delete (payload as any).pool_mode | ||
|
|
||
| updateConfig(payload as any, { |
There was a problem hiding this comment.
The manual delete (payload as any).pgbouncer_enabled / delete ...pool_mode workaround indicates the payload shape doesn’t match what the PATCH endpoint accepts. Once the payload is typed/constructed from the correct update schema, these deletes (and the as any cast) should be removable; keeping them makes it easy to miss newly added response-only fields.
This is the release PR