Skip to content

Add --unset flag and null-value support for profile property deletion - #47

Merged
yosriady merged 1 commit into
mainfrom
feat/unset-profile-properties
Aug 7, 2026
Merged

Add --unset flag and null-value support for profile property deletion#47
yosriady merged 1 commit into
mainfrom
feat/unset-profile-properties

Conversation

@yosriady

@yosriady yosriady commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

The Formo API now supports deleting profile properties by sending null values (getformo/formono#2190). This PR adds the CLI surface for it:

  • formo profiles update gains an --unset flag: a comma-separated list of property keys to delete (shorthand for null values in --properties). --properties becomes optional; at least one of the two is required, and --unset keys win over --properties on overlap.
  • null values in --properties JSON and in --rows for formo profiles properties batch pass through to the API unchanged (they already did mechanically; this documents it in the option descriptions and examples).
  • user_id is rejected client-side in --unset with a clear error, matching the API rule (it participates in identity stitching and cannot be unset).

Deleting a property also hides any globally-enriched fallback value for that field; the command hints mention this.

Tests

7 new unit tests on buildUpdateProfileBody (unset-to-null mapping, properties+unset merge, explicit-null passthrough, empty/whitespace/user_id rejections). Full suite: 197 passing, 1 pending (live-API), 0 failures. pnpm lint clean.

Note: the end-to-end behavior depends on getformo/formono#2190 being deployed; until then the API treats these as validation errors.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Review in cubic

The API now deletes a profile property when its value is null (getformo/formono#2190).
--properties JSON already passed nulls through; this adds the --unset sugar on
formo profiles update, documents null rows for properties batch, and guards
user_id client-side with a clear error.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

yosriady added a commit to getformo/docs.formo.so that referenced this pull request Aug 7, 2026
Sync api/openapi.json with getformo/formono#2190: PUT /v0/profiles/{address}/properties
and the batch endpoint accept null values to unset properties. Add prose sections on
deletion semantics (global-fallback masking, user_id exclusion, reserved tombstone,
point-in-time behavior), update the MCP tool table, and document the CLI --unset flag
and null rows (getformo/cli#47).

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@yosriady
yosriady merged commit 658d628 into main Aug 7, 2026
9 checks passed
@yosriady
yosriady deleted the feat/unset-profile-properties branch August 7, 2026 04:17
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