Repository navigation
Show flashcard categories and open advanced card groups - #160
Conversation
| { Model.flashcard_uuid; | ||
| question_hidden = block_markup_text false block; | ||
| question_revealed = block_markup_text true block; | ||
| card_categories = sidebar_pages_member "references" block; |
There was a problem hiding this comment.
🟡 Block links appear as card categories
When a card links another block, card_categories labels that block as a category. block/refs contains block links as well as page links.
Learn more
The card JSON includes all block/refs as references, including links to individual blocks from block_json. read_block does not restrict those summaries to pages. The new category list therefore presents any linked block as a category even though it is not a page or tag.
Example: A card titled “Read [[task block]]” references a task block named “Fix login.” The review screen shows “Fix login” as a category, although the link targets a block rather than a category.
Recommended fix: Derive categories from references that resolve to pages or tags, or use a dedicated category field supplied by the core. Keep the ordinary references field intact for question markup.
Was this helpful? React with 👍 or 👎 to provide feedback.
| let matched = Hashtbl.create (List.length result.rows) in | ||
| List.iter (function | ||
| | [D.Result_entity eid] -> Hashtbl.replace matched eid () | ||
| | [D.Result_pull entity] -> Hashtbl.replace matched entity.D.pulled_id () | ||
| | _ -> ()) rows; | ||
| | Query_block.Block block -> | ||
| Option.iter (fun eid -> Hashtbl.replace matched eid ()) | ||
| (D.entid db "block/uuid" (D.Uuid block.uuid)) | ||
| | Query_block.Cells _ -> ()) result.rows; |
There was a problem hiding this comment.
Reproduction
Changes
Verification
Both regression tests failed on main and passed with the fix. The full OCaml gate passed with 1,299 tests.
opam exec --switch=5.5.0 -- dune build @shared/native/runtest