Cory Donnelly 2169a86f03 fix: honor documented repeater cookie semantics (#12523)
* fix: honor the three documented repeater cookie semantics

Logseq's documented repeater semantics (per docs.logseq.com and
`logseq/docs` `Tasks.md`) define three org-mode-style cookies for
recurring tasks:

  `.+`: repeats from the last completion date
  `++`: advances from scheduled, skipping in whole intervals to future
  `+`:  advances from scheduled by the declared interval (can stack)

The scheduler in `worker/commands.cljs` has been ignoring the cookie
entirely and applying a single, `++`-like semantic for every
recurring task. A user who wrote `.+1w` in markdown — expecting "a
week from when I actually finished" — silently got `++1w` behavior
("a week from the original scheduled date, skipped to future"),
which for a weekly task scheduled 2026-04-01 and completed on
2026-04-05 returns the next occurrence on 2026-04-08 rather than
the documented 2026-04-12.

This change:

  * Adds a closed-values `:logseq.property.repeat/repeat-type` property
    with values `:dotted-plus` / `:plus` / `:double-plus`. Default is
    `:double-plus` so existing recurring tasks see no behavior change
    on upgrade.
  * Rewrites the scheduler to branch on repeat-type and implement each
    semantic: `.+` anchors on now; `+` advances from original once (can
    stack overdue, per org-mode); `++` iterates in whole intervals
    until strictly after now. The `++` path is mathematically
    equivalent to the previous scheduler, so default-path behavior is
    preserved.
  * Guards against frequency <= 0 — the old code would silently produce
    nonsense and, under the new `++` loop, would spin forever. The
    guard short-circuits to `nil`.
  * Extracts `resolve-recur-frequency` and fixes the previous
    `(or [A B] [C D])` pattern in `compute-reschedule-property-tx` —
    any 2-vector is truthy in Clojure, so the default-value branch
    was unreachable and entities without an explicit
    `:recur-frequency` silently fell through to `frequency = nil`.
    `if-let` makes both branches reachable so default-to-1 actually
    works at migration time.
  * Restores the cookie-type selector that was removed from the
    date-time popover in `0a5b88467` (Nov 2020) — in-code support for
    all three cookies has been present but not user-pickable for the
    last ~5.5 years.
  * Adds `docs/recurring-tasks.md` — a technical spec for contributors
    and users that restates and augments the upstream `Tasks.md` text,
    adds decision guidance, and documents the implementation surface.
  * Extends the file-graph → DB-graph migration (built on top of
    `44d6bd49c4` "fix: preserve repeated schedule import") to also
    carry the cookie kind via a new `repeat-types` map in
    `graph-parser/exporter.cljs`, so an imported `.+1w` task lands in
    the DB-graph with `:repeat-type.dotted-plus` rather than picking
    up the `:double-plus` default. Test updated to assert this.
  * Adds deftests covering each cookie's distinctive behavior plus
    boundary cases (non-positive frequency, unknown unit, frequency > 1
    variants, `++` at month/year units, and both branches of
    `resolve-recur-frequency`).

The preexisting `get-next-time-test` passes unchanged under the
`:double-plus` default, preserving the existing regression contract.
Tests pin `t/now` via `with-redefs` for determinism.

Refs #7731, #11260, #6715, #8531. Folds in the small remaining delta
from #12532 (now closed as superseded by `44d6bd49c4`).

* fix: harden recurring task repeat type

* fix: contain repeat type selector

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: handle clamped monthly repeats

---------

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-14 17:53:11 +08:00
2026-03-12 15:10:55 +08:00
2026-05-12 22:13:55 +08:00
2026-05-14 13:21:22 +08:00
2026-05-10 15:48:26 +08:00
2026-03-12 15:12:33 +08:00
2025-07-10 16:28:05 +08:00
2026-05-06 21:38:04 +08:00
2026-04-24 23:40:25 +08:00
2026-05-09 15:28:11 +08:00
2026-05-12 23:36:42 +08:00
2026-05-04 12:31:54 +08:00
2026-04-24 23:40:25 +08:00
2026-05-10 17:28:10 +08:00
2026-01-19 21:11:50 +08:00
2026-05-04 12:31:54 +08:00
2026-05-10 23:26:32 +08:00
2026-04-02 18:51:29 +08:00

Logseq

A privacy-first, open-source platform for knowledge management and collaboration



Download Logseq

forum chat on Discord follow on Twitter

latest release version

Table of Contents

🚀 Database Version

The Database version (DB version) of Logseq introduces DB graphs. See this page to get an overview of the main features for DB graphs. If you are an existing user, see changes with the DB version. The DB version has its own new mobile app (on iOS, with Android coming soon)! To participate in the mobile app alpha, please complete this brief form. The DB version also has a new sync approach, RTC (Real Time Collaboration)! You can use it to sync graphs between multiple devices or collaborate with others. To participate in the RTC alpha, please fill out this form.

The DB version is in beta status while the new mobile app and RTC is in alpha. This means that data loss is possible so we recommend automated backups or regular SQLite DB backups. We recommend you create a dedicated test graph and choose one project thats not crucial for you.

To get started with the DB version:

  • To try the latest web version, go to https://test.logseq.com/.
  • To try the latest desktop version, go to https://github.com/logseq/logseq/releases/tag/nightly and download the artifact for your operating system.
  • To try the latest by building from the source code
    • Use test/db for stable releases. Fewer bugs and slower updates. Update frequency: days or weeks.
    • Use master for the latest updates as they are developed. Expect more bugs and faster changes. Update frequency: hours or days.
  • To report bugs, please file them at https://github.com/logseq/db-test/issues.
  • For feature or enhancement requests, please file them on Discord on the #db-feedback channel.
  • For discussions:
    • General ==> see the #db-chat channel in Discord.
    • Sync and RTC ==> see the #sync-test channel in Discord.
    • Mobile ==> see the #mobile-test channel in Discord.

🤔 Why Logseq?

Logseq is a knowledge management and collaboration platform. It focuses on privacy, longevity, and user control. Logseq offers a range of powerful tools for knowledge management, collaboration, PDF annotation, and task management with support for multiple file formats, including Markdown and Org-mode, and various features for organizing and structuring your notes.

In addition to its core features, Logseq has a growing ecosystem of plugins and themes that enable a wide range of workflows and customization options. Mobile apps are also available, providing access to most of the features of the desktop application. Whether you're a student, a professional, or anyone who values a clear and organized approach to managing your ideas and notes, Logseq is an excellent choice for anyone looking to improve their productivity and streamline their workflow.

logseq-demo

Download Logseq

👀 How can I use it?

To start using Logseq, follow these simple steps:

  1. Download the latest version of Logseq
  2. Install Logseq on your device and launch the application
  3. Start writing ✍️

That's it! You can now enjoy the benefits of using Logseq to streamline your workflow, manage your projects, and stay on top of your goals. Have fun! 🎉

Linux users: Use the automated installer script for the best experience:

# Download and run the installer
curl -fsSL https://raw.githubusercontent.com/logseq/logseq/master/scripts/install-linux.sh | bash

# Or install a specific version
curl -fsSL https://raw.githubusercontent.com/logseq/logseq/master/scripts/install-linux.sh | bash -s -- 0.10.14

# For user-specific installation (no root required)
curl -fsSL https://raw.githubusercontent.com/logseq/logseq/master/scripts/install-linux.sh | bash -s -- --user

📚 Learn more

🫶 Support Logseq Development

If you find Logseq useful and want to help us keep the project growing, please consider supporting our contributors on Open Collective. Your support shows our contributors that their efforts are appreciated and motivates them to continue their excellent work. Every contribution, no matter how small, helps us keep improving Logseq.

💡 Feature requests

We value your input on improving Logseq and making it more useful for you. If you have any ideas or feature requests, please share them in the Logseq Forum: Feature Requests section.

Your feedback helps us understand our users' needs and prioritize the features that matter most to you. We appreciate your time and effort in sharing your thoughts with us.

We appreciate your support, and we look forward to hearing your ideas!

🔌 Plugin API

Logseq provides a plugin API that enables developers to create custom plugins and extend the functionality of Logseq. The plugin API documentation is available at plugins-doc.logseq.com, where you can find everything needed to get started with plugin development.

We value your feedback and suggestions on how to improve our documentation. Please do not hesitate to contact us with any comments or questions. Your input helps us to provide a better experience for our users and developers.

Thank you for using Logseq, and we look forward to seeing what you create with our plugin API!

🌟 Contributing to Logseq

To start contributing to Logseq, please read CONTRIBUTING.md. There are ways to contribute with code and without code. We welcome all contributions, big or small, and we appreciate your time and effort in helping us improve Logseq. We look forward to your contributions 🚀

🛠️ Setting Up a Development Environment

If you want to set up a development environment for the Logseq web or desktop app, please refer to the Develop Logseq guide for macOS/Linux users and the Develop Logseq on Windows guide for Windows users.

In addition to these guides, you can also find other helpful resources in the docs/ folder, such as the Guide for Contributing to Translations, the Docker Web App Guide and the mobile development guide

🧰 Logseq CLI (Node)

Logseq CLI documentation is maintained in docs/cli/logseq-cli.md.

Inspiration

Logseq is inspired by several unique tools and projects, including Roam Research, Org Mode, TiddlyWiki, Workflowy, and Cuekeeper.

We owe a huge debt of gratitude to the developers and creators of these projects, and we hope that Logseq can continue to build on their innovative ideas and make them accessible to a broader audience.

Thank you to all those who inspire us, and we look forward to seeing what the Logseq community will create with this tool!

Logseq is also made possible by the following projects:

  • Clojure & ClojureScript - A dynamic, functional, general-purpose programming language
  • DataScript - An immutable database and Datalog query-engine for Clojure, ClojureScript and JS
  • OCaml & Angstrom, for the document parser mldoc
  • isomorphic-git - A pure JavaScript implementation of Git for NodeJS and web browsers
  • SCI - A Small Clojure Interpreter

🙏 Thank You

We want to express our sincere gratitude to our Open Collective sponsors, backers, and contributors. Your support and contributions allow us to continue developing and improving Logseq. Thank you for being a part of our community and helping us make Logseq the best it can be!

💎 Sponsors

[Become a sponsor]

🌟 Contributors

Logseq - Your joyful, private digital garden | Product Hunt

Languages
Clojure 78.4%
JavaScript 7.9%
CSS 4.5%
TypeScript 3.7%
Swift 2%
Other 3.4%