fix: write valid multi-line tmux config in Pi Agent images
The Pi Agent dockerfile templates created ~/.tmux.conf with a literal \n because the RUN command used single-quoted echo. Tmux never parsed the malformed line, so mouse mode stayed off. Without tmux mouse mode, mouse-wheel events in xterm.js fell back to Up/Down arrow keys and cycled shell command history instead of scrolling the terminal buffer. - Use printf '%s\n' to write real newlines in .tmux.conf. - Apply the same fix to the ranger rc.conf where the same bug existed. - Update tool-images/pi-agent.dockerfile and both affected alembic migration dockerfile strings. Quality gates: npm run typecheck, npm run lint, npm test -- --run (87 passed), py_compile on changed migrations. Refs: openspec/changes/fix-tmux-mouse-config
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
dir: tool-images
|
||||
|
||||
## role
|
||||
Provides containerized development environment templates for various IDE, notebook, and AI agent tools used in the Headquarter platform.
|
||||
Provides Docker image templates for various development environment types used in the Headquarter platform.
|
||||
## parent
|
||||
index: ./.pi-map.index.md
|
||||
map: ./.pi-map.md
|
||||
|
||||
@@ -4,16 +4,16 @@ dir: tool-images
|
||||
index: tool-images/.pi-map.index.md
|
||||
|
||||
## role
|
||||
Provides containerized development environment templates for various IDE, notebook, and AI agent tools used in the Headquarter platform.
|
||||
Provides Docker image templates for various development environment types used in the Headquarter platform.
|
||||
## files
|
||||
- README.md | Documents a directory of Dockerfile templates for base tool types used in the Headquarter platform | dep: Docker, git, neovim, ranger, tmux, htop, tree, jq, Node.js 20, Pi Coding Agent
|
||||
- base.dockerfile | Defines a base Docker image for development environments with common CLI tools, Node.js, and a non-root user setup. | dep: ubuntu:24.04, curl, wget, git, neovim, ranger, tmux, htop, tree, jq, ca-certificates, nodejs
|
||||
- code-server.dockerfile | Builds a Docker image for browser-based VS Code with additional development tools and Node.js | dep: linuxserver/code-server, git, neovim, ranger, tmux, htop, tree, jq, Node.js 20
|
||||
- jupyter.dockerfile | Builds a Docker image for Jupyter Notebook/Lab with additional CLI tools and git configuration | dep: jupyter/scipy-notebook, apt, git, neovim, ranger, tmux, htop, tree, jq
|
||||
- opencode.dockerfile | Builds a Docker container for running the OpenCode AI agent as a server | dep: ubuntu:24.04, nodejs, npm, python3, git, opencode
|
||||
- pi-agent.dockerfile | Builds a Docker image for a terminal-based coding environment with the Pi Coding Agent, development tools, and a non-root user setup. | dep: ubuntu:24.04, nodejs, npm, @earendil-works/pi-coding-agent, neovim, ranger, tmux, git, python3, build-essential
|
||||
- pi-agent.dockerfile | Builds a Docker container providing a terminal-based development environment with the Pi coding agent and supporting tools (neovim, tmux, ranger, etc.) | dep: ubuntu:24.04, nodejs, npm, @earendil-works/pi-coding-agent, git, tmux, neovim, ranger, python3, build-essential
|
||||
## arch
|
||||
Multi-stage Dockerfile pattern with shared base image containing common CLI utilities, Node.js, and non-root user security model, specialized per tool type (VS Code server, Jupyter, OpenCode agent, Pi agent).
|
||||
Template-based container architecture with layered Dockerfiles extending a common base image pattern for specialized IDE, notebook, and AI agent environments.
|
||||
## tags
|
||||
git, docker, neovim, ranger, tmux, agent, base, htop
|
||||
## symbols
|
||||
|
||||
@@ -38,11 +38,11 @@ RUN git config --global init.defaultBranch main \
|
||||
&& git config --global user.name "Developer"
|
||||
|
||||
# Create default tmux config
|
||||
RUN echo 'set -g mouse on\nset -g default-terminal "screen-256color"' > /home/user/.tmux.conf
|
||||
RUN printf '%s\n' 'set -g mouse on' 'set -g default-terminal "screen-256color"' > /home/user/.tmux.conf
|
||||
|
||||
# Create default ranger config
|
||||
RUN mkdir -p /home/user/.config/ranger \
|
||||
&& echo 'set preview_files true\nset use_preview_script true' > /home/user/.config/ranger/rc.conf
|
||||
&& printf '%s\n' 'set preview_files true' 'set use_preview_script true' > /home/user/.config/ranger/rc.conf
|
||||
|
||||
# Set up Pi config directory
|
||||
RUN mkdir -p /home/user/.pi/agent
|
||||
|
||||
Reference in New Issue
Block a user