Repository navigation
Replace task's free-text assignee field with a person->task relationship - #2507
Conversation
…hip (closes #2112) Task assignment becomes a typed edge instead of a scalar property. Person's schema declares `tasks` (Out/Many) targeting task, with `reverse_name: "assignee"` (One) — mirroring project's existing `tasks`/`project` pair, so task's assignee link is derived, never declared on task's own schema. Removes `assignee` end-to-end: task's schema field, `TaskNode`/`TaskNodeUpdate` (core, nodespace-types, Tauri), the gRPC message field, the dead-code assignee combobox in TaskSchemaForm, and the now-unused `idx_task_assignee` index. Assignment and clearing both work today through the existing generic create_relationship/delete_relationship API and RelationshipViewerModal — no new UI required; a dedicated picker is left to #2102 per the issue's own scope split. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_015kTvytaXv3TSDkTFuCg4WQ
Pragmatic Code Review — PR #2507 (closes #2112)Review Type: Initial Review SummaryThis is a well-executed mechanical removal plus a small, correctly-mirrored additive schema declaration. The Rust workspace and the touched frontend test suites all build/pass green (verified independently, not just taken on faith). The person Two real gaps surfaced, though: a stale reference in None of these are architectural regressions, and the core mechanism (schema declaration, removal, DDL/index cleanup, proto field removal) is sound. I'd call this a net positive that needs one clear fix (skill_pipeline.rs) before merge and one cheap follow-up (dev-proxy.ts) — not a fundamental rework. Requirements Check
Also verified: no migration/compat-shim code was added anywhere for the index or field removal — the field and index are deleted outright, consistent with the NO BACKWARD COMPATIBILITY policy. Findings🔴 Critical
🟡 Important
🟢 Suggestions / Nits
Verification performed
RecommendationREQUEST CHANGES The core mechanism is sound and this is a net improvement over the pre-existing free-text field. But the 🔴 finding (stale agent guidance in |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: REQUEST CHANGES (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
- Drop assignee from the "Graph Editing Guidance" skill's field_values example list (packages/agent/src/skill_pipeline.rs) — this live agent-facing prompt text told the LLM assignee was still a valid typed task field, which is now false and would mislead tool calls. Synced the two golden fixtures that pin this exact prompt string. - Remove the stale assignee field from dev-proxy.ts's TaskNodeUpdatePatch request body — TaskNodeUpdatePatch no longer has this field, so it was a genuine (if currently silent) TypeScript error. - Add a reverse_name == "assignee" assertion to the new person_task_assignee_relationship_assigns_and_clears_end_to_end test — the prior version never checked the one field that actually encodes "assignee" as a concept at runtime (verified by mutation: renaming reverse_name previously left the test green). Skipped as optional per the review's own framing (nits, not required): proto `reserved 6;` instead of deleting the field number outright, and schema.sql comment rewording — neither affects behavior or correctness. Addresses reviewer recommendations from PR #2507. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_015kTvytaXv3TSDkTFuCg4WQ
Addressed review feedback🔴 Critical — fixed:
🟡 Important — fixed:
🟢 Nits — skipped (optional per the review's own framing):
Also checked and confirmed out of scope: several
|
Pragmatic Code Review — PR #2507 (closes #2112)Review Type: Re-Review SummaryAll three real findings from the initial review are fixed correctly, and I independently verified each rather than trusting the commit message. Tests pass across the board, Verification of the 3 real findings🔴 Critical —
|
malibio
left a comment
There was a problem hiding this comment.
Re-Review verdict: APPROVE (self-approval blocked by repo policy on this self-authored PR — recorded here as fallback per the same protocol the initial review used). See full re-review report in PR comment: #2507 (comment)
…ssignee-relationship # Conflicts: # packages/core/src/models/core_schemas.rs
Merged main (#2508 / #2111 landed)#2111 (person schema: split `name` into `first_name`/`last_name`, plus a `title_template`) merged to `main` while this PR was in review. Merged `origin/main` in — one real conflict in `core_schemas.rs`'s person `SchemaNode` block, since both PRs touched adjacent fields on the same struct literal (#2111: `fields`/`title_template`; this PR: `relationships`). Resolved by keeping both additions: ```rust |
Summary
assigneeproperty: person's schema now declares atasksrelationship (Out/Many) targetingtask, withreverse_name: "assignee"(One) — mirroring project's existingtasks/projectpair. Task's assignee link is the derived inverse and carries no declaration of its own.assigneeend-to-end: task's schema field,TaskNode/TaskNodeUpdate(core, nodespace-types, Tauri command layer), the gRPCUpdateTaskNodeRequest.assigneefield, the dead-code assignee combobox inTaskSchemaForm(assigneeOptions: []placeholder), and the now-deadidx_task_assigneeSQL index (and itsdb/schema.sqlmirror).create_relationship/delete_relationshipAPI andRelationshipViewerModal— no new UI required. A dedicated assignee picker is explicitly left to Add typed property forms for packaged schemas person and project, following the task form pattern #2102 per the issue's own scope split.assigneeproperty and its index are deleted outright; a database needs a reset to pick up the new relationship-only shape.Design decisions
Many/reverseOne— a person can have many tasks, a task has at most one assignee (matches the free-text field's single-valued behavior).taskson person's side (mirrors project'stasks), reverse nameassigneeon task's side.assigneeis simply gone fromresolve_field/property-filter paths (no scalar property to filter on anymore); Kanban'seligibleGroupByFieldsalready excludes non-enum fields, soassignee(previouslytext) was never a valid group-by target and needed no change.assigneepurely as a generic scalar-token smoke test were switched topriorityinstead, preserving the same template-recompute coverage.Test plan
bun run test:all— all green (238+4 frontend files / 4919+61 tests, all Rust packages, 0 failures)bun run quality:fix— clean (eslint, svelte-check, tsc, cargo fmt, cargo clippy -D warnings)person_task_assignee_relationship_assigns_and_clears_end_to_endproves assignment, both-sides visibility, and clearing via the generic relationship APIcore_schemas.rsunit tests confirm the schema declaration (test_person_declares_tasks_assignee_relationship) and task's still-emptyrelationships(test_task_schema_has_fields, field count 6→5)Closes #2112
🤖 Generated with Claude Code
https://claude.ai/code/session_015kTvytaXv3TSDkTFuCg4WQ