mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
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 !
19 lines
1.1 KiB
JavaScript
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;
|