fix(dashboard): hoist claude_argv to Bottle ABC so smolmachines pane attach works #81
Reference in New Issue
Block a user
Delete Branch "dashboard-smolmachines-claude-argv"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Launching a smolmachines agent from the dashboard inside tmux crashed with
The tmux pane-respawn path called
bottle.claude_docker_argv(...)directly — a method that only existed onDockerBottle. The foreground-handoff path doesn't hit it because it goes throughbottle.exec_claude(which is on the ABC).Changes
BottleABC gainsclaude_argv(argv, *, tty=True) -> list[str]. Both backends implement it; bothexec_claudeimpls collapse tosubprocess.run(self.claude_argv(argv, tty=tty), check=False).DockerBottle: renameclaude_docker_argv→claude_argv, body unchanged.SmolmachinesBottle: extract the argv-building fromexec_claudeintoclaude_argv; the new method returns the fullsmolvm machine exec --name … -- runuser -u node -- claude …argv. Therunuserswitch lives on the exec-framing prefix so the dashboard's_build_resume_argv_with_fallbacksplit-at-claudetrick keeps the UID switch when wrapping the claude tail insh -c "… --continue || …".docker_argv→claude_argv; docstrings on_build_resume_argv_with_fallback,_build_split_pane_argv,_build_respawn_pane_argvnow say "backend-exec argv". The shell-fallback wrap logic is unchanged.Tests
tests/unit/test_smolmachines_bottle.py(new): locks down the smolmachines argv shape — prompt-file flag injection, guest-env-e K=Vforwarding, TTY toggle,runuserprecedesclaudeinvariant.test_docker_bottle.py:TestClaudeDockerArgv→TestClaudeArgv; method renames follow.test_dashboard_active_agents.py: docstring follow.615 unit tests pass.
Stacking
Independent — branches off main directly. Touches the Bottle ABC and the two backends' bottle implementations plus the dashboard's tmux path.