Firewall product documentation#3086
Conversation
Appwrite WebsiteProject ID: Website (appwrite/website)Project ID: Tip Sites auto-generate unique domains with the pattern https://randomstring.appwrite.network |
|
@greptile-apps review |
Greptile SummaryThis PR adds a complete Firewall product documentation section at
Confidence Score: 4/5Safe to merge; all changes are documentation and sidebar wiring with no runtime logic. The two findings are wording inconsistencies in the operator table and quick-start resource-type picker — neither affects site functionality, but the operator plurality issue could lead users to incorrectly assume or miss multi-value support for notEqual/startsWith/endsWith before the Firewall feature ships. conditions/+page.markdoc (operator plurality) and quick-start/+page.markdoc (resource type omission) warrant a quick pass before the Firewall feature goes live. Important Files Changed
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
src/routes/docs/products/firewall/conditions/+page.markdoc:38-45
The `notEqual` operator description says "the value" (singular) while the analogous `equal` description says "any of the values." The same inconsistency appears in `startsWith`, `notStartsWith`, `endsWith`, and `notEndsWith`. Since the conditions structure always uses a `values` array, users who try to pass multiple values to `notEqual` or `startsWith` will be unsure whether that is supported. If these operators do accept multiple values, the descriptions should match `equal`'s phrasing; if they are intentionally single-value only, that constraint should be stated explicitly.
```suggestion
| `equal` | The attribute equals any of the values. |
| `notEqual` | The attribute does not equal any of the values. |
| `contains` | The attribute contains any of the values as a substring. |
| `notContains` | The attribute does not contain any of the values. |
| `startsWith` | The attribute starts with any of the values. |
| `notStartsWith` | The attribute does not start with any of the values. |
| `endsWith` | The attribute ends with any of the values. |
| `notEndsWith` | The attribute does not end with any of the values. |
```
### Issue 2 of 2
src/routes/docs/products/firewall/quick-start/+page.markdoc:16
The quick start tells users to "Choose one of your sites or functions," but the `rules/+page.markdoc` anatomy table lists `resourceType` as covering "your project's APIs, functions, or sites." A user who wants to protect their Appwrite API endpoints will not know they can scope a rule to that resource type. If APIs are a valid resource type in the Console at launch, the quick start should mention it; if not yet supported, a brief note would set expectations correctly.
```suggestion
2. Select the resource the rule applies to. Choose one of your sites, functions, or APIs.
```
Reviews (1): Last reviewed commit: "(fix): remove unquoted colon from action..." | Re-trigger Greptile |
| | `equal` | The attribute equals any of the values. | | ||
| | `notEqual` | The attribute does not equal the value. | | ||
| | `contains` | The attribute contains any of the values as a substring. | | ||
| | `notContains` | The attribute does not contain any of the values. | | ||
| | `startsWith` | The attribute starts with the value. | | ||
| | `notStartsWith` | The attribute does not start with the value. | | ||
| | `endsWith` | The attribute ends with the value. | | ||
| | `notEndsWith` | The attribute does not end with the value. | |
There was a problem hiding this comment.
The
notEqual operator description says "the value" (singular) while the analogous equal description says "any of the values." The same inconsistency appears in startsWith, notStartsWith, endsWith, and notEndsWith. Since the conditions structure always uses a values array, users who try to pass multiple values to notEqual or startsWith will be unsure whether that is supported. If these operators do accept multiple values, the descriptions should match equal's phrasing; if they are intentionally single-value only, that constraint should be stated explicitly.
| | `equal` | The attribute equals any of the values. | | |
| | `notEqual` | The attribute does not equal the value. | | |
| | `contains` | The attribute contains any of the values as a substring. | | |
| | `notContains` | The attribute does not contain any of the values. | | |
| | `startsWith` | The attribute starts with the value. | | |
| | `notStartsWith` | The attribute does not start with the value. | | |
| | `endsWith` | The attribute ends with the value. | | |
| | `notEndsWith` | The attribute does not end with the value. | | |
| | `equal` | The attribute equals any of the values. | | |
| | `notEqual` | The attribute does not equal any of the values. | | |
| | `contains` | The attribute contains any of the values as a substring. | | |
| | `notContains` | The attribute does not contain any of the values. | | |
| | `startsWith` | The attribute starts with any of the values. | | |
| | `notStartsWith` | The attribute does not start with any of the values. | | |
| | `endsWith` | The attribute ends with any of the values. | | |
| | `notEndsWith` | The attribute does not end with any of the values. | |
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/routes/docs/products/firewall/conditions/+page.markdoc
Line: 38-45
Comment:
The `notEqual` operator description says "the value" (singular) while the analogous `equal` description says "any of the values." The same inconsistency appears in `startsWith`, `notStartsWith`, `endsWith`, and `notEndsWith`. Since the conditions structure always uses a `values` array, users who try to pass multiple values to `notEqual` or `startsWith` will be unsure whether that is supported. If these operators do accept multiple values, the descriptions should match `equal`'s phrasing; if they are intentionally single-value only, that constraint should be stated explicitly.
```suggestion
| `equal` | The attribute equals any of the values. |
| `notEqual` | The attribute does not equal any of the values. |
| `contains` | The attribute contains any of the values as a substring. |
| `notContains` | The attribute does not contain any of the values. |
| `startsWith` | The attribute starts with any of the values. |
| `notStartsWith` | The attribute does not start with any of the values. |
| `endsWith` | The attribute ends with any of the values. |
| `notEndsWith` | The attribute does not end with any of the values. |
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| Configure the rule: | ||
|
|
||
| 1. Give the rule a name, for example `Block test IP`. | ||
| 2. Select the resource the rule applies to. Choose one of your sites or functions. |
There was a problem hiding this comment.
The quick start tells users to "Choose one of your sites or functions," but the
rules/+page.markdoc anatomy table lists resourceType as covering "your project's APIs, functions, or sites." A user who wants to protect their Appwrite API endpoints will not know they can scope a rule to that resource type. If APIs are a valid resource type in the Console at launch, the quick start should mention it; if not yet supported, a brief note would set expectations correctly.
| 2. Select the resource the rule applies to. Choose one of your sites or functions. | |
| 2. Select the resource the rule applies to. Choose one of your sites, functions, or APIs. |
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/routes/docs/products/firewall/quick-start/+page.markdoc
Line: 16
Comment:
The quick start tells users to "Choose one of your sites or functions," but the `rules/+page.markdoc` anatomy table lists `resourceType` as covering "your project's APIs, functions, or sites." A user who wants to protect their Appwrite API endpoints will not know they can scope a rule to that resource type. If APIs are a valid resource type in the Console at launch, the quick start should mention it; if not yet supported, a brief note would set expectations correctly.
```suggestion
2. Select the resource the rule applies to. Choose one of your sites, functions, or APIs.
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
3192a4b to
d7792c2
Compare


What does this PR do?
Adds a new Firewall product section to the docs at
/docs/products/firewall, covering the upcoming Appwrite Firewall feature.New pages:
Also adds a Firewall entry to the main docs sidebar under Products.
Notes
Have you read the Contributing Guidelines on issues?
Yes