Skip to content

fix: add missing name property on context variant#56

Merged
calthejuggler merged 2 commits intoabsmartly:mainfrom
mrobayo-nw:fix/add-missing-name-property-on-context-variant
Apr 7, 2026
Merged

fix: add missing name property on context variant#56
calthejuggler merged 2 commits intoabsmartly:mainfrom
mrobayo-nw:fix/add-missing-name-property-on-context-variant

Conversation

@mrobayo-nw
Copy link
Copy Markdown
Contributor

@mrobayo-nw mrobayo-nw commented Apr 3, 2026

closes #55

Summary by CodeRabbit

  • Refactor
    • Experiment variant structure updated to allow an optional name for each variant, improving clarity when identifying variants. No runtime behaviour or public API changes; existing variant definitions remain compatible.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 454cf3f4-414f-4e6a-a08c-ced95477041d

📥 Commits

Reviewing files that changed from the base of the PR and between 55b684d and 6c546dc.

📒 Files selected for processing (1)
  • src/context.ts
✅ Files skipped from review due to trivial changes (1)
  • src/context.ts

Walkthrough

The exported ExperimentData type in src/context.ts was updated to allow an optional name property on objects in the variants array: variants changed from { config: null | string }[] to { config: null | string; name?: string }[]. No runtime control flow, logic paths, or other exported signatures were changed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit nibbles on a spec so fine, 🐇
A little name now fits the variant line,
Optional, snug, no runtime fray,
Types and code now gently sway,
Hooray for tiny fixes—hop away!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding the missing name property to the context variant type definition.
Linked Issues check ✅ Passed The PR successfully addresses issue #55 by adding the missing name property to the variant type definition in src/context.ts, making it optional for backward compatibility.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue; only the variant type signature was modified to include the optional name property.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Copy Markdown
Contributor

@calthejuggler calthejuggler left a comment

Choose a reason for hiding this comment

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

Hey @mrobayo-nw 🙂 Thanks for the contribution! We are planning to do a release of the JS SDK next week, so your change will be included then. Note, that will be v1.14.0, but won't include any breaking changes. If you need this in an earlier version as well, just let us know.

@calthejuggler calthejuggler merged commit ec59bfe into absmartly:main Apr 7, 2026
2 checks passed
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.

Context data variant missing type definition for name property

2 participants