diff --git a/apps/hub/src/builds/app-snapshot.test.ts b/apps/hub/src/builds/app-snapshot.test.ts index e53cc5df..242c6be1 100644 --- a/apps/hub/src/builds/app-snapshot.test.ts +++ b/apps/hub/src/builds/app-snapshot.test.ts @@ -71,6 +71,7 @@ test("the collected app keeps binaries and byte-order marks, honors .gitignore a "server/data.sqlite3": png, "debug.log": "left out", "node_modules/react/index.js": "left out", + ".scratch/shots/new-dialog.png": "left out", "../home/secret.txt": "home\n", }; for (const [path, content] of Object.entries(files)) { diff --git a/apps/hub/src/builds/app-snapshot.ts b/apps/hub/src/builds/app-snapshot.ts index c60cb79e..85ed9693 100644 --- a/apps/hub/src/builds/app-snapshot.ts +++ b/apps/hub/src/builds/app-snapshot.ts @@ -16,13 +16,14 @@ import { WorkflowHttpError, workflowHttpJson } from "../workflows/http-json.ts"; import { INPUTS_DIRECTORY } from "../config/inputs.ts"; import { spliceDesignScreens } from "./starter.ts"; -// Installs and builds are rebuilt by setup and check-app, and .builder and the inputs come from -// filed documents. +// Installs and builds are rebuilt by setup and check-app, .builder and the inputs come from filed +// documents, and .scratch holds the coder's throwaway files, such as the screenshots it takes. export const EXCLUDED_DIRECTORIES: ReadonlySet = new Set([ "node_modules", "dist", ".git", ".builder", + ".scratch", INPUTS_DIRECTORY, ]); // Secrets (environment files, keys, registry credentials) and local databases never leave the diff --git a/workflows/coder/starter/.gitignore b/workflows/coder/starter/.gitignore index 0a9bee15..2d11a0b7 100644 --- a/workflows/coder/starter/.gitignore +++ b/workflows/coder/starter/.gitignore @@ -1,5 +1,6 @@ node_modules/ dist/ +.scratch/ server/data/ .env .env.* diff --git a/workflows/coder/starter/AGENTS.md b/workflows/coder/starter/AGENTS.md index 7177d4bc..3672b7ce 100644 --- a/workflows/coder/starter/AGENTS.md +++ b/workflows/coder/starter/AGENTS.md @@ -45,7 +45,7 @@ Commands, run from the root: It does not try features: confirm each requirement in the running app, against the acceptance checklist and the design. -The app's dev server runs while you build and reloads as files change; `app_status` gives its address and the server log. Use the browser tools on that address to try features the way a person would. +The app's dev server runs while you build and reloads as files change; `app_status` gives its address and the server log. Use the browser tools on that address to try features the way a person would. Keep throwaway files, such as the screenshots you take while trying it, under `.scratch/`; nothing there is part of the app. ## The app's documents