Commit graph

104 commits

Author SHA1 Message Date
Johannes Millan
a59aa39931 feat(tasks): add notes panel shortcut 2026-05-12 12:48:45 +02:00
Het Savani
f7acb8de74
feat(task): add Ctrl+Enter and escape shortcuts (#7472)
* feat(task): add Ctrl+Enter and escape shortcuts

* fix(task): prevent accidental deletion on Escape, extract SubmitTrigger, and add tests

* fix(task): guard Escape deletion with !wasChanged && !newVal and make Mod+Enter no-op for top-level tasks

* fix(task): make Mod+Enter add a subtask regardless of task level

Top-level tasks previously made Mod+Enter a no-op; the keyboard chain
now creates a child subtask on top-level and a sibling on subtasks,
matching the existing `a` shortcut. Adds spec coverage for both paths.

* test(task): cover Mod+Enter ordering and rename spec to task-shortcuts

The new test asserts that typing a title and pressing Mod+Enter both
persists the title (via update) and spawns the new subtask (via
addSubTaskTo). Renames the spec file to reflect that it covers both
Escape and Mod+Enter handling on TaskComponent.

* fix(task): keep focus on fresh empty subtask and expand collapsed parent

- task-title: Mod+Enter is a no-op when both the current and previously
  persisted titles are empty, preventing duplicate empty subtasks on
  rapid Ctrl+Enter and keeping the textarea focused for typing.
- task.component: when Mod+Enter targets self (top-level task), expand
  the parent's hidden subtask list first so the newly spawned subtask
  is visible and can be focused for editing.

* revert(task): drop Mod+Enter dedupe — over-fires in browser

The dedupe path (skip when current and previous title are both empty)
intermittently blocked Mod+Enter even on tasks with content, leaving
the user with no visible response. Reverting to the simple unconditional
spawn while keeping the parent auto-expand fix from this commit chain.

* feat(task): on Mod+Enter, focus an existing empty subtask if one exists

Mod+Enter now spawns a new subtask only if there is no empty subtask
already under the same parent. If one is found, focus moves to it
instead of creating a duplicate. Works the same way for both subtasks
(empty siblings) and top-level tasks (empty children). When the parent
has HideAll set, expand the subtask list first via showSubTasks so the
focused/created child is visible.

* feat(task): trigger Mod+Enter from focused-task path too

Previously Mod+Enter only fired from the title editor. Now a focused
(but not editing) task also responds — invoking the same smart spawn /
focus-empty-sibling logic via the global task shortcut handler.
addSubTaskOrFocusEmpty() is now public so the shortcut service can
delegate to it.

* fix(task): focused-task Ctrl+Enter mirrors `a` (plain create), not smart logic

When a task is focused but not editing, Ctrl+Enter now calls addSubTask
directly — same as the `a` shortcut. The smart focus-empty-sibling
logic stays inside the title editor, where the user has already chosen
to commit the current value. Also moved the new shortcut handler above
the plain-Enter "edit title" branch so the modifier key isn't swallowed.

* refactor(task): collapse Mod+Enter and keydown branches

- _addSubTaskOrFocusEmpty: parent and subtask paths now share a single
  store query and find/focus/create flow. The only parent-specific bit
  left is the HideAll auto-expand check at the top.
- handleKeyDown: replaced three near-identical Escape/Enter/ModEnter
  branches with a single trigger lookup followed by a shared blur path.

* test(task): cover handleKeyDown trigger routing + cleanup

- task-title.component.spec: 4 specs covering Escape/Enter/Mod+Enter
  routing and the mention-list swallow path. Locks in the recent
  consolidation of the keydown handler.
- task-shortcuts.spec: replace magic _hideSubTasksMode literals with
  named HideSubTasksMode enum values for grep-friendliness.
- task-shortcut.service: add a precedence comment near the Ctrl+Enter
  branch documenting that a user-remapped togglePlay (handled earlier)
  takes precedence over this hardcoded combo.

* refactor(task): consolidate task-focus helper into TaskService

Promote _focusNewlyCreatedTask to a public TaskService.focusTaskById,
and route TaskComponent's focus-empty-sibling flow through the same
helper. Eliminates ~15 lines of double-RAF + edit-if-empty duplication
that lived in task.component.ts._focusExistingTask.

---------

Co-authored-by: Johannes Millan <johannes.millan@gmail.com>
2026-05-05 21:30:12 +02:00
Johannes Millan
09492f5243 fix(tasks): fix deadline reminders showing empty dialog and re-triggering infinitely
Strip _deadline suffix from reminder IDs before passing to the dialog so
task lookups succeed. Add isDeadlineReminder flag so the dialog can use
deadlineRemindAt for display, clear it on dismiss, and snooze by updating
the deadline reminder time instead of the schedule reminder.
2026-03-14 13:04:44 +01:00
Johannes Millan
0f12bcb113 feat(tasks): add deadline fields to task model 2026-03-14 13:04:44 +01:00
Johannes Millan
4c0c23d033 feat(github): add two-way sync framework with auto-create issues
Implement a flexible two-way sync system for GitHub issues:

- Add field mapping framework (isDone↔state, title↔title, notes↔body)
  with configurable sync directions (off/pullOnly/pushOnly/both)
- Push field changes to GitHub on task update via NgRx effect
- Auto-create GitHub issues for new top-level tasks (opt-in toggle)
- Add adapter interface for future provider extensibility
- Add conflict detection using last-synced baseline values
2026-03-03 11:27:20 +01:00
Johannes Millan
bfdac6d19a refactor(op-log): merge LWWOperationFactory into ConflictResolutionService
- Consolidate LWWOperationFactory methods (createLWWUpdateOp, mergeAndIncrementClocks)
  into ConflictResolutionService to reduce service count
- Remove redundant caching in SuperSyncProvider (SyncCredentialStore already caches)
- Remove _onBlurWhenNotTracking$ sync trigger from SyncTriggerService
- Add documentation for dueDay/dueWithTime mutual exclusivity pattern
- Change docker-compose postgres port to 55432 to avoid conflicts
2026-01-29 18:24:15 +01:00
Johannes Millan
ce91c8b1dc Merge branch 'master' into feat/operation-logs
Resolve merge conflicts:
- package.json: use @types/node@^22.19.5
- sync-form.const.ts: keep eslint-disable for naming convention
- global-config.effects.ts: remove extra blank line
- unlink-all-tasks-on-provider-deletion.effects.ts: keep deprecation notice
- auto-fix-typia-errors.ts: keep better-typed getValueByPath
- undo-task-delete.meta-reducer.spec.ts: keep getLastDeletePayload import
- Accept deletions for files refactored into operation-logs architecture
2026-01-10 17:08:09 +01:00
Johannes Millan
b69dded9f1 chore(deps): update minor/patch dependencies
- prettier: 3.5.1 → 3.7.4
- pretty-quick: 4.1.1 → 4.2.2
- stylelint: 16.18.0 → 16.26.1
- @playwright/test: 1.56.1 → 1.57.0
- jasmine-core: 5.10.0 → 5.13.0
- eslint-plugin-prettier: 5.2.1 → 5.5.4
- chrono-node: 2.8.3 → 2.9.0
- ical.js: 2.1.0 → 2.2.1
- electron-builder: 26.3.3 → 26.4.0
- core-js: 3.39.0 → 3.47.0
- And other minor updates

Applied prettier formatting changes from v3.7.4.
2026-01-10 16:16:47 +01:00
Johannes Millan
709d40c829 fix(tasks): include reminderId on TaskCopy 2025-12-12 20:48:40 +01:00
Johannes Millan
6839c20c27 refactor(task): remove deprecated reminderId field
The reminderId field was deprecated in favor of remindAt. After migration
4.6, tasks store reminder timestamps directly in remindAt instead of
referencing a separate Reminder entity.

Changes:
- Remove reminderId from TaskCopy interface and plugin-api Task type
- Update all code checking reminderId to use remindAt instead
- Update data repair to clear legacy reminderId values
- Remove obsolete reminderId validation (reminders array is now empty)
- Update migration files to handle legacy types
- Update tests to reflect new behavior
2025-12-12 20:47:40 +01:00
Johannes Millan
3129c1dbca test(oplog): add persistent-action tests and fix compilation/lint errors
- Add unit tests for isPersistentAction type guard.

- Fix compilation errors in task scheduling components caused by removed reminderId/removeReminderFromTask.

- Fix type error in create-sorted-blocker-blocks.spec.ts.

- Fix lint errors in various files.
2025-12-12 20:46:27 +01:00
Johannes Millan
794a13a76a fix: inline scheduling of Overdue tasks results in abnormal behavior
Closes #5656
2025-12-05 12:02:56 +01:00
Johannes Millan
bc00f3da9a feat(issue): improve legacy compatability #5056 2025-09-03 15:16:35 +02:00
Milosch Füllgraf
47eeed90fd add support for subtasks to issue providers 2025-08-10 21:51:16 +02:00
Johannes Millan
4b7bdf1b14 feat: cleanup all old migration functions from last year and remove MODEL_VERSION and MODEL_VERSION_KEY 2025-07-16 22:20:19 +02:00
Johannes Millan
598023164d feat: add modified date to task model 2025-07-12 14:15:37 +02:00
Johannes Millan
d4d81bf511 feat(plugin-api): create foundational plugin API package
- Add @super-productivity/plugin-api package with TypeScript definitions
- Define core plugin interfaces, types, and manifest structure
- Add plugin hooks system for event-driven architecture
- Create plugin API type definitions and constants
- Add documentation and development guidelines
2025-06-27 18:13:19 +02:00
Johannes Millan
d978d33cd7 feat: add Later Today section with disabled drag-and-drop #4382
Implement collapsible "Later Today" section on work-view page that shows:
- Main tasks scheduled for later today
- Subtasks scheduled for later today (even if parent isn't)
- Tasks hidden from normal undone task list
- Chronological ordering by earliest scheduled time
- Disabled drag-and-drop functionality

Includes comprehensive test coverage with 14 test cases covering edge cases,
parent-subtask relationships, and sorting behavior.
2025-06-22 16:54:17 +02:00
Johannes Millan
8a35067d77 test: fix all unit tests 2025-05-11 17:13:18 +02:00
Johannes Millan
976aeb09ee feat(inbox): use inbox project rather than tag 2025-05-10 16:40:03 +02:00
Johannes Millan
3fa8f2ba82 feat(dueDate): make drag and drop work 2025-05-03 13:48:22 +02:00
Johannes Millan
309334c79a feat(dueDate): outline new add tasks for tomorrow stuff 2025-05-01 13:19:55 +02:00
Johannes Millan
96fe0ca342 refactor(dueDate): use new dueDay to simplify things 2025-05-01 13:19:55 +02:00
Johannes Millan
f4b9cef218 feat(dueDate): rename again 2025-05-01 13:19:55 +02:00
Johannes Millan
b8976e54ce feat(dueDate): rename plannetAd to due 2025-05-01 13:19:55 +02:00
Johannes Millan
77514141b7 feat(dueDate): outline model changes 2025-05-01 13:19:55 +02:00
Johannes Millan
4e0940f53b feat(pfapi): improve migration and avoid potential error cases 2025-04-14 15:54:50 +02:00
Johannes Millan
fb3a3810c5 feat(task): improve ShowSubTasksMode model by renaming it and reducing data by allowing undefined 2025-04-12 13:59:21 +02:00
Johannes Millan
40cd575f88 feat(pfapi): add task model validation and proper migration 2025-04-12 13:59:20 +02:00
Johannes Millan
3d132f13f7 feat(pfapi): make most basic validations via typia work 2025-04-12 13:59:17 +02:00
Trang Le
67fd3116c6 add property to check whether a planned task has scheduled time or not 2025-03-08 15:56:27 +07:00
Johannes Millan
3113ad0f8c feat: make task data smaller 2025-03-02 16:43:01 +01:00
Johannes Millan
2d199e02b2 feat(issueProvider): proof of concept for dropping search items 2024-11-29 21:06:20 +01:00
Johannes Millan
47b124c8d8 fix: don't open side panel when dialog-task-detail-panel is used 2024-09-02 20:53:27 +02:00
Johannes Millan
bd3d9c1c08 refactor: rename remaining occurrences of taskAdditionalInfo 2024-08-24 10:06:46 +02:00
Johannes Millan
9eb622f86a refactor: task additional info to task detail panel 2024-08-23 15:00:05 +02:00
Johannes Millan
215475b574 feat: rework scheduled/repeat page 2024-08-23 15:00:05 +02:00
Johannes Millan
d83c5c3b65 feat(schedule): make day indication work for autoflow 2024-08-09 21:30:02 +02:00
Johannes Millan
935f7fa555 feat(horizontalTimeline): make plan for day work better 2024-08-09 21:28:17 +02:00
Johannes Millan
c66180d1f9 test(2FileSync): outline super basic unit tests for service 2024-07-06 18:29:58 +02:00
Johannes Millan
83ae398f3e feat(2FileSync): outline basic stuff 2024-07-06 18:29:58 +02:00
Johannes Millan
4cbb523472 feat(calendarIntegration): add isueProviderId for calendar tasks and make adding from timeline work correctly 2024-01-23 13:12:20 +01:00
Johannes Millan
b34886de6d feat(gitlab): save and use info about already tracked data for issue provider tracking 2023-12-08 12:45:12 +01:00
Johannes Millan
61cfad0c52 feat: ask to update all previous instances if task repeat settings change 2022-01-04 12:22:52 +01:00
Johannes Millan
0dcd9b3e65 refactor: improve task model checks by always requiring subTasks property for TaskWithSubTasks 2021-07-07 14:48:07 +02:00
Johannes Millan
f3ffc81586 feat(repeat): also make remind at configurable 2021-06-24 17:40:22 +02:00
Johannes Millan
00458c0e98 refactor(schedule): extract task reminder options 2021-06-24 17:40:22 +02:00
Johannes Millan
9e7dfce590 feat(task): remove not needed optional chaining 2021-05-26 21:03:18 +02:00
Johannes Millan
35a2616c64 feat(timeline): also show sub tasks if parent is planned 2021-05-12 21:05:45 +02:00
Johannes Millan
584915a630 feat(timeline): make splitting logic work 2021-05-12 21:05:16 +02:00