Repository navigation
fix(hub): keep the coder's scratch folder out of the app - #150
Conversation
A coder saved its browser screenshots under .scratch/, which nothing ignored, so the app bundle carried them past the size limit and the preview and the filing failed. The bundle skips .scratch the way it skips installs and builds, the starter ignores it, and the coder is told it is the place for throwaway files.
|
Triage: In progress Triage is waiting for code review before it decides. This comment shows the verdict once it has. |
| "dist", | ||
| ".git", | ||
| ".builder", | ||
| ".scratch", |
There was a problem hiding this comment.
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.
Closes #149
What
The coder's
.scratch/folder is never part of the app: the bundle skips it, the starter ignores it, and the coder is told it is the place for throwaway files.Why
A coder saved its browser screenshots under
.scratch/shots/(about 420 KB of PNGs). Nothing ignored the folder, so the app bundle carried them, passed the 1 MiB limit on a 450 KB app, and the preview showedapp_too_largewhile a check could not file the app. Details in #149.Changes
apps/hub/src/builds/app-snapshot.ts:.scratchjoins the directories the bundle never reads; the test covers it.workflows/coder/starter/.gitignore:.scratch/.workflows/coder/starter/AGENTS.md: names.scratch/for throwaway files such as screenshots.