feat!: v3.0 architecture rewrite — devcontainer primary config, interactive init, settings.json#142
Merged
jeevanpillay merged 7 commits intomainfrom Feb 16, 2026
Conversation
Add devcontainer.json as a fallback configuration source when no .dual.toml exists, giving Dual zero-config compatibility with repos that already have .devcontainer/ directories. - New src/devcontainer.rs parser for image, build, forwardPorts, containerEnv, postCreateCommand, and mounts fields - load_hints() fallback chain: .dual.toml → devcontainer.json → defaults - DockerfileBuild struct and docker build support in container creation - 30 new unit tests covering all format variants Resolves: DUAL-61 Entire-Checkpoint: 83e76ce9f6e4
Entire-Checkpoint: 83e76ce9f6e4
When splitting a pane or creating a new window in a Dual tmux session, the new shell now auto-loads command interception. Previously, new panes ran commands on the host instead of the container. Two mechanisms work together: - tmux set-environment sets DUAL_ACTIVE, DUAL_RC_PATH, DUAL_CONTAINER at the session level so new panes inherit them - dual add installs a guarded snippet in ~/.zshrc or ~/.bashrc that sources the RC file when DUAL_ACTIVE is set Entire-Checkpoint: 83e76ce9f6e4
…tings BREAKING CHANGE: Fields `image`, `ports`, `setup`, and `[env]` are removed from `.dual.toml`. Container configuration now belongs in `devcontainer.json`, while `.dual.toml` contains only Dual-specific orchestration fields (extra_commands, anonymous_volumes, shared). - Add DualConfig struct for .dual.toml (orchestration-only fields) - Rewrite load_hints() to merge DualConfig + devcontainer.json → RepoHints - Add write_default_dual_config() and write_default_devcontainer() - Add migration warning for deprecated fields in .dual.toml - Update cmd_add() to create both .dual.toml and devcontainer.json - Update user-facing messages to reference devcontainer.json for ports - Update test fixtures and README documentation Entire-Checkpoint: 83e76ce9f6e4
Shell hook is now installed on any dual invocation (idempotent), not tied to dual add. This matches the user expectation that the hook is set up at install time, not per-repo registration. Entire-Checkpoint: 83e76ce9f6e4
… `.dual/settings.json` DUAL-62: Rename the `add` subcommand to `init` across CLI, dispatch, user-facing messages, TUI empty state, and README. DUAL-63: Replace TOML config at `.dual.toml` with JSON config at `.dual/settings.json`. Remove SharedConfig struct and flatten `shared` to Vec<String>. Make `devcontainer` a required String field. Add MissingConfig error variant. Rewrite load/write/parse functions and all config tests for JSON. BREAKING CHANGE: `dual add` is now `dual init`. Config file moved from `.dual.toml` (TOML) to `.dual/settings.json` (JSON) with a new schema. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: bf199bdb28ce
Replace hardcoded defaults in `dual init` with a 5-step interactive wizard (image selection, ports, setup command, summary/confirm). Add --yes/-y flag for non-interactive mode. Move file-writing logic from config.rs into new init module. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: cc13ef3e9119
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
devcontainer.json as primary config source (DUAL-61)
src/devcontainer.rsparser handling all spec-allowed format variants (string/array/object commands, integer/string ports, string/object mounts)build_image()forbuild.dockerfileconfigsShell interception pane propagation
set-environmentpropagatesDUAL_ACTIVE,DUAL_RC_PATH,DUAL_CONTAINERto new panes/windows~/.zshrcor~/.bashrcon first runRename
dual addtodual init(DUAL-62)AddCLI variant renamed toInitwith updated help text.dual/settings.jsonconfig system (DUAL-63, DUAL-65).dual.tomlwith.dual/settings.json(JSON format)devcontainer.json(container config) +.dual/settings.json(orchestration config)load_hints()merge pipeline: DualConfig + DevcontainerJson → RepoHintsInteractive init wizard (DUAL-64)
src/init.rsmodule withdialoguercrate for styled terminal prompts--yes/-yflag for non-interactive mode (CI/scripting)write_default_dual_config()andwrite_default_devcontainer()from config.rsAll consumers and tests updated (DUAL-66, DUAL-68)
.dual.tomlordual addreferences remain in source code.dual/settings.json+devcontainer.jsonMigration path (DUAL-67)
Test plan
cargo test— 191 tests passcargo clippy— cleancargo fmt --check— clean.dual.tomlreferences in source code--yesflag applies defaults without promptsResolves DUAL-61, DUAL-62, DUAL-63, DUAL-64, DUAL-65, DUAL-66, DUAL-67, DUAL-68