sticky-note-cli 3.1.35 → 3.1.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sticky-note-cli",
3
- "version": "3.1.35",
3
+ "version": "3.1.36",
4
4
  "description": "Human-to-human handoff for AI coding assistants. Git-backed shared memory for Claude Code and Copilot CLI.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -1012,7 +1012,14 @@ async function main() {
1012
1012
  const memory = loadJson(memoryPath, { version: "2", project: "", threads: [] });
1013
1013
  if (cloud) {
1014
1014
  const cloudThreads = await cloudReadThreads();
1015
- if (cloudThreads) memory.threads = cloudThreads;
1015
+ if (cloudThreads) {
1016
+ // Merge: use cloud as the source of truth for shared threads, but preserve
1017
+ // any local-only threads (e.g. the "open" thread session-start just created
1018
+ // and saved locally but didn't push to cloud yet).
1019
+ const cloudIds = new Set(cloudThreads.map((t) => t && t.id).filter(Boolean));
1020
+ const localOnly = (memory.threads || []).filter((t) => t && !cloudIds.has(t.id));
1021
+ memory.threads = [...cloudThreads, ...localOnly];
1022
+ }
1016
1023
  }
1017
1024
  const config = loadJson(getConfigPath(), { stale_days: 14 });
1018
1025
  const staleDays = config.stale_days || 14;