Skip to content

fix(web): reset worktree enum settings without a serialisation error - #109

Merged
nixuuu merged 1 commit into
devfrom
fix/worktree-reset-enum
Nov 4, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/worktree-reset-enum

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 4, 2026

Copy link
Copy Markdown
Member

Settings → Worktrees: changing Branch naming and pressing Reset showed cannot encode enum canopy.ui.v1.BranchNaming to JSON: expected number, got undefined.

Reset sends undefined to inherit a field. That works for the optional fields, but branch_naming and default_mode are plain proto enums: inheriting means their unspecified value (0), and undefined can't be serialised. Resets of these two fields are now written as UNSPECIFIED; every other field is unchanged. No other settings page uses this reset pattern.

Checks: web typecheck, lint, format.

Fixes: #74

@nixuuu
nixuuu merged commit 978e52d into dev Nov 4, 2026
9 checks passed
@nixuuu
nixuuu deleted the fix/worktree-reset-enum branch November 4, 2026 21:57
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