Skip to content

v0.4.0 — Task Tray GUI, Shared DB Module, Utility Scripts & Bug Fixes

Choose a tag to compare

@RMANOV RMANOV released this 05 Mar 03:29
· 565 commits to main since this release

v0.4.0 — Task Tray GUI, Shared DB Module, Utility Scripts & Bug Fixes

sqlite-memory-mcp now ships a native system tray task manager (PyQt6), a shared db_utils module eliminating cross-file duplication, five standalone utility scripts, and 15 bug fixes.

Tool count: 21 (unchanged). Total codebase: ~2,460 lines across 8 Python files.


What's new

Task Tray — PyQt6 System Tray App

A native desktop task manager that reads/writes directly to memory.db:

  • System tray icon with overdue badge counter (red circle, 9+ overflow)
  • Compact popup — Today + Overdue tasks, checkbox toggle, quick-add input
  • Full window — tabbed view (Today / Inbox / Next / All), double-click to edit, right-click to delete
  • Auto-refresh every 30 seconds when visible
  • Window geometry persistence via QSettings
python3 task_tray.py

Runs as a tray icon — left-click toggles popup, right-click shows context menu with "Open Full Window", "Add Task", "Quit".


Shared DB Module — db_utils.py

Single source of truth for constants and helpers used across all files:

from db_utils import (
    DB_PATH, BRIDGE_REPO,
    TASK_SECTIONS, TASK_PRIORITIES, TASK_STATUSES,
    TASK_HIDDEN_STATUSES, PRIORITY_RANK, PRIORITY_COLORS,
    TASK_ALLOWED_UPDATE_FIELDS,
    get_conn,          # context manager with WAL + foreign_keys + busy_timeout
    now_iso,           # UTC ISO 8601 timestamp
    parse_iso_date,    # safe YYYY-MM-DD -> date | None
    is_overdue,        # consistent overdue check
    build_priority_order_sql,  # CASE clause for SQL ORDER BY
    priority_sort_key,         # Python sort key (rank, due)
)

Eliminates ~93 lines of duplicated DB connection setup, constant definitions, and timestamp helpers across 7 files.


Utility Scripts

Five standalone scripts for task automation (all use db_utils):

Script Purpose
auto_archive.py Archive done tasks older than N days (--days 7 --dry-run)
daily_digest.py Print markdown task digest to stdout (--sections today,inbox,next)
overdue_bump.py Bump priority of overdue tasks (--target high --dry-run)
recurring_tasks.py Recreate recurring tasks based on JSON schedule (--dry-run)
task_report.py Generate static HTML Kanban board for GitHub Pages

All support --db PATH to override the default database location.


Bug Fixes

v0.3.0 code review (13 bugs):

  • Fixed in commit 33b2e26 — see changelog

Task Tray quality fixes:

  • Explicit dark text color in FullWindow for contrast on light backgrounds
  • Spec compliance: menu structure, QSettings, screen centering
  • Edge case tests for callbacks and data layer

db_utils refactoring fixes:

  • bridge_push(): git writes "nothing to commit" to stdout, not stderr — early-return path was dead code
  • TASK_ALLOWED_UPDATE_FIELDS was missing parent_id — tray's update_task() would reject subtask reassignment
  • Fragile overdue check (string comparison) replaced with is_overdue() using proper date parsing
  • Priority colors dict moved out of hot loop in tray popup rendering
  • Double get_summary() call in tray refresh eliminated (was querying DB twice per update)

Full changelog

261333d fix: bridge_push git stdout check + add parent_id to allowed fields
7e8ed43 refactor: extract shared db_utils module to eliminate duplication
25f5cdd fix(task-tray): explicit dark text color in FullWindow for max contrast
dc9786f docs(task-tray): add design doc and implementation plan
c4f73a7 fix(task-tray): address code quality review findings
42a9741 fix(task-tray): address spec compliance — menu, colors, QSettings, centering
8a0637f test(task-tray): add edge case and callback tests
4133a8e feat(task-tray): add full UI — tray icon, popup, full window, auto-refresh
4f02ace feat(task-tray): add TaskDB data layer with tests
33b2e26 fix: address 13 bugs found in v0.3.0 code review

Architecture

┌──────────────┐     stdio      ┌──────────────────┐
│  Claude Code  │◄──────────────►│  FastMCP Server   │
│  (session N)  │               │  server.py         │
├──────────────┤               │  21 MCP Tools      │
│  Task Tray    │──── direct ──►│  ┌──────────────┐ │
│  (PyQt6 GUI)  │   sqlite3     │  │  SQLite WAL   │ │
├──────────────┤               │  │  memory.db    │ │
│  Utility      │──── direct ──►│  │  FTS5 index   │ │
│  Scripts      │   sqlite3     │  └──────────────┘ │
└──────────────┘               └──────────────────┘
                                        │
                                   db_utils.py
                               (shared constants,
                                connection, helpers)

All consumers share db_utils.py for consistent DB access. WAL mode handles concurrency between MCP sessions, the tray app, and utility scripts.


Total tools: 21

 9 KG tools     (drop-in compatible with @modelcontextprotocol/server-memory)
 3 session tools (session_save, session_recall, search_by_project)
 6 task tools    (create_task, update_task, query_tasks, task_digest,
                  archive_done_tasks, bump_overdue_priority)
 3 bridge tools  (bridge_push, bridge_pull, bridge_status)
──────────────────
21 total

Dependencies

  • Python 3.10+
  • fastmcp>=2.0.0 (MCP protocol)
  • PyQt6 (optional — only for task_tray.py)

MIT license.