Skip to content

Clarify schema-safe choice icon values - #8

Merged
bnomei merged 1 commit into
mainfrom
codex/github-mention-clarify-schema-safe-icon-values
Jun 17, 2026
Merged

Clarify schema-safe choice icon values#8
bnomei merged 1 commit into
mainfrom
codex/github-mention-clarify-schema-safe-icon-values

Conversation

@bnomei

@bnomei bnomei commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Make choice icon configuration explicit so serialized schemas remain safe and predictable.
  • Avoid ambiguous/unsafe serialized values (component names, JSX, raw SVG markup, non-image data URLs) that break portability or security.
  • Provide concrete examples and lightweight validation to guide schema authors toward safe choices.

Description

  • Replace the README paragraph with a new ### Choice Icons section that documents schema-safe string tokens, image-source strings, and code-only React elements, and includes JSON examples.
  • Narrow FieldsChoice.icon in src/types.ts to string | ReactElement and add inline documentation explaining supported serialized shapes versus code-defined icons.
  • Keep runtime behavior unchanged and apply a minimal, backward-compatible type-level validation to encourage safe configuration.

Testing

  • Ran npm run typecheck which succeeded.
  • Ran npm run check (publint/format checks) which succeeded.
  • Ran npm run build which produced the dist/ artifacts successfully.
  • No new unit tests were added because this change is documentation/type-level; the typecheck provides validation for the exported types.

Codex Task

Closes #5

@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, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@bnomei, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 49 minutes and 44 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f7a35b25-e1a4-4f35-81d2-24a83c0680d3

📥 Commits

Reviewing files that changed from the base of the PR and between 40d08cf and 88526c2.

📒 Files selected for processing (2)
  • README.md
  • src/types.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@augmentcode

augmentcode Bot commented Jun 17, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR clarifies what “schema-safe” choice icons look like and tightens the exported typing to steer users toward portable, serializable configurations.

Changes:

  • Replaces the README paragraph with a dedicated Choice Icons section describing safe string tokens vs. image-source strings and code-only React elements.
  • Adds concrete JSON examples for token and image-source icon values, plus guidance on what to avoid in serialized schemas.
  • Narrows FieldsChoice.icon in src/types.ts to string | ReactElement and documents the intended serialized shapes.

Technical Notes: Runtime behavior remains the same (image detection is prefix-based); this change is primarily documentation and type-surface guidance.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread src/types.ts
* Code-defined options may pass a React element.
*/
icon?: string | ReactElement;
};

@augmentcode augmentcode Bot Jun 17, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

FieldsChoice.icon is narrowed from ReactNode to string | ReactElement, which is a potentially breaking public type change for TS consumers (e.g., icons previously typed as ReactNode values like arrays or null will no longer typecheck). If this is intentional, it may be worth treating as a semver-relevant change or explicitly calling out the incompatibility in release notes.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@bnomei
bnomei merged commit c2ad3b9 into main Jun 17, 2026
1 check passed
@bnomei
bnomei deleted the codex/github-mention-clarify-schema-safe-icon-values branch June 17, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify schema-safe icon values

1 participant