Skip to content

Vela 26.2 - #282

Merged
noctarius merged 10 commits into
mainfrom
vela-26.2
Mar 25, 2026
Merged

noctarius merged 10 commits into
mainfrom
vela-26.2

Conversation

@noctarius

Copy link
Copy Markdown
Collaborator

Release PR Vela-26.2

Copilot AI review requested due to automatic review settings March 25, 2026 12:26
@noctarius noctarius self-assigned this Mar 25, 2026

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.2, updating Studio + API types to support new resource-limit semantics (project branch maxima), PITR branch creation flag, and API key display sourcing.

Changes:

  • Add “project branch maxima” endpoint/types and new React Query hook, and update branch resize UI logic to use it.
  • Update resource allocation typing to use Resources and adjust resource-limit query keys accordingly (removing old effective-branch-limits query).
  • Add non-prod “point-in-time recovery” flag to branch creation and switch Project Settings API key display to use the API keys query.

Reviewed changes

Copilot reviewed 14 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/api-types/types/platform.d.ts Adds /resources/branch-maxima platform path + operation typing.
apps/studio/pages/new/[slug]/index.tsx Comments out billing/usage notice block in new project flow.
apps/studio/pages/api/platform/organizations/[slug]/projects/[ref]/resources/branch-maxima.ts Adds API route proxying to Vela branch-maxima endpoint.
apps/studio/data/vela/vela-schema.d.ts Adds Vela OpenAPI schema entries for branch-maxima operation.
apps/studio/data/resource-limits/project-allocations-query.ts Updates allocations type to Resources.
apps/studio/data/resource-limits/keys.ts Replaces branch-effective-limits key with projectBranchMaxima key.
apps/studio/data/resource-limits/effective-branch-limits-query.ts Removes old effective branch limits query hook.
apps/studio/data/resource-limits/branch-maxima-query.ts Adds React Query hook for project branch maxima.
apps/studio/data/branches/branch-create-mutation.ts Adds pitr_enabled support (non-prod gated).
apps/studio/data/api-keys/api-keys-query.ts Exports APIKey type for reuse.
apps/studio/components/ui/ProjectSettings/DisplayApiSettings.utils.ts Updates “last used API keys” logic to use name and dayjs duration plugin.
apps/studio/components/ui/ProjectSettings/DisplayApiSettings.tsx Switches API key display to use useAPIKeysQuery as source of truth.
apps/studio/components/interfaces/Settings/Database/ConnectionPooling/ConnectionPooling.tsx Adjusts RHF number input wiring + docs link rendering.
apps/studio/components/interfaces/Branch/ResizeBranchModal.tsx Replaces effective-branch-limits with branch-maxima + project available resources for slider ceilings.
apps/studio/components/interfaces/Branch/NewBranchForm.tsx Adds non-prod PITR checkbox + passes through to branch creation mutation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if (!s) return false
return getEffectiveMax(rk as ResourceType, s) < s.max
})
}, [sliderSpecs, branchMaxima, projectAvailable])

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

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

hasEffectiveLimits uses getEffectiveMax, which reads branchMax to compute the project quota ceiling. Since branchMax is not included in this useMemo dependency array, the warning state can be incorrect after branch size changes. Include branchMax (and any other captured values) in the dependency list so the memo recomputes correctly.

Suggested change
}, [sliderSpecs, branchMaxima, projectAvailable])
}, [specs, sliderSpecs, branchMax, branchMaxima, projectAvailable])

Copilot uses AI. Check for mistakes.
Comment on lines 988 to +997
@@ -994,7 +994,7 @@ const CreateProjectPage: NextPageWithLayout = () => {
</Link>
.
</p>
</div>
</div> */}

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

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

This billing/usage notice block has been commented out rather than removed or feature-flagged. Leaving large commented JSX in the main page path makes the code harder to maintain and can lead to accidental reintroduction. Prefer deleting it (if no longer needed) or gating it behind an explicit flag/condition with a brief comment explaining why it’s hidden.

Copilot uses AI. Check for mistakes.
Comment on lines 235 to +247
const ramInfo = useMemo(() => {
const s = sliderSpecs.ram
if (!s) return null
const usageDisplay = ramUsageBytes ? ramUsageBytes / s.divider : undefined
const minDisplay = getEffectiveMin('ram', s)
const maxDisplay = getEffectiveMax('ram', s)
return {
usageDisplay,
minDisplay,
maxDisplay,
unit: s.unit,
}
}, [sliderSpecs, ramUsageBytes, effectiveBranchLimits])
}, [sliderSpecs, ramUsageBytes, branchMaxima, projectAvailable])

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

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

The ramInfo memo depends on getEffectiveMax/getEffectiveMin, which in turn uses branchMax (via the quota ceiling calculation). branchMax is not included in this useMemo dependency list, so ramInfo.maxDisplay can become stale when the branch’s current resources change. Add branchMax (and any other referenced values) to the dependency array, or refactor the calculation to avoid capturing external state.

Copilot uses AI. Check for mistakes.
@noctarius
noctarius merged commit d71a69d into main Mar 25, 2026
10 checks passed
@noctarius
noctarius deleted the vela-26.2 branch March 25, 2026 12:31
@noctarius
noctarius restored the vela-26.2 branch March 25, 2026 12:35
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.

5 participants