Skip to content

[DO NOT MERGE] fix: simplified blocklist document structure#1172

Open
aaguiarz wants to merge 2 commits intomainfrom
chore/simplify-blocklist-doc
Open

[DO NOT MERGE] fix: simplified blocklist document structure#1172
aaguiarz wants to merge 2 commits intomainfrom
chore/simplify-blocklist-doc

Conversation

@aaguiarz
Copy link
Member

@aaguiarz aaguiarz commented Jan 24, 2026

Description

What problem is being solved?

I find some of our documents too verbose and I'm trying a more compact approach to discuss.

The goal is to compare this

https://openfga.dev/pr-preview/pr-1172/docs/modeling/blocklists

to this

https://openfga.dev/docs/modeling/blocklists

How is it being solved?

What changes are made to solve it?

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Summary by CodeRabbit

  • Documentation
    • Restructured blocklists documentation for improved clarity and navigation.
    • Enhanced examples by replacing interactive demonstrations with concise YAML code snippets.
    • Streamlined verification flow with updated narrative sections and improved layout consistency.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

Walkthrough

Documentation refactoring of the blocklists guide that replaces interactive component examples (RelationshipTuplesViewer and CheckRequestViewer) with YAML-based representations and test blocks. Narrative sections and formatting updated to align with the new verification approach.

Changes

Cohort / File(s) Summary
Documentation Examples Refactoring
docs/content/modeling/blocklists.mdx
Replaced RelationshipTuplesViewer and CheckRequestViewer interactive components with inline YAML representations and YAML test blocks. Removed collapsible details block with initial narrative context. Updated section headings and narrative descriptions to reflect YAML-driven verification flow. Adjusted layout with hr line insertions and reflow of sections. Minor indentation and spacing adjustments.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title mentions 'simplified blocklist document structure' which directly aligns with the main change—restructuring documentation to be more concise using YAML-driven examples instead of verbose RelationshipTuplesViewer blocks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@aaguiarz aaguiarz marked this pull request as ready for review January 24, 2026 20:42
@aaguiarz aaguiarz requested a review from a team as a code owner January 24, 2026 20:42
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@docs/content/modeling/blocklists.mdx`:
- Around line 114-128: The YAML examples use a list item prefix before the tests
key (e.g., "- tests:") which is invalid for the OpenFGA store format; update
each example where " - tests:" appears (search for the "tests:" YAML blocks in
this file) by removing the leading dash so "tests:" is a top-level key and keep
the nested test entries (e.g., the "- name:" entries) unchanged; apply this fix
to every repeated test example in docs/content/modeling/blocklists.mdx.
🧹 Nitpick comments (2)
docs/content/modeling/blocklists.mdx (2)

86-101: Minor: Inconsistent leading indentation in YAML snippet.

The YAML block has leading 2-space indentation before each list item (-), which is unusual for a standalone code block. This appears to be a fragment of a larger structure but may confuse readers expecting standard YAML formatting.

Suggested fix to remove leading indentation
 ```yaml
-  # Becky is a member of the product team
-  - user: user:becky
-    relation: member
-    object: team:product
+# Becky is a member of the product team
+- user: user:becky
+  relation: member
+  object: team:product

-  # Carl is a member of the product team
-  - user: user:carl
-    relation: member
-    object: team:product
+# Carl is a member of the product team
+- user: user:carl
+  relation: member
+  object: team:product

-  # Members of the product team can edit the planning document
-  - user: team:product#member
-    relation: editor
-    object: document:planning
+# Members of the product team can edit the planning document
+- user: team:product#member
+  relation: editor
+  object: document:planning
</details>

---

`265-271`: **Test name is misleading given the assertion.**

The test name "Carl can edit the 'planning' document" suggests Carl should have access, but the assertion is `editor: false`. Consider updating the test name to accurately reflect the expected outcome.


<details>
<summary>Suggested fix</summary>

```diff
 - tests:
-  - name: "Carl can edit the 'planning' document"
+  - name: "Carl cannot edit the 'planning' document"
     check:
       - user: user:carl
         object: document:planning
         assertions:
           editor: false

Comment on lines 114 to 128
```yaml
- tests:
- name: "Becky can edit the 'planning' document"
check:
- user: user:becky
object: document:planning
assertions:
editor: true
- name: "Carl can edit the 'planning' document"
check:
- user: user:carl
object: document:planning
assertions:
editor: true
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

OpenFGA store test YAML format documentation

💡 Result:

OpenFGA “store test YAML” files use the Store File Format (commonly named *.fga.yaml). Official docs:

Minimal .fga.yaml shape

Top-level keys include name, model/model_file, global tuples/tuple_file/tuple_files, and tests. Each test can add its own tuples and include check, list_objects, and/or list_users assertions. [1][2]

name: My Store Tests
model: |
  model
    schema 1.1
  type user
  type document
    relations
      define viewer: [user]

tuples:
  - user: user:anne
    relation: viewer
    object: document:1

tests:
  - name: can-anne-view
    check:
      - user: user:anne
        object: document:1
        assertions:
          viewer: true

[1][2]


🏁 Script executed:

# Read the actual file with surrounding context
cat -n docs/content/modeling/blocklists.mdx | sed -n '105,135p'

Repository: openfga/openfga.dev

Length of output: 1712


🏁 Script executed:

# Search for other test YAML examples in the repository
fd -e yaml -e yml | head -20

Repository: openfga/openfga.dev

Length of output: 79


🏁 Script executed:

# Search for other test YAML examples in the blocklists.mdx file
grep -n "^```yaml" docs/content/modeling/blocklists.mdx | head -10

Repository: openfga/openfga.dev

Length of output: 131


🏁 Script executed:

# Look at more of the file to see if there's a pattern with tests
rg -A 15 "tests:" docs/content/modeling/blocklists.mdx | head -50

Repository: openfga/openfga.dev

Length of output: 1028


Fix YAML test structure format in code examples.

The test YAML blocks use - tests: (as a list item) followed by nested test definitions. According to OpenFGA's official store file format documentation, tests: should be a top-level key, not a list item. Remove the leading - before tests::

Correct structure
tests:
  - name: "Becky can edit the 'planning' document"
    check:
      - user: user:becky
        object: document:planning
        assertions:
          editor: true
  - name: "Carl can edit the 'planning' document"
    check:
      - user: user:carl
        object: document:planning
        assertions:
          editor: true

This pattern appears in multiple test examples throughout the file.

🤖 Prompt for AI Agents
In `@docs/content/modeling/blocklists.mdx` around lines 114 - 128, The YAML
examples use a list item prefix before the tests key (e.g., "- tests:") which is
invalid for the OpenFGA store format; update each example where " - tests:"
appears (search for the "tests:" YAML blocks in this file) by removing the
leading dash so "tests:" is a top-level key and keep the nested test entries
(e.g., the "- name:" entries) unchanged; apply this fix to every repeated test
example in docs/content/modeling/blocklists.mdx.

@github-actions
Copy link
Contributor

PR Preview Action v1.8.0

🚀 View preview at
https://openfga.github.io/openfga.dev/pr-preview/pr-1172/

Built to branch gh-pages at 2026-01-24 20:54 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

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.

1 participant