Repository navigation
Description
Overview
Task node schema properties (status, priority, due date, assignee, etc.) do not respond to changes when the task is opened in TaskNodeViewer. This issue was previously masked by the navigation bug fixed in #916 — before that fix, nested task nodes could never open in TaskNodeViewer (they incorrectly opened the parent's BaseNodeViewer instead).
Problem Statement
Reproduction:
- Open NodeSpace with task nodes nested under a date or text node
- Click the open button on a task node (now correctly opens TaskNodeViewer after Fix: Smart navigation resolveWithRootAncestor breaks task node viewer opening #916)
- Expand the schema properties panel
- Try changing status, priority, due date, or any other field
- Expected: Property updates visually and persists to backend
- Actual: Nothing happens — no visible update, no persistence
Root Cause
Needs investigation. Likely a pre-existing issue that was never caught because nested tasks couldn't open in TaskNodeViewer until #916 landed.
Possible causes to investigate:
-
Scope question — nested-only or all tasks? First determine whether root-level (non-nested) task nodes also have this problem. If root-level tasks work fine, the issue is specific to how nested tasks are loaded into the store.
-
Version field mismatch: When a task node is loaded as a child of a parent viewer, the
versionfield may not be set correctly. If the backend rejects the update due to a version conflict, the error may be silently caught and rolled back (seeshared-node-store.svelte.tsline ~1537). -
Spoke fields not populated on child load: Task nodes loaded as children of a date/text viewer may not have their spoke fields (
status,priority,dueDate, etc.) populated — they might only have the baseNodefields. ThenodeToTaskNode()conversion in TaskSchemaForm would then produce aTaskNodewith all null fields. -
Optimistic update gaps:
updateTaskNode()inshared-node-store.svelte.ts(line ~1481) only mapsstatus,priority,dueDate,assignee,contentto local changes — missingstartedAtandcompletedAt. The backend response mapping (line ~1526) also omits these two fields.
Acceptance Criteria
- Determine if bug affects root-level tasks or only nested tasks
- All core task fields (status, priority, dueDate, assignee) are settable and persist
-
startedAtandcompletedAtfields are settable and persist - Optimistic local updates work for all fields (UI updates immediately)
- Backend response mapped back correctly for all fields after persistence
- No silent error swallowing — failures visible in dev console
- Tests pass (
bun run test:all) - Code passes
bun run quality:fix
Technical Specifications
Key Files
- TaskSchemaForm:
packages/desktop-app/src/lib/components/property-forms/task-schema-form.svelte— UI form with handlers for each field - SharedNodeStore:
packages/desktop-app/src/lib/services/shared-node-store.svelte.ts—updateTaskNode()method (line ~1465), optimistic update (line ~1481), backend response mapping (line ~1526) - BaseNodeViewer:
packages/desktop-app/src/lib/design/components/base-node-viewer.svelte—updateSchemaField()function, schema form loading - TaskNode types:
packages/desktop-app/src/lib/types/task-node.ts—TaskNodeUpdateinterface,nodeToTaskNode()conversion - Rust TaskNodeUpdate:
packages/core/src/models/task_node.rs— Backend struct with snake_case fields (due_date,started_at,completed_at)
Debugging Approach
- Open dev tools console, attempt a property change, check for errors
- Add temporary logging in
updateTaskNode()to verify it's being called - Check if the node in the store has a valid
versionfield - Verify spoke fields are present on the node object (not just base Node fields)
Related Issues
- Fix: Smart navigation resolveWithRootAncestor breaks task node viewer opening #916 (fixed navigation, unmasked this bug)
- Fix: Smart navigation resolveWithRootAncestor breaks task node viewer opening #915 (original navigation bug report)
Activity
Fix: Task schema properties settable in TaskNodeViewer (closes #919)
Task schema properties not settable in TaskNodeViewer for nested tasks (
Task schema properties not settable in TaskNodeViewer for nested tasks (