feat(mcp-server): version cards in the shell from the server's History

The shell's VersionsSource (shell/node-versions-source.ts) reads GET
/api/history through the sync and shows one version per distinct content
(a restore's copy folds into the entry it copies; the blank page is none),
numbered as they first appeared, with what changed since the one before.
The entry the server says is on the canvas marks the version; undo and
redo of the newest version restore the one before it, or it again, through
POST /api/restore, so hand edits stay as versions of their own. The cards
sit in a panel beside the canvas (toggle in the header); the strip and
Compare come from the shared canvas components. The sync tells listeners
once per server version, and when History changed without one, so the
list is read again only then.
This commit is contained in:
dayuan.jiang
2026-10-11 20:56:07 +09:00
parent 66c9daf5ca
commit 0de1cdfe7c
12 changed files with 885 additions and 46 deletions
+4 -1
View File
@@ -710,6 +710,9 @@
"restoredFromFile": "The diagram was restored from its saved file. What this tab showed before is in History.",
"aiChanged": "The AI changed the diagram while you were editing. Your last change was saved in History.",
"historyChanged": "History changed on the server. Please open it again.",
"restoreFailed": "Restore failed. Please try again."
"restoreFailed": "Restore failed. Please try again.",
"userEdit": "Changed by hand",
"showVersions": "Show the versions",
"hideVersions": "Hide the versions"
}
}
+4 -1
View File
@@ -710,6 +710,9 @@
"restoredFromFile": "図は保存済みファイルから復元されました。このタブに表示されていた内容は履歴にあります。",
"aiChanged": "編集中に AI が図を変更しました。最後の変更は履歴に保存されました。",
"historyChanged": "サーバー上の履歴が変わりました。もう一度開いてください。",
"restoreFailed": "復元に失敗しました。もう一度お試しください。"
"restoreFailed": "復元に失敗しました。もう一度お試しください。",
"userEdit": "手で変更しました",
"showVersions": "バージョンを表示",
"hideVersions": "バージョンを隠す"
}
}
+4 -1
View File
@@ -710,6 +710,9 @@
"restoredFromFile": "圖表已從儲存的檔案還原。這個分頁之前顯示的內容已放入歷史記錄。",
"aiChanged": "您編輯時 AI 修改了圖表。您的最後一次修改已儲存到歷史記錄。",
"historyChanged": "伺服器上的歷史記錄已變化,請重新開啟。",
"restoreFailed": "還原失敗,請再試一次。"
"restoreFailed": "還原失敗,請再試一次。",
"userEdit": "手動修改",
"showVersions": "顯示版本",
"hideVersions": "隱藏版本"
}
}
+4 -1
View File
@@ -710,6 +710,9 @@
"restoredFromFile": "图表已从保存的文件恢复。这个标签页之前显示的内容已放入历史记录。",
"aiChanged": "您编辑时 AI 修改了图表。您的最后一次修改已保存到历史记录。",
"historyChanged": "服务器上的历史记录已变化,请重新打开。",
"restoreFailed": "恢复失败,请重试。"
"restoreFailed": "恢复失败,请重试。",
"userEdit": "手动修改",
"showVersions": "显示版本",
"hideVersions": "隐藏版本"
}
}