Repository navigation
Fix project/task schema field descriptions and add project→task relationship - #2016
Conversation
Pragmatic Code Review — Initial ReviewIndependent review of the diff against #1999's acceptance criteria. Requirements Check — all ✅
Findings: 🟢 none substantive. No lint suppression, no dead code, no backward-compat scaffolding; comments describe behavior directly with no embedded issue numbers (CLAUDE.md-compliant). Verdict: APPROVE. Validated live: full |
mstomar125
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.
/address-reviewReviewer recommendations: APPROVE with zero 🔴/🟡 findings. The single 🟢 note was to run the test suite as the outstanding gate.
Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: No code was changed in response to the review (the only recommendation — run the suite — was already satisfied and required no edit). There are no new commits to re-review. The PR is ready for merge. |
…ionship Part 1: remove the redundant owning-type prefix from field descriptions, which render directly as the form field label (a Project form showed "Project Status" instead of "Status"): - project.status/priority/start_date/end_date: drop the "Project " prefix - task.status/priority: drop the "Task " prefix Audited every core schema; person/skill/query/ai-chat use descriptive prose (e.g. "Conversation status" — the schema id is ai-chat, not "conversation"), so no other schema needed changing. Part 2: declare the project→task relationship (a project has many tasks, "tasks"; the task-side inverse "project"/One is derived, so task needs no entry). Seeding persists this declaration as a relationship-table edge under the #2008 storage model (SchemaNode.relationships is the declaration source; set_schema_declarations writes the edge). No data migration. Adds a unit test asserting the project→task declaration; the pre-#2008 inbound-cache tests that would have covered the count were removed with that cache in #2008. Closes #1999. Co-Authored-By: Claude <[email protected]>
4104b83 to
78524ad
Compare
Rebased onto main (#2008 landed) — re-verifiedAfter the review, this PR conflicted with main because #2008 ("Store SchemaRelationship declarations as relationship-table edges", #2010) merged. Rebased onto latest main and adapted:
Re-verified green against the new storage model: #2008's own Re-review decision: NO RE-REVIEW NEEDED — the reviewed logic (descriptions + the project→task declaration) is byte-for-byte the same intent; the delta is a purely mechanical adaptation to #2008's storage model, validated against #2008's own suite. Prior verdict APPROVE stands. |
Summary
Two co-located schema fixes in
packages/core/src/models/core_schemas.rs(closes #1999).Part 1 — remove redundant type-name prefixes from field descriptions
descriptionrenders directly as the form field label, so a type-name prefix showed up as visible redundancy ("Project Status" inside a form already scoped to Project):project.status/priority/start_date/end_date: dropped the "Project " prefix → Status / Priority / Start date / End datetask.status/priority: dropped the "Task " prefix → Status / PriorityAudited every core schema.
person,skill,query, andai-chatuse genuinely descriptive prose (e.g. "Conversation status" is domain prose — the schema id isai-chat, not "conversation"), so no other schema needed changing.task's already-unprefixed fields (due_date,started_at,completed_at,assignee) are untouched.Part 2 — add the project → task relationship
projectnow declares atasksrelationship (targetType: task,cardinality: Many). The task-side inverse (project, One) is derived automatically viaRelationshipCache::get_inbound_relationships, sotaskneeds no entry of its own. Purely additive schema metadata — no data migration, norelationship-table rows created.Tests
relationship_cache_test.rsintegration tests that asserted an empty inbound cache when seeded with core schemas — now thatproject→taskexists they assert the one seeded relationship (target typetask, sourceproject, nametasks;target_types == 1,total_relationships == 1).core_schemastests and all 14 relationship-cache tests pass. Frontend unaffected (no test asserts core-schema relationship shape).test:all+cargo build --bin nodespaced+test:e2e) passed.Notes
Storage format is today's JSON-in-properties model; if #2008's storage redesign lands later it carries this declaration forward like any other. Unblocks #2007 (Relationships-button visibility gate needs a real relationship to test against).
🤖 Generated with Claude Code