fix: bookmarks/récents utilisent TabManager + drag-to-split corrigé
CI / lint (push) Failing after 10s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Successful in 15s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled

Bug 1 — bookmarks/récents sans tab:
  dashboard.js:135: openFile() → TabManager.openPreview()
  _createCard() est partagé par DashboardRecentWidget ET DashboardBookmarkWidget

Bug 2 — drag-to-split bloqué en single-pane:
  La condition 'if (dragData.paneId === paneId) return' empêchait le split
  car en single-pane, le drag part du pane 0 et drop sur le pane 0.
  → Supprimé. Edge detection vérifiée avant, cross-pane vérifié après.
  Même pane + pas edge → laissé au tab handler (reorder).
This commit is contained in:
2026-07-27 23:04:51 -04:00
parent d7b0998af8
commit 1a9a555bee
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -330,9 +330,9 @@ const DashboardRecentWidget = {
card.appendChild(footer);
// Click handler
// Click handler — open in tab system (not raw openFile)
card.addEventListener("click", () => {
openFile(file.vault, file.path);
TabManager.openPreview(file.vault, file.path);
});
return card;
+3 -2
View File
@@ -804,7 +804,6 @@ const PaneManager = {
try {
const dragData = JSON.parse(raw);
if (dragData.paneId == null || dragData.tabId == null) return;
if (dragData.paneId === paneId) return; // Same pane, tab handler deals with it
// Recalculate edge zone from drop coordinates
const rect = container.getBoundingClientRect();
@@ -824,9 +823,11 @@ const PaneManager = {
const newPaneId = this.panes.length - 1;
this.transferTab(dragData.paneId, dragData.tabId, newPaneId);
}, 200);
} else {
} else if (dragData.paneId !== paneId) {
// Cross-pane transfer (already in split mode, different panes)
this.transferTab(dragData.paneId, dragData.tabId, paneId);
}
// else: same pane, not edge — tab handler deals with reorder
} catch (e2) { console.debug('PaneManager drop error:', e2); }
});
},