Skip to content

fix: update session field casts to float32 to match synced API types#4999

Merged
sweatybridge merged 2 commits intosync/api-typesfrom
copilot/fix-build-failure-code-generation
Mar 27, 2026
Merged

fix: update session field casts to float32 to match synced API types#4999
sweatybridge merged 2 commits intosync/api-typesfrom
copilot/fix-build-failure-code-generation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

API type sync changed SessionsInactivityTimeout and SessionsTimebox from Nullable[int] to Nullable[float32] in generated types. The handwritten code in auth.go still cast to int, causing a build failure.

  • Updated casts in toAuthConfigBody() from int to float32:
// before
body.SessionsTimebox = nullable.NewNullableWithValue(int(s.Timebox.Hours()))
body.SessionsInactivityTimeout = nullable.NewNullableWithValue(int(s.InactivityTimeout.Hours()))

// after
body.SessionsTimebox = nullable.NewNullableWithValue(float32(s.Timebox.Hours()))
body.SessionsInactivityTimeout = nullable.NewNullableWithValue(float32(s.InactivityTimeout.Hours()))
  • fromAuthConfig() required no changes — ValOrDefault is generic and infers float32 from the Nullable[float32] field automatically.
Original prompt

Pull Request: #4997

Fixes the build failure from code generation. Run tests and make sure they pass.


⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

…d API types

Agent-Logs-Url: https://github.com/supabase/cli/sessions/a43de843-3847-48c2-be8a-e36c1802a306

Co-authored-by: sweatybridge <1639722+sweatybridge@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix build failure from code generation fix: update session field casts to float32 to match synced API types Mar 27, 2026
Copilot AI requested a review from sweatybridge March 27, 2026 15:43
@sweatybridge sweatybridge marked this pull request as ready for review March 27, 2026 17:33
@sweatybridge sweatybridge requested a review from a team as a code owner March 27, 2026 17:33
@sweatybridge sweatybridge merged commit 196e2b4 into sync/api-types Mar 27, 2026
15 checks passed
@sweatybridge sweatybridge deleted the copilot/fix-build-failure-code-generation branch March 27, 2026 17:33
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.

2 participants