still returns the full record, not null. The delete had no effect, no error was thrown.For comparison, the following works immediately and reliably every time:
js// 1. Insert nested under any existing recordconst F3 = Takeoffs.insert({ kind: "folder", parentId: someExistingRecordId, properties: { name: { value: "test-nested-then-promoted" } }});// 2. Promote it to root via updateTakeoffs.update(F3._id, { parentId: null });saveAll();// 3. Delete it — this succeeds immediately, no waiting neededTakeoffs.delete([F3._id]);saveAll();// A later, separate Takeoffs.get(F3._id) correctly returns null.Evidence from a controlled test (2026-09-28, project "cégep St-H", workspace STIC)All timestamps UTC.Time (UTC)ActionRecordResult20:06:56.324Takeoffs.insert({parentId: null, ...})F1 = PCMhKyEQERzkoT33Gcreated20:06:56.324Takeoffs.insert({parentId: When a takeoff or template record is inserted directly at the project root (parentId: null) via Takeoffs.insert() or Templates.insert(), the resulting record is left in an unstable state. Observed symptoms include: delayed or incorrect display in the UI (invisible for 10+ minutes, or visible with a blank name), and — confirmed today in a controlled, timestamped test — the record cannot be deleted by script: Takeoffs.delete() silently fails, with no error and no removal. In one earlier case, a root-level folder disappeared from the server entirely after 20–30 minutes, orphaning the children that had been created under it. By contrast, a record that is inserted nested under any existing parent and then promoted to the root via Takeoffs.update(id, {parentId: null}) behaves completely normally, immediately — it can be renamed, moved, or deleted with no issue and no delay. This strongly suggests the bug is tied to the specific code path used to set parentId: null (a direct insert vs. an update on an existing record), not to root-level records in general. js For comparison, the following works immediately and reliably every time: js All timestamps UTC. Time (UTC)ActionRecordResult20:06:56.324Takeoffs.insert({parentId: null, ...})F1 = PCMhKyEQERzkoT33Gcreated20:06:56.324Takeoffs.insert({parentId: <existing>, ...}) then Takeoffs.update(id, {parentId:null})F3 = er8zPnRXoZC7Fnq7ccreated, then promoted to root20:07:04.411Takeoffs.get() on bothF1, F3both exist, correct data20:07:12.972Takeoffs.delete([F1]) + saveAll()F1attempted20:07:18.357Takeoffs.get(F1) (separate call)F1still exists — delete failed silently20:07:47.178Takeoffs.get(F1) (separate call, ~51s after creation)F1still exists — not a delayed delete, a failed one20:07:48.391Takeoffs.delete([F3]) + saveAll()F3attempted20:07:51.856Takeoffs.get(F3) (separate call)F3deleted successfully (null) A second, independent record (H, id CPsDp8shM6mjK9pMa) was also inserted directly at root and also resisted a direct Takeoffs.delete() call. It was then repaired, with no data loss, by: This "relocate, then re-promote" sequence has now fixed a stuck root record twice. We also have an older, real-world example from a separate incident on this account: an orphaned item (id rSvLyePwf6Hy2FWmK) whose parentId (kifZdvMKyWA93Ximv) resolves to a record that no longer exists — consistent with symptom #3 above having occurred previously. For any already-existing root-level record showing the bug (invisible, blank name, or won't delete): relocate it under a real existing parent via update, verify, then either delete it there or promote it back to root via update — both operations are reliable once the record has had a real (non-null) parent at any point, even momentarily. Hope its not to much details and it help.Bug report: root-level records (parentId: null) are unstable when inserted directly
Summary
Environment
Symptoms observed
How to reproduce
// 1. Insert a folder directly at the project root
const F1 = Takeoffs.insert({
kind: "folder",
parentId: null,
properties: { name: { value: "test-direct-root" } }
});
saveAll();
// 2. Try to delete it (immediately, or after waiting several minutes — same result)
Takeoffs.delete([F1._id]);
saveAll();
// 3. In a SEPARATE call, verify:
Takeoffs.get(F1._id);
// -> still returns the full record, not null. The delete had no effect, no error was thrown.
// 1. Insert nested under any existing record
const F3 = Takeoffs.insert({
kind: "folder",
parentId: someExistingRecordId,
properties: { name: { value: "test-nested-then-promoted" } }
});
// 2. Promote it to root via update
Takeoffs.update(F3._id, { parentId: null });
saveAll();
// 3. Delete it — this succeeds immediately, no waiting needed
Takeoffs.delete([F3._id]);
saveAll();
// A later, separate Takeoffs.get(F3._id) correctly returns null.
Evidence from a controlled test (2026-09-28, project "cégep St-H", workspace STIC)
Workaround (validated, currently in use on our end)
Impact