Repository navigation
Import a document's title as a plain text root; drop type icons from the collection member list - #3531
Conversation
Pragmatic Code Review — PR #3531Review Type: Initial Review (no prior reviews or comments on the PR; one commit, SummaryThe change does what the issue asks, in the smallest reasonable diff: one helper ( I read the diff and the surrounding code. I did not run any tests (per the brief; Requirements Check
Code Review Findings🟡 Important1. The new helper was inserted between The three lines "Derive a document's root node id deterministically from its identity key…" now sit directly above the helper's own comment, so rustdoc attaches both paragraphs to Recommendation: move Principle: comments that explain "why" must sit on the code they explain; a comment on the wrong function is worse than none. 🟢 Suggestions2.
Principle: DRY / make inconsistent states unrepresentable. 3. The "no duplicate" assertions now count only Before, the Principle: an assertion should cover what its message claims. Nitpicks
Checked and found fine
RecommendationAPPROVE, with finding 1 worth fixing before merge. Findings 2, 3 and the nit are optional. |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Review addressedAddressed (3)
Skipped (1)
Daemon import tests: 18 of 18 pass. Re-Review DecisionDecision: NO RE-REVIEW NEEDED |
…the collection member list (closes #3512) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… content in one place - Move root_content_for_title below deterministic_root_id so each doc comment sits on its own function - import_markdown_content takes the title and whether it came from the filename, and derives the root content itself - Test documents marker-only and tab-separated first lines Skipped: switching the no-duplicate assertions to a total node count; the tests also compare subtree sizes and root ids. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
e99a302 to
76b5f1f
Compare
Closes #3512
What changed
textnode (CoreNodeType::Text) whose content is the plain title. A title taken from the file's first line loses a leading#…######heading marker; a filename-derived title is used as is. Re-import and--replaceaddress the same deterministic root id; replace updates the root's content.getNodeIconstays, since the "Add existing" search results still use it.Notes
headertype;--replaceupdates its content only. Re-import into a reset database to get the new shape.Testing
bun run test:changedpassed (frontend, scripts, browser, drift checks, Rust workspace).🤖 Generated with Claude Code