Skip to content

Support Obsidian Tasks metadata and subtasks in iPhone sync - #17

Merged
TheLinuxGuy merged 5 commits into
mainfrom
codex/iphone-tasks-compatibility
Oct 26, 2026
Merged

TheLinuxGuy merged 5 commits into
mainfrom
codex/iphone-tasks-compatibility

Conversation

@TheLinuxGuy

Copy link
Copy Markdown
Owner

The iPhone Tasks controls append dates, priorities and lifecycle metadata that the existing bridge rejects. Generated source links also hide existing trailing metadata from the Tasks parser, and task views flatten nested lists.

This change supports rich Tasks edits while retaining validated local commits and recoverable conflicts:

  • Add a field-aware emoji/Dataview parser. Put stable ownership links before metadata, namespace projected task IDs/dependencies, preserve source formatting and merge independent field edits.
  • Preserve nested and quoted task prefixes, non-task list parents, continuation text and hard breaks. Exclude quoted/list-indented fenced examples. Unique row identities reject reordered duplicate labels.
  • Import configured statuses, automatic completion/cancellation dates, reopening, plugin-calculated recurrence and explicit on-completion deletion. Recover recurrence exactly once if the source commit published before its export-state update.
  • Settle generated-view text edits and malformed intermediate saves. Hold the project's baseline while typing and recheck phone bytes before publishing a transaction.
  • Extend adapter field/status/recurrence/deletion capabilities and validate their authoritative round trips. Add plugin-version/settings diagnostics, schema-2 migration, accurate import counts and distinct Change Log fingerprints for rapid edits.
  • Update the public guides, root tool inventory and real-iPhone acceptance checklist.

Validation:

  • Full self-test under coverage: 819/819 passed (baseline: 661/661).
  • Public documentation: 248/248 passed; Ruff and staged framework guard passed.
  • Production line coverage: 93.84% (85% gate). Local changed executable-line coverage: 97.27% (499/513; 90% gate).
  • Executed the actual Tasks serializer/status/recurrence code at upstream commit 6c7e9a1443e645f29998619974329b61cd2d52dd (manifest 8.6.0). Commit 22 resulting fixtures for both formats, daily/weekly/monthly/when-done/undated recurrence, both row orders and deletion. Normal Folderwise tests consume JSON without adding Node or Obsidian runtime dependencies.

Structural child creation/deletion/reparenting uses the editable copied-note opt-in; arbitrary generated-row creation/reordering remains unsupported. Legacy boolean adapters retain their contract and require explicit capabilities for richer fields. Finite recurrence inherits upstream Tasks limitations.

Before cutting 0.2.0: record real iPhone/iCloud/launchd acceptance using docs/ibridge-testing.md, including fresh/existing vaults, offline delivery, scheduler ticks during typing and recovery. The automated and upstream-runtime checks do not certify device transport behavior.

Copilot AI balanced review requested due to automatic review settings October 26, 2026 08:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.56554% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.03%. Comparing base (f62183f) to head (d277d83).

Files with missing lines Patch % Lines
_tools/icloud_bridge.py 96.61% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #17      +/-   ##
==========================================
+ Coverage   92.80%   93.03%   +0.23%     
==========================================
  Files          17       18       +1     
  Lines        3264     3734     +470     
==========================================
+ Hits         3029     3474     +445     
- Misses        235      260      +25     
Files with missing lines Coverage Δ
_tools/ibridge_tasks.py 100.00% <100.00%> (ø)
_tools/icloud_bridge.py 94.22% <96.61%> (-0.50%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…ew header

Real-iPhone acceptance (0.2.0) showed `[Errno 11] Resource deadlock avoided`
while the scheduled job read a view iCloud was still writing. The per-key
vault hash snapshot and the phone-request reader held the project and
alerted on the first occurrence, bypassing the documented "retry quietly,
alert on the third consecutive failure" deferral. Transient OS errors now
propagate to the run-level deferral in both read paths.

Views of boolean-only adapter projects no longer claim that statuses and
metadata are imported; they say only checkbox toggles are.

Adds regression checks (fail before, pass after), traceability rows and
two real-run findings to docs/ibridge-testing.md.
@TheLinuxGuy

Copy link
Copy Markdown
Owner Author

Real-iPhone acceptance run (partial) and one fix

Tested: head 1976149, then f9426e2 (this push). Real iPhone via iPhone Mirroring, Obsidian 1.14.5, Tasks 7.21.0 (fixtures are 8.6.0), Dataview 0.5.68, through the real LaunchAgent (interval temporarily 1 min, settle 15 s for speed).

Passed on device (about 45 sub-cases): Markdown and CSV complete/reopen; start/due/scheduled/priority add, change and remove (all five priorities); Unicode, tags, links, task IDs, block IDs and dependencies preserved; [/]/[-] status toggles; nested, tabbed, numbered, quoted, callout and duplicate-titled children toggled independently; fenced examples not exported; daily/weekly/monthly/when-done/undated recurrence with exactly one successor; 🏁 delete, 🏁 keep and recurring+delete; renames (and rename+toggle in one commit); different-field Mac/phone edits merged for Markdown and CSV; Mac edits made during pending phone edits kept; rejections for CSV due/recurrence/rename, a corrupted heading, text after the link and a removed link (one notification, view restored, text saved under rejected/); state.json loss rebuilt identically with no commits; 20+ idle ticks made no commits.

Defect found and fixed (f9426e2): a brief iCloud lock ([Errno 11] Resource deadlock avoided) while the job read a vault view held the project and alerted on the first occurrence, contradicting "alert on the third consecutive failure". The hash snapshot and phone-request reader now defer. New self-test checks fail before the fix and pass after. Also: the generated view for a boolean-only adapter no longer claims statuses/metadata are imported.

Verification on the changed code: self-test under coverage 824/824; production line coverage 93.90% (gate 85%); public docs 248/248; Ruff clean; staged framework guard passed.

Not yet done on device (handed to a follow-up): automatic done/created/cancelled dates and Dataview format (the Tasks plugin would not re-enable after a settings toggle and needs an Obsidian restart), unknown/custom status rejection, row-reorder rejection, corrupted link id, dependency edit from the dialog, copied-note edits (create/delete/reparent children, recurrence), default 5-min/120 s quiet-period rerun, offline/reconnect, interrupted-export recovery, a rich CSV adapter, same-field conflict in isolation, banner visibility.

Findings (documented in docs/ibridge-testing.md): after a rejection the phone can keep and re-save the rejected text until the view is reopened; Tasks should be restarted, not toggled, after settings changes; text-after-link and removed-link rejections use generic messages; plan counts field edits as renames.

Recommendation: not ready to cut 0.2.0 until the remaining device cases are recorded (see the release gate in docs/ibridge-testing.md). Not merged; no release or tag created.

Distinguish description renames from field updates in plan, and diagnose trailing prose or damaged generated source links before structural checks.

Agent: Codex
Model: gpt-6
Clarify bridge previews and damaged source-link diagnostics
@TheLinuxGuy
TheLinuxGuy enabled auto-merge October 26, 2026 21:19
@TheLinuxGuy
TheLinuxGuy merged commit 2e1f7af into main Oct 26, 2026
13 checks passed
@TheLinuxGuy
TheLinuxGuy deleted the codex/iphone-tasks-compatibility branch October 26, 2026 21:36
@TheLinuxGuy

TheLinuxGuy commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner Author

Real-iPhone acceptance run: final outcome

Tested: real iPhone (iOS 27.0.1) via iPhone Mirroring, Obsidian 1.14.5, Tasks 8.6.0, Dataview 0.5.68, fictional data only. First tested 1976149, then f9426e2, PR #19 b0d0602, and finally main at 2e1f7af (its _tools/ and _template/ are identical to d384906/b0d0602). Every PASS came from the real scheduled LaunchAgent (org.folderwise.ibridge), never a manual sync. Foreground plan/status/doctor and explicit resolve were used only as labelled diagnostics.

Result: 88 checklist rows: 85 PASS (3 of them Mac-only), 3 BLOCKED, 0 failed, 0 pending.

Covered on device: Markdown and CSV toggles; renames (and their rejections: link in title, swapped titles, duplicate title, = prefix, over 200 characters, text after link, removed link); all date and priority edits in emoji and Dataview formats; custom, cancelled and unknown statuses; hierarchy shapes and reordering rejection; IDs, dependencies, links and Unicode preserved; recurrence (daily/weekly/monthly/when-done, completed-first order, replay and recovery, copied-note recurrence); on-completion delete; opt-in copied-note edits (create/reparent/delete child, property edit pausing only that project); concurrency (different fields merge, same-field conflict keeps the Mac value, CSV rename vs toggle); stale-copy and recovery paths; CSV capability enforcement and a rich CSV adapter; transient iCloud lock deferral; the default 5-minute interval with 120 s quiet period (a partial title typed across a tick was held for two ticks and only the final text was imported in one commit).

Blocked (external, not framework defects):

  • 11.1 offline edit then reconnect: iPhone Mirroring cannot toggle airplane mode or Wi-Fi; needs the physical phone.
  • 12.5 fresh vault: the bridge exported healthily and the phone opened and trusted the vault, but the Tasks plugin did not load in that fresh vault on the phone (a runtime plugin-load issue on the device); the existing-vault upgrade path passed.
  • 14.3 visible native notification banner: screen mirroring can suppress banners; the notification was requested once per issue run (verified in the run log), visibility needs a human.

Findings: four confirmed defects found during the run were fixed and merged earlier. Remaining notes, none blocking: a stale phone copy can re-save previously rejected text (documented conservative behavior), and rejection reasons for swapped titles and duplicates share one generic message ("title is already used by another task; reordering or duplicating tasks is not supported").

Readiness: no open framework bug. Recommendation: ready for plain 0.2.0, with three optional owner-only physical checks before tagging (offline/reconnect, banner visibility, fresh-vault plugin load); none points to a defect.

Scheduler and Tasks settings were restored to the defaults after the run (5-minute interval, 120 s quiet period, notifications on errors).

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.

2 participants