Skip to content

Add PatchFields command#3219

Merged
lukemelia merged 3 commits intomainfrom
cs-9276-support-version-of-patch-card-command-that-allows-updating
Sep 11, 2025
Merged

Add PatchFields command#3219
lukemelia merged 3 commits intomainfrom
cs-9276-support-version-of-patch-card-command-that-allows-updating

Conversation

@lukemelia
Copy link
Copy Markdown
Contributor

@lukemelia lukemelia commented Sep 9, 2025

The PatchFieldsCommand is a new command that allows updating specific fields of a card instance rather than patching the entire card. This provides more granular control and better performance for targeted updates.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 9, 2025

Host Test Results

    1 files  ± 0      1 suites  ±0   57m 51s ⏱️ - 1m 22s
1 431 tests +83  1 417 ✅ +83  14 💤 ±0  0 ❌ ±0 
1 444 runs  +83  1 430 ✅ +83  14 💤 ±0  0 ❌ ±0 

Results for commit 8142da7. ± Comparison against base commit 9cfa26b.

♻️ This comment has been updated with latest results.

@lukemelia lukemelia force-pushed the cs-9276-support-version-of-patch-card-command-that-allows-updating branch 3 times, most recently from fdca8c6 to 2c2a3a6 Compare September 10, 2025 03:42
@lukemelia lukemelia marked this pull request as ready for review September 10, 2025 03:57
@lukemelia lukemelia requested review from a team and jurgenwerk September 10, 2025 03:57
* - "tags[0]" → ["tags", "[0]"]
* - "authors[0].name" → ["authors", "[0]", "name"]
* - "tags[]" → ["tags", "[]"] (append operation)
* - "tags[-1]" → ["tags", "[-1]"] (append operation)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t understand how these mean “append”, can you share examples?

Copy link
Copy Markdown
Contributor Author

@lukemelia lukemelia Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is conventional from rails and form libraries. I showed GPT-5 each of the following code snippets and asked what it meant and it understood both as appending "ok" to the tags array:

updateFields(instance, {
  "tags[]": "ok",
});
updateFields(instance, {
  "tags[-1]": "ok",
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻 thanks, I didn’t understand what was being appended, but I see now

The `PatchFieldsCommand` is a new command that allows updating specific
fields of a card instance rather than patching the entire card.
This provides more granular control and better performance for
targeted updates.
@lukemelia lukemelia force-pushed the cs-9276-support-version-of-patch-card-command-that-allows-updating branch from 2c2a3a6 to 8f0a976 Compare September 10, 2025 21:47
lukemelia added a commit to cardstack/boxel-skills that referenced this pull request Sep 10, 2025
The `PatchFieldsCommand` is a new command that allows updating specific
fields of a card instance rather than patching the entire card.
This provides more granular control and better performance for
targeted updates.
@lukemelia lukemelia requested a review from a team September 10, 2025 22:57
@lukemelia lukemelia merged commit 0e0d26f into main Sep 11, 2025
49 of 50 checks passed
lukemelia added a commit to cardstack/boxel-skills that referenced this pull request Sep 11, 2025
…h-card-command-that-allows-updating-skills

Skills update for cardstack/boxel#3219 (Patch Fields command)
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