Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions .github/workflows/maintenance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ jobs:
npm run test:desktop-cli
npm run test:card-ordering
npm run test:list-actions
npm run test:editor-paths
npm run test:board-refresh
npm run test:board-card-metadata
- name: Prepare isolated Electron desktop
run: |
sudo apt-get update
sudo apt-get install --yes xvfb openbox libnss3 libasound2t64 libgbm1
sudo apt-get -o Acquire::Retries=1 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 update
sudo apt-get -o Acquire::Retries=1 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 install --yes --no-install-recommends xvfb openbox libnss3 libasound2t64 libgbm1
sudo chown root:root node_modules/electron/dist/chrome-sandbox
sudo chmod 4755 node_modules/electron/dist/chrome-sandbox
- name: Electron regressions
Expand Down Expand Up @@ -73,7 +75,7 @@ jobs:
windows:
if: ${{ !inputs.source_ref }}
runs-on: windows-latest
timeout-minutes: 20
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
Expand All @@ -86,8 +88,21 @@ jobs:
run: npm run test:cli
- name: List rename rollback regressions
run: npm run test:list-actions
- name: Native Windows protocol, list actions and filtered drag regressions
- name: Editor path regressions
run: npm run test:editor-paths
- name: Board refresh regressions
run: npm run test:board-refresh
- name: Full native Windows Electron regressions
env:
# Explicit opt-in applies only to this disposable hosted Windows desktop.
SIGNBOARD_PLAYWRIGHT_ALLOW_LOCAL: '1'
run: npx playwright test --grep 'card links|drags filtered cards|date-filtered card drops|list rename|moves lists left and right|adds a new list to the right'
run: npx playwright test
- name: Windows storage, automation and integration regressions
if: ${{ !cancelled() }}
shell: bash
run: |
failed=0
for suite in maintenance mcp automation-parity desktop-cli card-ordering board-snapshot board-duplication archive obsidian-integration import-trello import-obsidian import-tasksmd app-settings update-release-notes update-errors packaging-config; do
npm run "test:$suite" || failed=1
done
exit "$failed"
20 changes: 20 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,23 @@ CLI/MCP parity uses `lib/automation.js` for validated board relocation/duplicati
## List rename failure recovery

List insertion and Move list left/right must use the main-process `reorderLists` transaction, like drag-and-drop. Never stage list renames in the renderer or reconcile card metadata against temporary names. `lib/listOrderRecovery.js` retries transient rename failures and records original/temporary/final names in an exclusively created, fsynced `.signboard-list-order.json` before staging. Successful commit or rollback removes it; incomplete recovery retains it and blocks further reorders. Do not overwrite this record or guess names for legacy `__sbtmp-*` directories. Failed insertion positioning retains the newly created list; the UI refreshes and reports the failure without a success announcement or duplicate submission. Keep `test:list-actions`, the Electron list-action regressions, and deferred external refresh aligned.

## Windows editor paths — 1.7.7

Card snapshots and move results retain native filesystem paths. Normalize separators when deriving the editor list for comparison with renderer board roots; preserve the native path used for IPC/saving. Linked-note picker parents must retain UNC double slashes and the slash on drive roots. Keep `npm run test:editor-paths`, editor move Electron regressions, and the Windows maintenance workflow aligned.

External board refresh must wait while a Table bulk menu is open so draft dates and label choices survive. Keep the forced-refresh bulk-date Electron regression in both Linux and Windows CI.

Card drag/drop increments `window.cardOrderInProgress` through the transaction and watch acknowledgement, with `finally` cleanup for overlapping or failed drops. External sync defers token sampling during that interval (including a drop that starts during token IPC), while previously pending refreshes and later external edits remain deliverable. Keep `test:board-refresh` and the no-redraw/external-edit Electron regressions aligned.

Windows maintenance CI runs the full Electron suite plus storage, archive, board duplication, import, Obsidian, CLI/MCP, and updater helper regressions on a disposable native Windows runner. Keep coverage aligned with Linux instead of restricting Windows to selected test titles.

The renderer filename sanitizer also creates list folders. Sanitize the entire input before separating an extension so punctuation after a period cannot create Windows-invalid paths. `test:list-actions` loads the real sanitizer; the Electron suite covers dotted list names.

`lib/directoryRename.js` allows case-only renames only when filesystem entry identities match; keep unrelated-destination rejection and metadata rollback intact. CLI list renames share that check. Planner filter menus constrain their height on open, content changes, and resize, with scrolling for all labels and Clear filters. Maintenance/Electron regressions cover both behaviors.

Linux CI installs only the required Xvfb/Openbox dependencies, with bounded network retries and timeouts.

Editor archive actions share one pending promise through final modal cleanup. Other modal transitions wait for it; archive cleanup bypasses its own wait. Preserve failure cleanup, duplicate-request handling, and the delayed-archive Electron regression.

App settings save responses reconcile against the submitted snapshot: preserve newer renderer edits while accepting server-generated values for unchanged fields. Keep the deferred-save regression in `test:app-settings` and Smart Actions Electron coverage aligned.
20 changes: 20 additions & 0 deletions CODEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,23 @@ CLI/MCP parity uses `lib/automation.js` for validated board relocation/duplicati
## List rename failure recovery

List insertion and Move list left/right must use the main-process `reorderLists` transaction, like drag-and-drop. Never stage list renames in the renderer or reconcile card metadata against temporary names. `lib/listOrderRecovery.js` retries transient rename failures and records original/temporary/final names in an exclusively created, fsynced `.signboard-list-order.json` before staging. Successful commit or rollback removes it; incomplete recovery retains it and blocks further reorders. Do not overwrite this record or guess names for legacy `__sbtmp-*` directories. Failed insertion positioning retains the newly created list; the UI refreshes and reports the failure without a success announcement or duplicate submission. Keep `test:list-actions`, the Electron list-action regressions, and deferred external refresh aligned.

## Windows editor paths — 1.7.7

Card snapshots and move results retain native filesystem paths. Normalize separators when deriving the editor list for comparison with renderer board roots; preserve the native path used for IPC/saving. Linked-note picker parents must retain UNC double slashes and the slash on drive roots. Keep `npm run test:editor-paths`, editor move Electron regressions, and the Windows maintenance workflow aligned.

External board refresh must wait while a Table bulk menu is open so draft dates and label choices survive. Keep the forced-refresh bulk-date Electron regression in both Linux and Windows CI.

Card drag/drop increments `window.cardOrderInProgress` through the transaction and watch acknowledgement, with `finally` cleanup for overlapping or failed drops. External sync defers token sampling during that interval (including a drop that starts during token IPC), while previously pending refreshes and later external edits remain deliverable. Keep `test:board-refresh` and the no-redraw/external-edit Electron regressions aligned.

Windows maintenance CI runs the full Electron suite plus storage, archive, board duplication, import, Obsidian, CLI/MCP, and updater helper regressions on a disposable native Windows runner. Keep coverage aligned with Linux instead of restricting Windows to selected test titles.

The renderer filename sanitizer also creates list folders. Sanitize the entire input before separating an extension so punctuation after a period cannot create Windows-invalid paths. `test:list-actions` loads the real sanitizer; the Electron suite covers dotted list names.

`lib/directoryRename.js` allows case-only renames only when filesystem entry identities match; keep unrelated-destination rejection and metadata rollback intact. CLI list renames share that check. Planner filter menus constrain their height on open, content changes, and resize, with scrolling for all labels and Clear filters. Maintenance/Electron regressions cover both behaviors.

Linux CI installs only the required Xvfb/Openbox dependencies, with bounded network retries and timeouts.

Editor archive actions share one pending promise through final modal cleanup. Other modal transitions wait for it; archive cleanup bypasses its own wait. Preserve failure cleanup, duplicate-request handling, and the delayed-archive Electron regression.

App settings save responses reconcile against the submitted snapshot: preserve newer renderer edits while accepting server-generated values for unchanged fields. Keep the deferred-save regression in `test:app-settings` and Smart Actions Electron coverage aligned.
44 changes: 31 additions & 13 deletions app/appSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,30 @@ function scheduleAppSettingsSave() {
}, 250);
}

function getEditableAppSettingsSnapshot() {
return {
notifications: getAppNotificationSettings(),
tooltipsEnabled: getAppTooltipsEnabled(),
quickAdd: getAppQuickAddSettings(),
appearance: getAppAppearanceSettings(),
externalPublishedCalendar: getAppExternalPublishedCalendarSettings(),
ai: getAppAiSettings(),
};
}

function preservePendingAppSettingChanges(requested, current, saved) {
if (JSON.stringify(current) === JSON.stringify(requested)) return saved;
if (current && requested && saved && typeof current === 'object' &&
typeof requested === 'object' && typeof saved === 'object' && !Array.isArray(current)) {
const merged = { ...saved };
for (const key of Object.keys(current)) {
merged[key] = preservePendingAppSettingChanges(requested[key], current[key], saved[key]);
}
return merged;
}
return current;
}

function persistAppSettings() {
const state = getAppSettingsState();

Expand All @@ -1194,19 +1218,13 @@ function persistAppSettings() {
return;
}

const requestedAppearance = getAppAppearanceSettings();
const result = await window.electronAPI.updateAppSettings({
notifications: getAppNotificationSettings(),
tooltipsEnabled: getAppTooltipsEnabled(),
quickAdd: getAppQuickAddSettings(),
appearance: getAppAppearanceSettings(),
externalPublishedCalendar: getAppExternalPublishedCalendarSettings(),
ai: getAppAiSettings(),
});
// A quick second mode selection must survive an older save response.
const currentAppearance = getAppAppearanceSettings();
if (JSON.stringify(currentAppearance) !== JSON.stringify(requestedAppearance)) {
result.appearance = currentAppearance;
const requested = getEditableAppSettingsSnapshot();
const result = await window.electronAPI.updateAppSettings(requested);
const current = getEditableAppSettingsSnapshot();
// Preserve edits made during IPC without losing server-generated values,
// such as the published-calendar token, in fields the user did not edit.
for (const key of Object.keys(requested)) {
result[key] = preservePendingAppSettingChanges(requested[key], current[key], result[key]);
}
applyAppSettings(result);
renderAppSettingsControls();
Expand Down
10 changes: 10 additions & 0 deletions app/board/plannerView.js
Original file line number Diff line number Diff line change
Expand Up @@ -1866,6 +1866,14 @@ function renderPlannerFilterPopover() {
clearPlannerFilters();
});
popover.appendChild(clearButton);
constrainPlannerFilterPopover();
}

function constrainPlannerFilterPopover() {
const popover = document.getElementById('plannerFilterPopover');
if (!popover || popover.classList.contains('hidden')) return;
const availableHeight = Math.max(0, window.innerHeight - popover.getBoundingClientRect().top - 8);
popover.style.maxHeight = `${Math.floor(availableHeight)}px`;
}

function closePlannerFilterPopover() {
Expand Down Expand Up @@ -1989,6 +1997,7 @@ function togglePlannerFilterPopover() {
popover.classList.toggle('hidden', !isHidden);
popover.setAttribute('aria-hidden', isHidden ? 'false' : 'true');
if (isHidden) {
constrainPlannerFilterPopover();
focusPlannerFilterControl(0);
}
}
Expand Down Expand Up @@ -2177,6 +2186,7 @@ function initializePlannerControls() {
return;
}

window.addEventListener('resize', constrainPlannerFilterPopover);
const closeButton = document.getElementById('plannerCloseButton');
const filterButton = document.getElementById('plannerFilterButton');
const filterPopover = document.getElementById('plannerFilterPopover');
Expand Down
12 changes: 12 additions & 0 deletions app/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,11 @@ function isBoardDragInProgress() {
function isExternalBoardRefreshBlocked() {
return isBoardDragInProgress()
|| Boolean(window.listOrderInProgress)
|| Boolean(window.cardOrderInProgress)
|| (typeof isCardDatePopoverOpen === 'function' && isCardDatePopoverOpen())
|| (typeof isCardLabelPopoverOpen === 'function' && isCardLabelPopoverOpen())
|| (typeof isListActionsPopoverOpen === 'function' && isListActionsPopoverOpen())
|| Boolean(document.querySelector('#board.board-view-table .board-table-bulk-menu'))
|| isModalOpen('modalEditCard')
|| isModalOpen('modalBoardSettings')
|| isModalOpen('modalArchiveBrowser')
Expand Down Expand Up @@ -983,11 +985,21 @@ async function externalBoardSyncTick() {
return;
}

// The drop handler updates paths in place and acknowledges its own
// watch events after the transaction. Do not queue a redundant refresh
// from those events while the asynchronous drop is still finishing.
if (window.cardOrderInProgress) {
return;
}

if (externalBoardRefreshPending && !isExternalBoardRefreshBlocked()) {
scheduleExternalBoardRefresh();
}

const latestToken = Number(await window.board.getBoardWatchToken());
if (window.cardOrderInProgress) {
return;
}
if (!Number.isFinite(latestToken) || latestToken <= externalBoardWatchToken) {
return;
}
Expand Down
3 changes: 3 additions & 0 deletions app/lists/createListElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ async function createListElement(name, listPath, cardNames, options = {}) {
.map((card) => card.getAttribute('data-path'))
.filter(Boolean);

window.cardOrderInProgress = (window.cardOrderInProgress || 0) + 1;
try {
if (!window.board || typeof window.board.reorderCardsInList !== 'function') {
throw new Error('Card reorder is unavailable.');
Expand Down Expand Up @@ -129,6 +130,8 @@ async function createListElement(name, listPath, cardNames, options = {}) {
announceSignboardStatus('Card order could not be saved.');
}
await renderBoard();
} finally {
window.cardOrderInProgress -= 1;
}
}
}));
Expand Down
6 changes: 6 additions & 0 deletions app/modals/closeAllModals.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ async function closeAllModals(e, options = {}){
return;
}

// Modal transitions must not overtake an archive's final editor cleanup.
// The archive itself skips this wait to avoid awaiting its own promise.
if (!options.skipEditorArchiveWait && typeof waitForEditorArchiveIfNeeded === 'function') {
await waitForEditorArchiveIfNeeded();
}

if (!options.skipPlannerCardOpenWait && typeof getPlannerState === 'function') {
const pendingOpen = getPlannerState().cardOpenPromise;
if (pendingOpen) await pendingOpen.catch(() => {});
Expand Down
31 changes: 24 additions & 7 deletions app/modals/toggleEditCardModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -780,13 +780,14 @@ async function recreateLinkedObsidianNoteForActiveCard(linkedObject) {

function getLinkedObjectDefaultPickerPath(linkedObject = {}) {
const filePath = String(linkedObject.path || '').replace(/\\/g, '/').trim();
const parts = filePath.split('/').filter(Boolean);
if (parts.length <= 1) {
const lastSlash = filePath.lastIndexOf('/');
if (lastSlash === -1) {
return '';
}

const prefix = filePath.startsWith('/') ? '/' : '';
return `${prefix}${parts.slice(0, -1).join('/')}`;
// Preserve UNC's leading // and keep drive roots absolute (C:/, not C:).
const parentPath = filePath.slice(0, lastSlash);
return /^[A-Za-z]:$/.test(parentPath) ? `${parentPath}/` : parentPath || '/';
}

async function relinkLinkedObsidianNoteForActiveCard(linkedObject) {
Expand Down Expand Up @@ -2765,7 +2766,9 @@ async function handleMetadataSave(value,metaName) {
};

function getCardListPath(cardPath) {
const normalized = String(cardPath || '');
// Snapshots and move results contain native Windows separators, while
// renderer board roots and dropdown values use forward slashes.
const normalized = String(cardPath || '').replace(/\\/g, '/');
const lastSlash = normalized.lastIndexOf('/');
if (lastSlash === -1) {
return '';
Expand Down Expand Up @@ -3091,7 +3094,21 @@ async function handleChangeCardListSelect(e) {
return;
}

async function archiveActiveEditorCard() {
let activeEditorArchivePromise = null;

function waitForEditorArchiveIfNeeded() {
return activeEditorArchivePromise;
}

function archiveActiveEditorCard() {
if (activeEditorArchivePromise) return activeEditorArchivePromise;
activeEditorArchivePromise = performActiveEditorCardArchive().finally(() => {
activeEditorArchivePromise = null;
});
return activeEditorArchivePromise;
}

async function performActiveEditorCardArchive() {
const cardEditorCardPath = document.getElementById('cardEditorCardPath');
const cardPath = cardEditorCardPath ? String(cardEditorCardPath.value || '').trim() : '';
if (!cardPath || !isCardEditorActive()) {
Expand All @@ -3102,7 +3119,7 @@ async function archiveActiveEditorCard() {
await window.board.archiveCard(cardPath);
clearQueuedEditorSave();
cardEditorCardPath.value = '';
await closeAllModals(createCloseAllModalsRequest());
await closeAllModals(createCloseAllModalsRequest(), { skipEditorArchiveWait: true });
if (typeof announceSignboardStatus === 'function') {
announceSignboardStatus('Archived card.');
}
Expand Down
4 changes: 4 additions & 0 deletions app/utilities/santizeFileName.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
async function sanitizeFileName(rawName) {
// Lists also use this helper: a period does not make the remaining text a
// trusted extension. Remove unsafe characters from the whole name first.
rawName = String(rawName || '').replace(/[^\p{L}\p{N}_\-. ]/gu, '');

// 1. Split into base name + extension (if any)
const lastDot = rawName.lastIndexOf('.');
const ext = (lastDot !== -1) ? rawName.slice(lastDot) : '';
Expand Down
12 changes: 6 additions & 6 deletions config/build-info.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"schemaVersion": 1,
"version": "1.7.6",
"buildId": "20261104.2",
"version": "1.7.7",
"buildId": "20261111.4",
"channel": "release",
"builtAt": "2026-11-04T12:02:23.345Z",
"sourceFingerprint": "92f73f741ea7720551c041f188bac949c06a2403f9b22d8e1c60b8a367d08f70",
"sourceFileCount": 175,
"commit": "8ecf66e40e976c000f0fb56b68d12a1af1939634",
"builtAt": "2026-11-11T15:09:58.648Z",
"sourceFingerprint": "b36621c24a6fb0f9bc164088203fd26e85788b45b56635f99c8d75588cf6f5b9",
"sourceFileCount": 177,
"commit": "b971c0a6c2d2876e739d1438815cea929bb8dc8d",
"dirty": true
}
Loading
Loading