Skip to content

T8 follow-up: standardise IPC arg case in api.ts (snake_case vs camelCase) #180

Description

@utof

T8 code-quality reviewer flagged an inconsistency: existing api.ts wrappers (`compute_full_hash`, `attach_tag_by_uuid`, `dedup`, `backup`) pass camelCase keys to `fromInvoke` (relying on Tauri v2's auto snake_case conversion), but new T8 wrappers (`transcribe`, `cancelTranscription`, `setProviderKey`, etc.) use explicit snake_case. The block comment at `apps/desktop/src/api.ts:367-371` justifies the snake_case choice on grounds of "git-grep parity with dedup/backup" — but those wrappers themselves use camelCase. Justification is factually wrong.

Both wire shapes work (Tauri v2 normalises both); one is just less surprising than the other.

Action: decide on a single convention (most likely camelCase since that's the existing majority pattern), then either:

  • Flip the T8 wrappers to camelCase + remove the now-incorrect block comment, OR
  • Migrate all earlier wrappers to snake_case + amend the block comment.

Filed under ASR v2 milestone for batched cleanup before v0.7.x.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/frontendTouches apps/desktop frontend (React/Vite/Tailwind/ESLint)priority/lowLow priority — defer until pressure justifies ittype/choreRoutine maintenance / repo hygiene

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions