Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: revert optimistic deck version on failed save; scope pdf-lib ignore to 2.11.0

[._.]/ Adam Eivy96f287b51193
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 523323f9c6..58b5e4b67f 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -18,8 +18,11 @@ updates:
ignore:
# 2.11.0's ESM build throws ERR_IMPORT_ATTRIBUTE_MISSING under Node — see
# #7371 and https://github.com/cantoo-scribe/pdf-lib/issues/155. Remove
- # once a release fixes the JSON import-attribute regression.
+ # once a release fixes the JSON import-attribute regression. Scoped to
+ # 2.11.0 only so the fixing release (and later security patches) are
+ # still proposed.
- dependency-name: "@cantoo/pdf-lib"
+ versions: ["2.11.0"]
- package-ecosystem: npm
directory: /client
schedule:
diff --git a/client/src/pages/DeckDetail.jsx b/client/src/pages/DeckDetail.jsx
index 5ce89f2d20..98be40ceab 100644
--- a/client/src/pages/DeckDetail.jsx
+++ b/client/src/pages/DeckDetail.jsx
@@ -193,6 +193,7 @@ function DeckEditor({ id }) {
};
const handleSetActiveVersion = async (cardId, filename) => {
+ const prev = deck?.cards?.find((c) => c.id === cardId)?.primaryImageRef;
patchLocalCard(cardId, { primaryImageRef: filename });
const card = await updateDeckCard(id, cardId, { primaryImageRef: filename }, { silent: true }).catch((err) => {
toast.error(`Card save failed: ${err.message}`);
@@ -202,6 +203,10 @@ function DeckEditor({ id }) {
if (card) {
patchLocalCard(cardId, card);
toast.success('Active version updated');
+ } else if (prev !== undefined) {
+ // The save failed: roll back the optimistic patch so the grid never
+ // displays a version the server doesn't have as active.
+ patchLocalCard(cardId, { primaryImageRef: prev });
}
};