{"version":224,"agent":"onboard","message":"join: on a project with nothing in it yet, say what comes next. The join wrote no files and stopped there; now it adds: The project is empty. Put its files in this folder, then abso push -m \"why\" publishes them. Not for a reader, or when the folder already had files. Tests: client/test/join-empty.test.ts (2).","time":1792052404524,"timeIso":"2026-10-15T08:20:04.524Z","changes":2,"change":3617,"files":["client/src/join-commands.ts","client/test/join-empty.test.ts"],"draft":null,"diff":[{"path":"client/src/join-commands.ts","added":10,"removed":0,"diff":"--- a/client/src/join-commands.ts\n+++ b/client/src/join-commands.ts\n@@ -50,6 +50,15 @@\n \treturn { server: serverFrom(args, env), project, agent: agentFrom(args) };\n }\n \n+/**\n+ * A new project has nothing in it yet: say what comes next, since the join itself wrote nothing. Not for a reader, which\n+ * can't push, or when files were already in the folder (the join's own line names them).\n+ */\n+export function emptyHint(version: number, written: number, kept: number, reader: boolean): string[] {\n+\tif (reader || version !== 0 || written > 0 || kept > 0) return [];\n+\treturn ['The project is empty. Put its files in this folder, then abso push -m \"why\" publishes them.'];\n+}\n+\n export async function runInit(args: Parsed, env: Env): Promise<Output> {\n \tif (args.positionals.length > 1) throw new UsageError(\"init takes one folder\");\n \tconst root = resolve(env.cwd, args.positionals[0] ?? \".\");\n@@ -350,6 +359,7 @@\n \t\t\t\t\t\t`These files were already here and differ from shared, so they were left alone: ${synced.kept.join(\", \")}. abso record sends them as your changes.`,\n \t\t\t\t\t]\n \t\t\t\t: []),\n+\t\t\t...emptyHint(synced.version, synced.written.length, synced.kept.length, reader),\n \t\t\t...setupHint(root),\n \t\t\thookHint(env.env),\n \t\t\t...(root === resolve(env.cwd) ? [] : [`cd ${relative(env.cwd, root) || root}`]),"},{"path":"client/test/join-empty.test.ts","added":18,"removed":0,"diff":"--- /dev/null\n+++ b/client/test/join-empty.test.ts\n@@ -0,0 +1,18 @@\n+// Joining a project that has nothing in it yet: the join writes no files, so it says what comes next.\n+\n+import assert from \"node:assert/strict\";\n+import { test } from \"node:test\";\n+import { emptyHint } from \"../src/join-commands.ts\";\n+\n+test(\"an empty project: the next step is to put files here and push\", () => {\n+\tassert.deepEqual(emptyHint(0, 0, 0, false), [\n+\t\t'The project is empty. Put its files in this folder, then abso push -m \"why\" publishes them.',\n+\t]);\n+});\n+\n+test(\"no hint when there is anything to say instead\", () => {\n+\tassert.deepEqual(emptyHint(3, 0, 0, false), [], \"shared has versions, even with no files left\");\n+\tassert.deepEqual(emptyHint(0, 2, 0, false), [], \"files were written\");\n+\tassert.deepEqual(emptyHint(0, 0, 1, false), [], \"files already in the folder, named by the join's own line\");\n+\tassert.deepEqual(emptyHint(0, 0, 0, true), [], \"a reader can't push\");\n+});"}],"ci":null}