Skip to content

fix(connections): camelCase args for add_connection/update_connection - #87

Merged
ajianaz merged 1 commit into
developfrom
fix/add-connection-arg-casing
Jul 1, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/add-connection-arg-casing

Conversation

@ajianaz

@ajianaz ajianaz commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Bug: clicking "Add Connection" raised
invalid args productType for command add_connection: missing required key productType.

Cause

Tauri auto-converts Rust snake_case command params to camelCase at the IPC
boundary (documented in .agent.md Tauri arg naming rule). The connection.add
/ connection.update wrappers in ipc.ts sent snake_case keys
(product_type, auth_token, auth_type), so Tauri couldn't match them to the
productType / authToken / authType params → rejected as missing.

The Add form call site in ConnectionManager.svelte passed the same snake_case keys.

Fix

  • ipc.ts: connection.add / connection.update opt types now use camelCase
    (productType, authToken, authType).
  • ConnectionManager.svelte: Add form call site updated to camelCase keys.

Response struct field serialization (serde default = snake_case) is unchanged, so
ConnectionInfo field access (conn.product_type, conn.has_token) keeps working.

Validation

  • npm run build clean.
  • Manual: Add Connection now succeeds (connection row created).

…tion

Tauri auto-converts snake_case Rust params to camelCase at the IPC boundary.
The connection.add/update wrappers sent snake_case keys (product_type,
auth_token, auth_type) so Tauri rejected them: 'missing required key productType'.

- ipc.ts: productType/authToken/authType in add + update opt types
- ConnectionManager.svelte: call site updated to camelCase keys

Response structs still serialize snake_case (serde default) so ConnectionInfo
field access (conn.product_type) is unchanged.
@ajianaz
ajianaz merged commit 3d3d015 into develop Jul 1, 2026
8 checks passed
@ajianaz
ajianaz deleted the fix/add-connection-arg-casing branch July 1, 2026 16:21
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.

1 participant