Skip to content

Conversation

@anujhydrabadi
Copy link
Contributor

@anujhydrabadi anujhydrabadi commented Oct 27, 2025

Summary by CodeRabbit

Release Notes

  • New Features
    • Enhanced conditional visibility configuration to support both single-condition and multi-condition array formats, enabling more complex visibility rules while maintaining full backward compatibility.

@coderabbitai
Copy link

coderabbitai bot commented Oct 27, 2025

Walkthrough

The x-ui-visible-if schema constraint in ftf_cli/schema.py was updated from a single object form to a oneOf structure, allowing either a single object with field and values or an array of condition objects with minItems: 1.

Changes

Cohort / File(s) Change Summary
Schema constraint expansion
ftf_cli/schema.py
Updated x-ui-visible-if schema from single object constraint to oneOf with two branches: single-object form (field and non-empty values array) or array of condition objects (each with field and non-empty values array, minimum one item).

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "Support array of objects in x-ui-visible-if schema" directly and accurately describes the main change in the changeset. The raw summary confirms that the PR modifies the x-ui-visible-if schema to accept a oneOf with two forms: a single object or an array of condition objects, which is precisely what the title communicates. The title is concise, specific, and free from vague language or noise, making it clear to reviewers what the primary objective is.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch x-ui-visible-if-array

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 49e36fe and 274dcec.

📒 Files selected for processing (1)
  • ftf_cli/schema.py (1 hunks)
🔇 Additional comments (1)
ftf_cli/schema.py (1)

132-161: Schema design is sound; review suggestions are unnecessary and would over-constrain the values field.

The values array intentionally omits item type specification because different spec fields have different value types (strings, numbers, booleans, objects). Backend schema validation only validates structure; and/or semantics are frontend responsibility. The change is backward compatible and well-structured as-is.

The proposed diff to add "items": {"type": ["string", "number", "boolean"]} would unnecessarily restrict valid values and doesn't align with the schema's purpose as a structural validator.

Likely an incorrect or invalid review comment.


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

@anujhydrabadi anujhydrabadi merged commit ca23efb into main Oct 27, 2025
6 checks passed
@anujhydrabadi anujhydrabadi deleted the x-ui-visible-if-array branch October 27, 2025 06:25
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