Skip to content

Vela 26.4 - #314

Merged
noctarius merged 15 commits into
mainfrom
vela-26.4
Apr 8, 2026
Merged

noctarius merged 15 commits into
mainfrom
vela-26.4

Conversation

@noctarius

Copy link
Copy Markdown
Collaborator

This is the release PR

@noctarius noctarius self-assigned this Apr 8, 2026
Copilot AI review requested due to automatic review settings April 8, 2026 13:32
@noctarius
noctarius merged commit 8161eed into main Apr 8, 2026
8 checks passed
@noctarius
noctarius deleted the vela-26.4 branch April 8, 2026 13:36

Copilot AI 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.

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-keys index 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.

Comment on lines 24 to 28
<PageLayout
title="API Keys"
subtitle="Configure API keys to securely control access to your project"
navigationItems={navigationItems}
// navigationItems={navigationItems}
>

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines 24 to 28
<PageLayout
title="API Keys"
subtitle="Configure API keys to securely control access to your project"
navigationItems={navigationItems}
// navigationItems={navigationItems}
>

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +15 to +18
// const ApiKeysLegacyPage: NextPageWithLayout = () => {
// return <DisplayApiSettings showTitle={false} showNotice={false} />
// }

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
// const ApiKeysLegacyPage: NextPageWithLayout = () => {
// return <DisplayApiSettings showTitle={false} showNotice={false} />
// }

Copilot uses AI. Check for mistakes.
Comment on lines 8 to +11
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'

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
orgSlug={orgSlug}
projectRef={projectRef}
openAllowed={openAllowed}
cloneHref={`/new/${orgSlug}/${projectRef}/${branch.id}?name=Clone%20of%20${branch.name}`}

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
cloneHref={`/new/${orgSlug}/${projectRef}/${branch.id}?name=Clone%20of%20${branch.name}`}
cloneHref={`/new/${orgSlug}/${projectRef}/${branch.id}?name=${encodeURIComponent(`Clone of ${branch.name}`)}`}

Copilot uses AI. Check for mistakes.
<>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button type="text" size="tiny" icon={<MoreVertical size={16} />} />

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
<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} />}
/>

Copilot uses AI. Check for mistakes.
Comment on lines 9 to 20
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) {

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +157 to 172
// 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,
}

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +174 to 179
// 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, {

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
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.

3 participants