Skip to content

Task schema properties not settable in TaskNodeViewer for nested tasks #919

Closed

Description

@malibio

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:

  1. Open NodeSpace with task nodes nested under a date or text node
  2. Click the open button on a task node (now correctly opens TaskNodeViewer after Fix: Smart navigation resolveWithRootAncestor breaks task node viewer opening #916)
  3. Expand the schema properties panel
  4. Try changing status, priority, due date, or any other field
  5. Expected: Property updates visually and persists to backend
  6. 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:

  1. 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.

  2. Version field mismatch: When a task node is loaded as a child of a parent viewer, the version field 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 (see shared-node-store.svelte.ts line ~1537).

  3. 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 base Node fields. The nodeToTaskNode() conversion in TaskSchemaForm would then produce a TaskNode with all null fields.

  4. Optimistic update gaps: updateTaskNode() in shared-node-store.svelte.ts (line ~1481) only maps status, priority, dueDate, assignee, content to local changes — missing startedAt and completedAt. 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
  • startedAt and completedAt fields 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 — TaskNodeUpdate interface, 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

  1. Open dev tools console, attempt a property change, check for errors
  2. Add temporary logging in updateTaskNode() to verify it's being called
  3. Check if the node in the store has a valid version field
  4. Verify spoke fields are present on the node object (not just base Node fields)

Related Issues

Activity

  1. added
    bug
    on Feb 28, 2026
  2. self-assigned this
    on Mar 7, 2026
  3. added a commit that references this issue on Mar 7, 2026
    01ed74a
  4. added a commit that references this issue on Mar 9, 2026
    ae7dd27
  5. added a commit that references this issue on Jun 22, 2026
    2441459
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugfrontend

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions