Skip to content

fix(tasks): synchronize file updates with SQLite and FTS - #230

Open
fallintoplace wants to merge 1 commit into
ClickHouse:mainfrom
fallintoplace:fix-task-update-sync
Open

fix(tasks): synchronize file updates with SQLite and FTS#230
fallintoplace wants to merge 1 commit into
ClickHouse:mainfrom
fallintoplace:fix-task-update-sync

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • persist the final task state after applying file-backed updates
  • keep deadline metadata and full-text search synchronized with Markdown files
  • preserve status and tag metadata updates when no task file is changed

Problem

task_update refreshed SQLite and FTS only inside the title-update branch, before applying the remaining changes. This left three stale-state paths:

  • deadline-only updates changed Markdown but not the database deadline
  • note-only updates were absent from search
  • combined title and note updates indexed the content before the note was appended

Deadline sorting, escalation, the tasks UI, and search could therefore disagree with the task file until a later reindex.

Fix

The handler now applies all requested file changes first, writes the final Markdown, and then performs one upsert with the final title, status, deadline, tags, and content. Metadata-only updates keep their existing fallback path.

Tests

Regression coverage verifies deadline-only updates, note indexing, and a combined title, status, deadline, tags, and note update.

  • task-status suite: 21 passed
  • database and task-status suites: 127 passed

@fallintoplace fallintoplace changed the title Fix task update synchronization with SQLite and search Keep task files, metadata, and search index in sync Jul 30, 2026
@fallintoplace
fallintoplace force-pushed the fix-task-update-sync branch 2 times, most recently from e5e37da to 9a269c6 Compare July 30, 2026 17:58
@fallintoplace fallintoplace changed the title Keep task files, metadata, and search index in sync fix(tasks): synchronize file updates with SQLite and FTS Jul 30, 2026
@fallintoplace
fallintoplace force-pushed the fix-task-update-sync branch from 9a269c6 to b331ab7 Compare July 30, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant