Files
wekan/server/lib/scrumHistoryPending.js
T
Lauri Ojansivu 6b44f61b2a Bind keyed Scrum undo and redo to their original selection
Accept optional caller-persisted request IDs in the History methods. Store immutable selections before mutation and reconcile completed requests without advancing the stack again. Keep empty and unsupported results stable; require fresh access and retain conflicting or missing recovery evidence.

Verify selection races, lost cleanup, concurrent redo, browser reload and private storage with Node, MongoDB, full-app and Chromium coverage. Keyboard request persistence, non-Scrum replay and shared writer coordination remain unfinished.

Thanks to xet7 !
2026-09-28 23:43:32 +03:00

19 lines
1.1 KiB
JavaScript

import { Mongo } from 'meteor/mongo';
import { Meteor } from 'meteor/meteor';
import { ensureIndex } from './mongoStartup';
// A private recovery checkpoint, never a second audit log or a publication.
// _id is the board ID, so separate server processes cannot start two restores.
const ScrumHistoryPending = new Mongo.Collection('scrumHistoryPending');
ScrumHistoryPending.deny({ insert: () => true, update: () => true, remove: () => true });
// No TTL: removing a checkpoint must not remove its completion evidence.
export const ScrumHistoryCompletions = new Mongo.Collection('scrumHistoryCompletions');
ScrumHistoryCompletions.deny({ insert: () => true, update: () => true, remove: () => true });
export const ScrumHistoryRequests = new Mongo.Collection('scrumHistoryRequests');
ScrumHistoryRequests.deny({ insert: () => true, update: () => true, remove: () => true });
Meteor.startup(async () => {
await ensureIndex(ScrumHistoryCompletions, { boardId: 1, rowId: 1 });
await ensureIndex(ScrumHistoryRequests, { boardId: 1, userId: 1 });
});
export default ScrumHistoryPending;