Skip to content

Add note on using defaultValue with a json code field#84

Open
andrewmumblebee wants to merge 1 commit into
mainfrom
work/ah/json-default
Open

Add note on using defaultValue with a json code field#84
andrewmumblebee wants to merge 1 commit into
mainfrom
work/ah/json-default

Conversation

@andrewmumblebee

@andrewmumblebee andrewmumblebee commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

📋 Summary

As Dave noted, the agent can sometimes use a string defaultValue for a code input, which causes issues with the json language option. It double encoding the object string, rather than rendering as a JSON object in the editor.


🔍 Scope of change

  • Documentation only
  • Repository metadata or configuration
  • CI / automation
  • Other (please describe):

📚 Checklist

Summary by CodeRabbit

  • Documentation
    • Added a warning explaining that JSON editor defaults must be provided as an object, not a string.
    • Included a clearer example showing the correct JSON defaultValue format.

@andrewmumblebee andrewmumblebee requested review from a team and clarkd July 3, 2026 12:30
@andrewmumblebee andrewmumblebee added the bug Something isn't working label Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

🧩 Plugin PR Summary

ℹ️ No plugins were modified in this PR.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: d051f6c5-d5c4-472b-9d35-f4ea545ffe2c

📥 Commits

Reviewing files that changed from the base of the PR and between eb6d864 and 214ee7b.

📒 Files selected for processing (1)
  • .claude/skills/build-plugin/references/ui.md

📝 Walkthrough

Walkthrough

This change updates documentation in ui.md to clarify that when a code field's language is set to "json", the defaultValue must be a JSON object rather than a string, since the editor stringifies the object. A JSON example is included.

Changes

Documentation Update

Layer / File(s) Summary
Code field documentation update
.claude/skills/build-plugin/references/ui.md
Adds a warning and example clarifying that defaultValue must be a JSON object (not a string) when language is "json".
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the documentation note about defaultValue for JSON code fields.
Description check ✅ Passed The description includes a summary, scope, and checklist, which is sufficient for this documentation-only change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

1 participant