Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/hub/src/builds/app-snapshot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
5 changes: 3 additions & 2 deletions apps/hub/src/builds/app-snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> = new Set([
"node_modules",
"dist",
".git",
".builder",
".scratch",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 · App repository sync still picks up .scratch, so screenshots get pushed for workspaces without the new .gitignore

The bundle now skips .scratch. The git sync in builds/app-repository.ts has its own EXCLUDED_DIRECTORIES list (node_modules, dist, .git, .builder, inputs), and this change does not add .scratch to it. That sync only leaves .scratch out when the workspace's .gitignore lists it. Only the starter's .gitignore was updated, so existing workspaces will still commit and push the screenshots to the app repository, which has a 25 MiB limit and carries them into later checkouts.

A coder in a project created before this change saves screenshots under .scratch/; the workspace walk commits and pushes them to the app repository.

Resolve this comment. Triage will not finish while it is open.

INPUTS_DIRECTORY,
]);
// Secrets (environment files, keys, registry credentials) and local databases never leave the
Expand Down
1 change: 1 addition & 0 deletions workflows/coder/starter/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
dist/
.scratch/
server/data/
.env
.env.*
Expand Down
2 changes: 1 addition & 1 deletion workflows/coder/starter/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down