oh-my-adhd 0.2.22 → 0.2.24
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.
|
@@ -122,8 +122,11 @@ export function registerWikiImport(server) {
|
|
|
122
122
|
await fs.rename(tmp, threadFile);
|
|
123
123
|
}
|
|
124
124
|
// Project only allowed ThreadMeta fields — no arbitrary spread
|
|
125
|
-
const meta = {
|
|
126
|
-
|
|
125
|
+
const meta = {
|
|
126
|
+
id,
|
|
127
|
+
title,
|
|
128
|
+
updatedAt: typeof thread.updatedAt === "string" ? thread.updatedAt : new Date().toISOString(),
|
|
129
|
+
};
|
|
127
130
|
if (typeof thread.is_open === "boolean")
|
|
128
131
|
meta.is_open = thread.is_open;
|
|
129
132
|
if (typeof thread.is_done === "boolean")
|
|
@@ -144,7 +147,8 @@ export function registerWikiImport(server) {
|
|
|
144
147
|
existingIds.add(id); // prevent duplicate IDs within same import
|
|
145
148
|
importedThreads++;
|
|
146
149
|
}
|
|
147
|
-
//
|
|
150
|
+
// Sort by updatedAt desc — matches saveCapture/updateManifestEntry behavior
|
|
151
|
+
manifest.sort((a, b) => new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime());
|
|
148
152
|
const tmp = manifestFile + ".tmp";
|
|
149
153
|
await fs.writeFile(tmp, JSON.stringify(manifest, null, 2), "utf-8");
|
|
150
154
|
await fs.rename(tmp, manifestFile);
|
package/package.json
CHANGED