dev: update review.md

This commit is contained in:
rcmerci
2026-01-05 13:24:02 +08:00
parent 41cbba3688
commit ae8710f764
3 changed files with 53 additions and 48 deletions

View File

@@ -31,5 +31,5 @@
## Review Checklist
- Linters and unit-tests must pass
- Check the review notes listed in `prompts/review.md`.
- Check the review notes listed in @prompts/review.md

View File

@@ -29,3 +29,5 @@ You're Clojure(script) expert, you're responsible to check those common errors:
- Prohibit converting js/Uint8Array to vector. e.g. `(vec uint8-array)`
- This operation is very slow when the Uint8Array is large (e.g. an asset).
- `:block/content` attribute is not used in the DB version; `:block/title` is the attribute that stores the main content of the block.

View File

@@ -24,6 +24,13 @@
])
(def to-ws-op-schema
[:schema {:registry {::block-map
[:map
[:block-uuid :uuid]
[:db/ident {:optional true} :keyword]
[:pos block-pos-schema]
[:av-coll [:sequential av-schema]]
[:card-one-attrs {:optional true} [:sequential :keyword]]]}}
[:multi {:dispatch first :decode/string #(update % 0 keyword)}
[:update-kv-value
[:cat :keyword
@@ -35,6 +42,8 @@
[:map
[:db-ident-or-block-uuid [:or :keyword :uuid]]
[:new-db-ident :keyword]]]]
[:add ;; new added block
[:cat :keyword ::block-map]]
[:move
[:cat :keyword
[:map
@@ -56,13 +65,7 @@
[:map
[:block-uuid :uuid]]]]
[:update
[:cat :keyword
[:map
[:block-uuid :uuid]
[:db/ident {:optional true} :keyword]
[:pos block-pos-schema]
[:av-coll [:sequential av-schema]]
[:card-one-attrs {:optional true} [:sequential :keyword]]]]]
[:cat :keyword ::block-map]]
[:update-schema
[:cat :keyword
[:map
@@ -70,7 +73,7 @@
[:db/ident :keyword]
[:db/valueType :keyword]
[:db/cardinality {:optional true} :keyword]
[:db/index {:optional true} :boolean]]]]])
[:db/index {:optional true} :boolean]]]]]])
(comment
(def to-ws-ops-validator (m/validator [:sequential to-ws-op-schema])))