Commit graph

2614 commits

Author SHA1 Message Date
callumalpass
d3203b203f Merge pull request #1679 from Lorite/fix_1678_open_the_timeblock_modal_with_the_task_title_prefilled_from_the_task_context_menu
# Conflicts:
#	docs/releases/unreleased.md
2026-03-29 10:25:57 +11:00
callumalpass
f5a21bebdd fix: anchor task timeblocks to scheduled date 2026-03-29 09:48:39 +11:00
callumalpass
d4cca1ba55
Merge pull request #1607 from victor-software-house/fix/tag-identification-hash-prefix
fix: strip # prefix from tags in isTaskFile for tag-based identification
2026-03-29 09:34:52 +11:00
callumalpass
3249a3c1dd docs: restructure unreleased notes for drag-to-reorder with contributor credits 2026-03-29 09:27:46 +11:00
callumalpass
ad04c862ab fix: support multi-issue references in release note link transformation
Extract transformReleaseNoteIssueLinks as a testable export that handles
comma-separated issue refs like (#123, #456) instead of only single refs.
2026-03-29 09:27:46 +11:00
callumalpass
af7444318a refactor: remove duplicate date modals in favor of shared DateTimePickerModal
DueDateModal and ScheduledDateModal were near-identical 230-line copies
that duplicated quick-date presets already provided by DateContextMenu.
Replace both with a single openTaskDatePicker method that reuses the
existing DateTimePickerModal.
2026-03-29 09:27:46 +11:00
callumalpass
cfe9df1d6d Merge pull request #1687 from Lorite/fix_1686_when_creating_a_new_timeblock_from_the_advanced_calendar_view_in_a_different_week_the_view_resets_to_the_current_week 2026-03-29 09:26:10 +11:00
callumalpass
8c2d165bc0 fix: preserve calendar date only for incidental recreates 2026-03-29 09:23:51 +11:00
Lorite
c3d69d33f6 Fix a bug about resetting the calendar view to today incorrectly 2026-03-29 09:22:50 +11:00
callumalpass
b186b240b8
Merge pull request #1706 from martin-forge/codex/fix-1695-google-calendar-archive-reliability
Fix Google Calendar archive cleanup reliability
2026-03-29 09:06:03 +11:00
callumalpass
4ed824adb3 Merge branch 'roadmap/refactor-tasknotes' 2026-03-29 08:33:08 +11:00
callumalpass
7a83c25937 refactor: extract task modal editor and list helpers 2026-03-29 08:26:09 +11:00
callumalpass
970eb72464 refactor: extract task card and modal helpers 2026-03-29 07:55:37 +11:00
callumalpass
a3f2395c50 refactor: add typed bases adapter boundary 2026-03-29 07:52:05 +11:00
callumalpass
651acec4d5 refactor: extract filter query planner 2026-03-29 07:49:50 +11:00
callumalpass
ef1262e8e8 refactor: split task creation and update flows 2026-03-29 07:47:22 +11:00
callumalpass
a8e8b29810 refactor: extract plugin bootstrap and architecture docs 2026-03-29 07:42:09 +11:00
callumalpass
db8842a52e test: align task card mocks with i18n labels 2026-03-29 07:38:05 +11:00
callumalpass
481aae4397 refactor: localize manual ordering copy 2026-03-29 07:35:51 +11:00
callumalpass
26712c4f7d fix: polish manual ordering drag reorder 2026-03-29 07:35:51 +11:00
callumalpass
9fed004fc7 change: default manual order field to tasknotes_order 2026-03-29 07:33:57 +11:00
callumalpass
83c14597a5 fix: rebalance oversized drag reorder ranks 2026-03-29 07:33:57 +11:00
callumalpass
3d379dccf2 fix: harden drag reorder planning and preview 2026-03-29 07:33:57 +11:00
ac8318740
64cbb3a2ec fix(drag-reorder): enable instant optimistic move for swimlane drag-drop
Fix CSS selector in setupSwimLaneCellDragDrop that queried
.kanban-view__cards (never exists in swimlane cells) instead of
.kanban-view__tasks-container, causing performOptimisticReorder to
bail out and cards to snap back before the data update.

Extract reconstructDropTarget helper from the inlined same-column
fallback logic in setupColumnDragDrop so both column and swimlane
drop handlers share a single implementation for resolving drop
position when the user drops in empty space.

Add diagnostic logging to the swimlane drop handler matching the
column handler's pattern.
2026-03-29 07:33:57 +11:00
ac8318740
daf22d6420 fix(drag-reorder): eliminate snap-back lag on cross-column drop and preserve sort order
Cross-column drops onto empty space / column backgrounds caused a
~650ms snap-back because performOptimisticReorder bailed out when
dropTarget was undefined.  Now appends the dragged card(s) to the
target container immediately when targetContainer is provided.

Also preserves the task's existing sort_order on cross-column empty-
space drops instead of assigning generateEndRank(), so moving a card
between columns and back retains its original relative position.

Adds a suppressRenderUntil guard to debouncedRefresh so a deferred
pendingRender from dragend cannot fire a stale render that undoes the
optimistic move.

Adds comprehensive debug logging throughout the drag-drop lifecycle
(gated behind enableDebugLogging) for diagnosing future issues.
2026-03-29 07:33:57 +11:00
ac8318740
69de73ef20 refactor(drag-reorder): extract side-effect logic so drag-drop can reuse it
Previously, drag-drop property changes (e.g. moving a card to a
"completed" column) only wrote the raw frontmatter value without
triggering the business-logic side effects that updateProperty handles
(completedDate, dateModified, auto-archive, webhooks, calendar sync,
dependent-task UI refresh).

Extract `applyPropertyChangeSideEffects` from TaskService.updateProperty
so callers that already perform their own atomic frontmatter write can
still fire the full side-effect chain. Wire it into both KanbanView and
TaskListView drop handlers, with derivative completedDate/dateModified
writes inlined into the same processFrontMatter call to avoid a second
round-trip. Make `updateCompletedDateInFrontmatter` public so views can
call it inside their frontmatter callback.
2026-03-29 07:33:57 +11:00
ac8318740
2356a78f83 feat(drag-reorder): gate debug logging behind a settings toggle
Debug output from drag-and-drop diagnostics was always emitted via
console.debug, which Obsidian's console does not filter by level.
Add an `enableDebugLogging` setting (default: off) so the [TN-DBG]
output is fully suppressed unless the user explicitly opts in.

- Add `enableDebugLogging` to TaskNotesSettings and DEFAULT_SETTINGS
- Add i18n strings and a toggle in the Features settings tab
- Guard KanbanView.debugLog() with an early return when disabled
- Switch remaining console.log calls to console.debug
- Inline side-effect handling into the atomic frontmatter write to
  avoid a second processFrontMatter round-trip after drag-drop
2026-03-29 07:33:57 +11:00
ac8318740
66b3ef1bd8 fix(drag-reorder): fix LexoRank bugs in filtered views and near-ceiling ranks
Several interrelated drag-to-reorder bugs fixed:

- computeSortOrder() now scans the full vault (ignoring swimlane filters)
  so invisible tasks in filtered views aren't leapfrogged during reorder
- Filter out tasks with undefined or non-LexoRank sort_orders (legacy
  numeric timestamps) from neighbor lookup to prevent rankBetween()
  from producing garbage values via ensureRank() fallbacks
- Fix safeGenNext() overflow: values starting with 'z' (near ceiling)
  now extend via the decimal part instead of appending an integer digit,
  which caused LexoRank.between() to wrap around
- Add sanity check in rankBetween() to detect out-of-range results from
  LexoRank.between() and fall back to safeGenNext()
- Reconstruct dropTarget from visible cards when column-level drop fires
  with null target (user drops in empty space below last card)
- Consolidate group/swimlane/sort_order into single atomic frontmatter
  write per task to prevent interleaved corruption
- Add DropOperationQueue to serialize rapid drops on the same task file
- Add optimistic DOM reorder on drop for instant visual feedback
- Add post-drop render suppression to prevent stale Bases data from
  overwriting optimistic positions
- Add esbuild copy-to-vault plugin for faster dev iteration
- Add .serena/ to .gitignore
2026-03-29 07:33:57 +11:00
ac8318740
6ea1b281b8 fix(drag-reorder): use paddingBottom to expand target column during cross-column drag
The previous approach expanded max-height on the parent column, but
overflow-y: clip on the inner container still clipped translateY-shifted
cards. Padding is real layout space that grows the container's content
box, keeping shifted cards within bounds.
2026-03-29 07:32:29 +11:00
ac8318740
99494510f1 fix(drag-reorder): replace line indicator with gap/slot UX and fix drag bugs
- Fix column expand/contract glitch: replace `transition: all` with specific
  properties and remove scale(1.02) transform on dragover columns
- Fix wrong drop position when dragging upward: collapse dragged card's
  layout space after browser captures drag image, removing the phantom
  element that distorted sibling getBoundingClientRect values
- Replace thin 3px accent line with animated gap/slot pattern where sibling
  cards shift apart via translateY to show the drop position
- Lock source column min-height during drag so collapsing the dragged card
  doesn't shrink the priority bucket
- Clip overflow on cards container during drag so translateY shifts don't
  cause scrollbars
- Suppress hover background-color, transform, and box-shadow on all task
  cards during active drag via body-level .tn-drag-active class
- Add rAF throttling to dragover handlers (preventDefault stays synchronous)
- Support cross-column drag: detect container change, clean old, set up new
- Respect prefers-reduced-motion: reduce for shift animations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 07:32:29 +11:00
ac8318740
624f4f0e82 refactor(drag-reorder): switch to LexoRank ordering and fix code review issues
Replace numeric midpoint sort_order with LexoRank string-based ordering.
This addresses robustness issues from PR review: buggy reordering when
notes lack sort_order, hardcoded "sort_order" field name, and duplicated
between-tasks logic.

- Extract rankBetween() helper with try/catch around LexoRank.between()
- Add ensureRank() to lazily assign LexoRank to unranked neighbors
- Thread sortOrderField param instead of re-reading settings per call
- Fix hardcoded "sort_order" writes in KanbanView and TaskListView
- Change sortOrder type from number to string across types and FieldMapper
- Pin lexorank dependency to 1.0.5 (no caret)
- Remove orphaned JSDoc stubs in KanbanView
- Pass swimlane params through to computeSortOrder in KanbanView
2026-03-29 07:32:29 +11:00
ac8318740
26fab9ec98 feat(drag-reorder): make sort_order property name configurable via settings
The drag-to-reorder feature hardcoded "sort_order" as the frontmatter
property name. This wires it through the existing FieldMapping system
so users can customise it in Settings > Task Properties, just like
every other property.

- sortOrderUtils: replace 3 hardcoded "sort_order" references with
  plugin.settings.fieldMapping.sortOrder
- isSortOrderInSortConfig: accept sortOrderField param so the sort
  config check uses the mapped name
- TaskListView / KanbanView: pass the mapped field name to all
  isSortOrderInSortConfig calls
- taskPropertiesTab: add Sort Order property card in Metadata section
- en.ts: add translation keys for the new settings card

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 07:32:29 +11:00
ac8318740
a18f58d3e4 feat(task-list): add drag-to-reorder with shared sort_order algorithm
Extract sort_order computation from KanbanView into sortOrderUtils.ts
as free functions (computeSortOrder, getGroupTasks, renumberAndInsert,
isSortOrderInSortConfig, stripPropertyPrefix) so both views share the
same midpoint insertion algorithm without code duplication.

Add drag-to-reorder to TaskListView:
- Container-level drag event delegation (dragenter/dragover/drop) with
  unconditional e.preventDefault() as required by the HTML5 DnD spec
- Within-group reordering: cards get draggable="true" when sort_order
  is in the view's sort config
- Cross-group dragging: detects group changes via a taskGroupKeys map
  (populated at render time) and updates the group property via
  TaskService.updateProperty alongside the sort_order write
- Deferred re-render during drag to prevent DOM destruction mid-drop
- Works in both flat and grouped modes; gracefully skipped in virtual
  scrolling paths

Simplify .task-card--dragging CSS: remove rotate/scale transforms and
pointer-events:none that caused adjacent cards to steal hit-test events
during drag. Add drop indicator pseudo-elements (::before/::after) for
visual feedback in task-list-view.css.
2026-03-29 07:32:29 +11:00
ac8318740
937e5557e4 feat(kanban): add within-column drag-to-reorder with sort_order
Implement card-level drag-and-drop reordering within kanban columns.
Dragging a card above or below another card computes a new sort_order
using a midpoint insertion algorithm and writes it to frontmatter.

New capabilities:
- Card-level dragover/drop handlers with top/bottom half detection
- Visual drop indicators (accent-colored bar above or below target)
- Midpoint insertion: new_value = floor((neighbor_above + neighbor_below) / 2)
- Vault-wide neighbor lookup so filtered/hidden tasks are still
  considered when computing midpoints (prevents order collisions)
- Proportional gap computation based on median spacing in the column
- Collision handling: when neighbors share identical sort_order values,
  renumber all column tasks evenly across the existing value range
- Deferred re-render during drag to prevent DOM destruction mid-drop
- Same-column detection to skip unnecessary group property writes

Supporting changes:
- Add sortOrder field to TaskInfo interface and FieldMapping
- Add sort_order to FieldMapper read/write and default field mapping
- Add columnTasksCache for render-time group data
- Add sort_order to e2e vault kanban view config
- Add CSS for drop-above/drop-below position indicators
2026-03-29 07:32:29 +11:00
callumalpass
f2f98fb433 chore: keep .ops local only 2026-03-29 07:24:47 +11:00
callumalpass
3d4f69087a refactor: clean up task card presentation plumbing 2026-03-29 07:20:09 +11:00
callumalpass
ca1d452c81 Merge branch 'worktree-agent-a264fdb6' 2026-03-29 06:21:49 +11:00
callumalpass
d4262a9c45 triage: create sidecars and reproduction tests for issues 1728-1734 2026-03-29 06:21:26 +11:00
callumalpass
e76d3f5bc3 Merge branch 'worktree-agent-afa96a4f' 2026-03-26 00:24:59 +11:00
callumalpass
3ade76e3b5 triage: create sidecars and reproduction tests for issues 1715-1726 2026-03-26 00:24:34 +11:00
callumalpass
52410322c5 chore: stop tracking local ops loop script 2026-03-25 08:09:27 +11:00
callumalpass
c3863baacc chore: checkpoint current tasknotes state 2026-03-25 08:08:28 +11:00
callumalpass
6845a59571 Merge branch 'worktree-agent-aa34a6c6' 2026-03-22 21:20:29 +11:00
callumalpass
8f41501574 Merge branch 'worktree-agent-a1cee338' 2026-03-22 21:20:26 +11:00
callumalpass
4a239c0639 Merge branch 'worktree-agent-af56f506' 2026-03-22 21:20:18 +11:00
callumalpass
9acd54a50f Merge branch 'worktree-agent-aeb438e6' 2026-03-22 21:20:14 +11:00
callumalpass
89ad02c622 Merge branch 'worktree-agent-a8307cc8' 2026-03-22 21:20:11 +11:00
callumalpass
6b14dea54b triage: create sidecars and reproduction tests for issues 1634-1656 2026-03-22 21:19:41 +11:00
callumalpass
6595492570 triage: create sidecars and reproduction tests for issues 1676-1697 2026-03-22 21:18:54 +11:00
callumalpass
b8b928f4f9 triage: create sidecars and reproduction tests for issues 1611-1629 2026-03-22 21:18:02 +11:00