feat(docker): support project-specific Dockerfiles#63
feat(docker): support project-specific Dockerfiles#63ASRagab wants to merge 13 commits intojohannesjo:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-class support for project-specific Dockerfiles by detecting .parallel-code/Dockerfile, building with an explicit project build context, and persisting an explicit Docker source (default | project | custom) so the UI no longer infers state from image-tag prefixes.
Changes:
- Introduces
DockerSourcemetadata on tasks and persistence migration to infer it for legacy tasks. - Adds project Dockerfile resolution + deterministic project image tagging and updates Docker image existence/build flows to accept custom Dockerfile/build-context inputs.
- Prevents Electron Vite dev server from reloading when repo-local
.worktrees/**changes.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/store/types.ts | Persists dockerSource on Task and PersistedTask. |
| src/store/tasks.ts | Threads dockerSource through task creation options into stored task state. |
| src/store/persistence.ts | Saves/loads dockerSource and infers it for legacy persisted tasks. |
| src/lib/docker.ts | Adds shared Docker constants + docker source inference and UI label helpers. |
| src/lib/docker.test.ts | Adds label tests for docker display helpers. |
| src/components/TaskTitleBar.tsx | Shows Docker badge label derived from dockerSource and adds image title tooltip. |
| src/components/TaskAITerminal.tsx | Refactors InfoBar status logic and updates Docker overlay label from dockerSource. |
| src/components/SettingsDialog.tsx | Uses shared default image constant and documents project Dockerfile behavior. |
| src/components/NewTaskDialog.tsx | Detects project Dockerfile via IPC, adjusts image checks/build args, and persists docker source/image appropriately. |
| eslint.config.js | Ignores Electron Vite config test file for linting. |
| electron/vite.config.electron.ts | Ignores **/.worktrees/** in dev watch to avoid renderer reloads during task creation. |
| electron/vite.config.electron.test.ts | Tests that Vite watch ignores nested .worktrees directories. |
| electron/tsconfig.json | Excludes Electron Vite config + its test from Electron TS config compilation. |
| electron/preload.cjs | Allows new resolve_project_dockerfile IPC channel. |
| electron/ipc/register.ts | Adds IPC handlers/arg validation for resolving project Dockerfiles and for docker image checks/builds with optional inputs. |
| electron/ipc/pty.ts | Adds project dockerfile resolution + hashing/tagging; extends docker image checks/builds; updates container HOME to /tmp. |
| electron/ipc/pty.test.ts | Adds/extends tests for docker HOME behavior and new dockerfile/hash/build context helpers. |
| electron/ipc/channels.ts | Defines ResolveProjectDockerfile IPC channel. |
| .prettierignore | Ignores additional repo-local files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/components/NewTaskDialog.tsx
Outdated
| /> | ||
| </div> | ||
| > | ||
| <span>📁</span> |
There was a problem hiding this comment.
The folder emoji is rendered as a literal character. For better accessibility/screen-reader behavior, consider using a real icon component or marking the emoji aria-hidden and providing an accessible text label.
| <span>📁</span> | |
| <span aria-hidden="true">📁</span> |
Merge upstream/main, resolve conflict in NewTaskDialog.tsx, and address Copilot review feedback: cross-platform path splitting, file-type check in resolveProjectDockerfile, inferDockerSource test coverage, and aria-hidden on emoji span. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Resolved the merge conflict with upstream/main and addressed all review comments:
|
|
Thank you very much! <3 |
|
Reviewed the diff including the follow-up addressing all 4 Copilot comments (cross-platform path split, One new issue worth flagging: One-way Docker ratchet in createEffect(() => {
if (skipPermissions() && store.dockerAvailable) {
setDockerMode(true);
}
});This auto-enables Docker when "skip permissions" is checked, but has no inverse — unchecking skip-permissions leaves Docker mode on. The user would have to manually uncheck Docker mode. If this is intentional (i.e. skip-permissions always implies Docker), a comment would clarify the intent. If unintentional, the effect should also handle the reverse: createEffect(() => {
if (skipPermissions() && store.dockerAvailable) {
setDockerMode(true);
} else if (!skipPermissions()) {
setDockerMode(false);
}
});(Or drop the effect entirely and rely on the existing "Enable Docker" suggestion UI that was already shown when skip-permissions was active.) Everything else looks good — the |
johannesjo
left a comment
There was a problem hiding this comment.
All four original Copilot review comments were correctly addressed. One UX issue before merge:
One-way Docker ratchet — in NewTaskDialog, a createEffect auto-enables Docker when 'skip permissions' is checked, but there is no inverse: unchecking 'skip permissions' leaves Docker enabled. This can silently enable Docker mode for users who toggle that checkbox and then change their mind. Consider adding the inverse side-effect, or making the coupling explicit in the UI. Details in the review comment.
The rest of the PR (Dockerfile detection, DockerSource migration, Vite watch fix) is well-implemented.
Summary
.parallel-code/Dockerfiledefault | project | custom) instead of inferring UI state from image-tag prefixes.worktrees/**in Electron Vite dev mode so task creation does not trigger renderer reloadsValidation