Skip to content

[Phase 4] Optional watched folders with explicit opt-in automation rules #12

Open

Description

@raiseCatError

Priority: P3 / later
Parent roadmap: #1
Dependencies: #4 operation jobs and preferably #11 recipes.

Goal

Allow common file-processing operations to happen automatically when new files arrive in designated folders, while keeping Tuck lightweight when automation is disabled.

Product scope

  • Rules: watched directory, supported extensions/file types, triggering conditions, selected built-in action or previously saved recipe, output directory, and enabled/paused status.
  • On first creation explain what will happen; make it easy to disable a rule or pause all watchers. Never watch all of ~/ by default.
  • Trigger only when a file has finished arriving/is stable; debounce bursts, avoid processing partial writes and safely handle filesystem event coalescing.
  • Exclude generated outputs and prevent loops (watching export/ or an output that itself matches the rule).
  • Idempotency tracking avoids repeated processing on restart or a rename.
  • Respect permissions, external-drive dismount and offline/missing watched folders; never silently redirect output to a different volume.
  • Define explicit app launch/background service behavior and power impact. No always-on helper if no rules are enabled.

Acceptance criteria

  • Adding/pausing/removing a rule works without requiring a reboot.
  • New stable matching files enqueue once; temporary/incomplete files do not process.
  • Loop-prevention works for recipes producing matching file extensions.
  • Errors are visible in Jobs/history, with optional nonintrusive macOS notifications.
  • Disabled rules cause no ongoing directory scans or background processing.
  • Rules survive restarts, bookmark changes and volume unmount without destructive fallback.

Tests

Rapid burst creation, rename storms, file writes in progress, nested dirs, duplicate events, output loops, missing permissions, restarts and external-volume disconnects. Evaluate FSEvents/DispatchSource APIs and security-scoped bookmarks rather than relying on frequent polling.

Activity

  1. raiseCatError commented on Oct 16, 2026

    @raiseCatError
    OwnerAuthor

    Implementation merged in PR #29 (commit 39c39966) after exact-head macOS Swift 6 tests and signed app/extension build passed. Opt-in event-driven direct-child image watcher with saved recipe, pause/enable/delete, two-observation stable writes, rename-event deduplication, rule-generation cancellation and recipe-change reloads. No background daemon; only active while Tuck.app is running. Still open for physical rapid-copy/unmount/restart QA, configurable trigger/file types and long-running 8 GB Mac performance observations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions