fix: URLField query param handling and improve PublishedAt merging#416
Merged
ainsleyclark merged 1 commit intoclaude/add-payload-helper-fields-dfM5Cfrom Feb 17, 2026
Conversation
…date exports - PublishedAt: replace spread overrides with deepMerge for proper nested merging - URLField: use URL API to correctly append draft param when URL has existing query string - common/index.ts: re-export PublishedAt and URLField from common entry point - Changeset: reword description to match actual PR scope https://claude.ai/code/session_019KQTSWuJGhcoeP1WmXkaLZ
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
ainsleyclark
added a commit
that referenced
this pull request
Feb 17, 2026
* feat: Adding URLField and PublishedAt helpers to payload-helper https://claude.ai/code/session_01NwyDXYNHC8fkcbWpmRpBfg * style: Moving URLField and PublishedAt to src/fields directory https://claude.ai/code/session_01NwyDXYNHC8fkcbWpmRpBfg * chore: add changeset for fields directory move https://claude.ai/code/session_01NwyDXYNHC8fkcbWpmRpBfg * fix: guard URLField against undefined generate return value When generate() returned undefined and draft mode was active, the hook would produce the string "undefined?draft=true". Now returns undefined early when generate yields no value. https://claude.ai/code/session_01NwyDXYNHC8fkcbWpmRpBfg * fix: use deepMerge in PublishedAt, fix URLField draft query param, update exports (#416) - PublishedAt: replace spread overrides with deepMerge for proper nested merging - URLField: use URL API to correctly append draft param when URL has existing query string - common/index.ts: re-export PublishedAt and URLField from common entry point - Changeset: reword description to match actual PR scope https://claude.ai/code/session_019KQTSWuJGhcoeP1WmXkaLZ Co-authored-by: Claude <noreply@anthropic.com> * fix: URL stuff --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves the robustness of field helpers by fixing URL query parameter handling in URLField and refactoring PublishedAt to use deep merging for overrides. Additionally, it exports these field helpers from the common index for easier access.
Key Changes
deepMergeutility for combining base field configuration with user overrides, ensuring nested properties likeadmin.dateare preserved rather than replacedImplementation Details
URLandURLSearchParamsAPIs to safely append the draft parameter, preventing malformed URLs when query parameters already existpickerAppearance: 'dayOnly') instead of replacing them entirelyhttps://claude.ai/code/session_019KQTSWuJGhcoeP1WmXkaLZ