Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
aecf9a4
docs(program): PROGRAM COMPLETE — final report, closing receipts
cvsloane Jul 20, 2026
ae1298e
docs(plan): mobile tmux UX program plan — study synthesis, prior-art …
cvsloane Jul 20, 2026
d34b3c2
docs(program): wave 6 locked decisions + batch-1 briefs (mobile tmux UX)
cvsloane Jul 20, 2026
ff6f90d
feat(mobile): full-bleed terminal (≥40 rows @14px), single configurab…
cvsloane Jul 21, 2026
4abe04a
chore(program): FW6-CANVAS accepted and integrated
cvsloane Jul 21, 2026
0ba1d92
feat(mobile-flow): attach-everywhere nav + cold-open restore, letterb…
cvsloane Jul 21, 2026
b22495e
fix(mobile): letterbox resize-loop guards (idempotence key + scrollba…
cvsloane Jul 21, 2026
a77768a
test(smoke): handle PUT /v1/settings in mock harness (new settings sy…
cvsloane Jul 21, 2026
75cf5d7
test(smoke): scope pane selection to roster treeitem (quick-switch ch…
cvsloane Jul 21, 2026
c181aeb
test(journeys): align mobile choreography with full-bleed (pane-actio…
cvsloane Jul 21, 2026
a83cbc2
chore(program): wave 6 batch 1 gate green — composition defects fixed
cvsloane Jul 21, 2026
9ee7f3a
fix(mobile): reviewer W1-W3 + N2/N4 — letterbox font-sync, rail-heigh…
cvsloane Jul 21, 2026
4ceb395
test(journeys): close actions sheet after mobile take-control before …
cvsloane Jul 21, 2026
133bb1e
docs(program): wave 6 batch-2 briefs; batch-1 review closed
cvsloane Jul 21, 2026
44ecde7
fix(mobile): rail activates on pointerup (captured touch clicks unrel…
cvsloane Jul 21, 2026
3f2ddf5
test(harness): make Next dev-tools overlay pointer-transparent in smo…
cvsloane Jul 21, 2026
c946f02
feat(mobile-precision): scroll-freeze reading, own touch selection + …
cvsloane Jul 21, 2026
bf11ac6
chore(program): FW6-PRECISION accepted and integrated
cvsloane Jul 21, 2026
427c07a
fix(mobile): thread hostId through persistent terminal descriptor (pe…
cvsloane Jul 21, 2026
c7141be
test+docs(verify): batch-1 journey coverage incl. per-host prefix pro…
cvsloane Jul 21, 2026
2559677
chore(program): FW6-VERIFY-R2 accepted and integrated
cvsloane Jul 21, 2026
8a49dea
chore(program): wave 6 final gate green
cvsloane Jul 21, 2026
11fb732
fix(mobile): batch-2 review — allow-passthrough pane scope (OSC-133 m…
cvsloane Jul 21, 2026
177319a
fix(perf): key the telemetry-flag cache on the query string (test-saf…
cvsloane Jul 21, 2026
4848aa0
chore(program): wave 6 complete — batch-2 review closed, gate green
cvsloane Jul 21, 2026
4bdf33c
fix(mobile)+docs: PR-91 review round — parse-time chord validation, p…
cvsloane Jul 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BACKLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ This is the git-tracked backlog for this workstream. Keep local next steps here;
- [ ] Terminal frame-timing probe: short-circuit sampling on isEnabled() before any per-frame work; gate the web-vitals dynamic import on the perf flag (Wave-5 review LOWs).
- [ ] Window-strip arrow-key navigation dispatches live select_window per keypress (valid ARIA auto-activation but can burst commands) — consider focus-only + Enter-to-activate (Wave-5 review INFO).
- [ ] Commit a refreshed docs-site screenshot of the Command Center (acceptance checklist residual NOT-MET).
- [ ] Wave-6 batch-2 review LOWs: prune command-mark seenRef on marker disposal; 4px selection-handle offset; double-tap vs touch-scroll listener ordering; thumbnail "live capture" wording; scroll-freeze anchor drift at 10k scrollback saturation; heuristic ❯/› prompt-glyph tuning; stuck suppressClickRef edge (touch tap then BT-keyboard click).
45 changes: 44 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,48 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.1] - 2026-07-20

### Added

- A full-bleed mobile tmux workspace with a compact status row and window strip,
one configurable terminal rail, sticky Ctrl modes, per-host prefix keys,
swipe-up bindings, touch cursor drag, momentum scrollback, and 11–18 px pinch
font sizing.
- Attach-everywhere pane navigation, zero-tap cold-open restore of the last
attached pane, 30-minute warm terminal switching, and **New window here**
launches prefilled from the current host, tmux session, directory, and provider.
- Desktop-attached terminal letterboxing, stable grid behavior across the mobile
keyboard transition, window swipes and spatial pane navigation, scroll-freeze
reading, exact-range history copy, and command-mark navigation.
- Cross-viewport journeys for cold restore, window retargeting and keyboard
activation, letterboxing, sticky Ctrl, per-host prefix bytes, and window-here
launches, plus an owner-run Galaxy S25 Ultra/Brave device checklist.

### Changed

- Replaced the Command Center's overlapping mobile key strips with a single
Minimal, Expanded, or JSON-defined rail whose input follows the terminal's
control/read-only guard.
- Made launch and tmux-open API responses emit canonical `/` Command Center URLs
while retaining `/tmux` as a query-preserving compatibility redirect.
- Made client frame timing and Web Vitals probes opt-in through `?perf=1` or
`window.__sessionsPerf`, avoiding sampler and dynamic-import work by default.
- Changed window-strip arrow, Home, and End keys to move focus only; Enter or
Space now activates the focused window.

### Fixed

- Activated captured touch rail taps on pointer-up, kept the Playwright Next
dev-tools overlay from intercepting taps, and carried `hostId` through the
persistent terminal descriptor so custom per-host prefixes reach the terminal.
- Kept the terminal attention card above the key rail, prevented letterbox resize
feedback loops, preserved the rail-height inset across responsive mounts, and
released orphaned terminal sizes during crash cleanup.
- Preserved scroll position during incoming output, reconciled command results
after reconnect, and prevented one-shot Ctrl from leaking into subsequent IME
text.

## [0.4.0] - 2026-07-20

### Added
Expand Down Expand Up @@ -135,7 +177,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- agentd daemon for tmux session management
- Alerts and notifications (browser, audio, toasts, OpenClaw)

[Unreleased]: https://github.com/cvsloane/agent-commander/compare/v0.4.0...HEAD
[Unreleased]: https://github.com/cvsloane/agent-commander/compare/v0.4.1...HEAD
[0.4.1]: https://github.com/cvsloane/agent-commander/compare/v0.4.0...v0.4.1
[0.4.0]: https://github.com/cvsloane/agent-commander/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/cvsloane/agent-commander/compare/v0.2.1...v0.3.0
[0.2.1]: https://github.com/cvsloane/agent-commander/compare/v0.2.0...v0.2.1
Expand Down
1 change: 1 addition & 0 deletions agents/agentd/cmd/agentd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5397,6 +5397,7 @@ func (a *Agent) handleTerminalAttach(payload json.RawMessage) {
Cols: req.Cols,
Rows: req.Rows,
ResumeToken: req.ResumeToken,
Letterbox: req.Letterbox,
})
if err != nil {
log.Printf("Failed to attach terminal: %v", err)
Expand Down
5 changes: 4 additions & 1 deletion agents/agentd/cmd/agentd/main_tmux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestSyncPanesIncludesExtendedTmuxMetadata(t *testing.T) {

func TestBuildTmuxTopologySortsSessionsWindowsAndPanes(t *testing.T) {
panes := []tmux.Pane{
{SessionName: "zeta", SessionAttached: true, WindowIndex: 2, WindowName: "later", PaneID: "%9", PaneIndex: 1},
{SessionName: "zeta", SessionAttached: true, SessionAttachedClients: 2, WindowIndex: 2, WindowName: "later", PaneID: "%9", PaneIndex: 1},
{SessionName: "alpha", WindowIndex: 1, WindowName: "main", WindowActive: true, WindowZoomed: true, WindowLayout: "tiled", WindowBell: true, PaneID: "%2", PaneIndex: 1, PaneWidth: 90, PaneHeight: 30, PaneTitle: "second", CurrentCommand: "bash", CurrentPath: "/tmp/two"},
{SessionName: "alpha", WindowIndex: 1, WindowName: "main", WindowActive: true, WindowZoomed: true, WindowLayout: "tiled", WindowBell: true, PaneID: "%1", PaneIndex: 0, PaneActive: true, PaneWidth: 100, PaneHeight: 30, PaneTitle: "first", CurrentCommand: "codex", CurrentPath: "/tmp/one"},
{SessionName: "alpha", WindowIndex: 0, WindowName: "early", PaneID: "%0", PaneIndex: 0},
Expand All @@ -93,6 +93,9 @@ func TestBuildTmuxTopologySortsSessionsWindowsAndPanes(t *testing.T) {
if !mainWindow.Panes[0].Active || mainWindow.Panes[0].Width != 100 || mainWindow.Panes[0].CurrentCommand != "codex" {
t.Fatalf("pane topology=%+v", mainWindow.Panes[0])
}
if got.TmuxSessions[1].AttachedClients != 2 {
t.Fatalf("zeta attached clients=%d, want 2", got.TmuxSessions[1].AttachedClients)
}
}

func TestQueueTmuxTopologyDebouncesHooksAndPollsOnlyOnDrift(t *testing.T) {
Expand Down
3 changes: 3 additions & 0 deletions agents/agentd/cmd/agentd/tmux_topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ func buildTmuxTopology(reason string, panes []tmux.Pane) protocol.TmuxTopologyPa
sessionsByName[pane.SessionName] = session
}
session.Attached = session.Attached || pane.SessionAttached
if pane.SessionAttachedClients > session.AttachedClients {
session.AttachedClients = pane.SessionAttachedClients
}

key := windowKey{sessionName: pane.SessionName, windowIndex: pane.WindowIndex}
windowIndex, exists := windowsByKey[key]
Expand Down
1 change: 1 addition & 0 deletions agents/agentd/internal/protocol/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ type TerminalAttachPayload struct {
Cols int `json:"cols,omitempty"`
Rows int `json:"rows,omitempty"`
ResumeToken string `json:"resume_token,omitempty"`
Letterbox bool `json:"letterbox,omitempty"`
}

type TerminalInputPayload struct {
Expand Down
7 changes: 4 additions & 3 deletions agents/agentd/internal/protocol/tmux.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ type TmuxTopologyPayload struct {
}

type TmuxTopologySession struct {
SessionName string `json:"session_name"`
Attached bool `json:"attached"`
Windows []TmuxTopologyWindow `json:"windows"`
SessionName string `json:"session_name"`
Attached bool `json:"attached"`
AttachedClients int `json:"attached_clients,omitempty"`
Windows []TmuxTopologyWindow `json:"windows"`
}

type TmuxTopologyWindow struct {
Expand Down
44 changes: 38 additions & 6 deletions agents/agentd/internal/providers/launch.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"os"
"os/exec"
"path/filepath"
"regexp"
"sort"
"strings"
Expand All @@ -16,8 +17,9 @@ const promptPlaceholder = "{{prompt}}"
var environmentNamePattern = regexp.MustCompile(`^[A-Za-z_][A-Za-z0-9_]*$`)

type LaunchSpec struct {
Argv []string
Env map[string]string
Argv []string
Env map[string]string
Preamble []string
}

type LaunchTemplates struct {
Expand All @@ -29,6 +31,10 @@ func NewLaunchTemplates(cfg *config.Config) *LaunchTemplates {
if cfg != nil && strings.TrimSpace(cfg.Providers.Codex.ExecPath) != "" {
codexPath = cfg.Providers.Codex.ExecPath
}
shellPath := "/bin/bash"
if cfg != nil && strings.TrimSpace(cfg.Spawn.DefaultShell) != "" {
shellPath = cfg.Spawn.DefaultShell
}
templates := map[string]config.ProviderLaunchTemplate{
"claude_code": {
Argv: []string{"claude"},
Expand All @@ -43,7 +49,7 @@ func NewLaunchTemplates(cfg *config.Config) *LaunchTemplates {
"aider": {Argv: []string{"aider"}},
"cursor": {Argv: []string{"cursor"}},
"continue": {Argv: []string{"continue"}},
"shell": {},
"shell": {Argv: []string{shellPath, "-i"}},
}
if cfg != nil {
for provider, override := range cfg.Providers.LaunchTemplates {
Expand All @@ -58,15 +64,36 @@ func NewLaunchTemplates(cfg *config.Config) *LaunchTemplates {
}

func (t *LaunchTemplates) Interactive(provider string, flags []string, requestEnv map[string]string) (LaunchSpec, error) {
template, ok := t.templates[normalizeLaunchProvider(provider)]
normalizedProvider := normalizeLaunchProvider(provider)
template, ok := t.templates[normalizedProvider]
if !ok {
return LaunchSpec{}, fmt.Errorf("unsupported provider %q", provider)
}
argv := append([]string(nil), template.Argv...)
if len(argv) > 0 {
argv = append(argv, flags...)
}
return LaunchSpec{Argv: argv, Env: mergeEnv(template.Env, requestEnv)}, nil
env := mergeEnv(template.Env, requestEnv)
var preamble []string
if normalizedProvider == "shell" && len(argv) > 0 && filepath.Base(argv[0]) == "bash" {
env = mergeEnv(env, bashCommandMarkEnv(env))
preamble = []string{"tmux set-option -p allow-passthrough on >/dev/null 2>&1 || true"}
}
return LaunchSpec{Argv: argv, Env: env, Preamble: preamble}, nil
}

func bashCommandMarkEnv(existing map[string]string) map[string]string {
const passthroughStart = "\x1bPtmux;\x1b"
const passthroughEnd = "\x1b\\"
promptCommand := "__ac_status=$?; printf '\\033Ptmux;\\033\\033]133;D;%s\\007\\033\\\\' \"$__ac_status\"; printf '\\033Ptmux;\\033\\033]133;A\\007\\033\\\\'"
if previous := strings.TrimSpace(existing["PROMPT_COMMAND"]); previous != "" {
promptCommand += "; " + previous
}
return map[string]string{
"AC_COMMAND_MARKS": "osc133",
"PROMPT_COMMAND": promptCommand,
"PS0": passthroughStart + "\x1b]133;C\a" + passthroughEnd,
}
}

func (t *LaunchTemplates) Headless(provider, prompt string, requestEnv map[string]string) (LaunchSpec, error) {
Expand Down Expand Up @@ -99,7 +126,12 @@ func (s LaunchSpec) ShellCommand() (string, error) {
}
sort.Strings(keys)

parts := make([]string, 0, 2)
parts := make([]string, 0, len(s.Preamble)+2)
for _, command := range s.Preamble {
if strings.TrimSpace(command) != "" {
parts = append(parts, "("+command+")")
}
}
if len(keys) > 0 {
exports := make([]string, 0, len(keys))
for _, key := range keys {
Expand Down
41 changes: 41 additions & 0 deletions agents/agentd/internal/providers/launch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,44 @@ func TestLaunchTemplatesAreConfigOverridableAndSupportHeadless(t *testing.T) {
t.Fatalf("headless argv=%q", got)
}
}

func TestOwnedBashShellLaunchEnablesOSC133Passthrough(t *testing.T) {
templates := NewLaunchTemplates(&config.Config{
Spawn: config.SpawnConfig{DefaultShell: "/bin/bash"},
})
spec, err := templates.Interactive("shell", nil, map[string]string{
"PROMPT_COMMAND": "history -a",
})
if err != nil {
t.Fatal(err)
}
if got := strings.Join(spec.Argv, "|"); got != "/bin/bash|-i" {
t.Fatalf("shell argv=%q", got)
}
if spec.Env["AC_COMMAND_MARKS"] != "osc133" {
t.Fatalf("command mark env=%v", spec.Env)
}
if !strings.Contains(spec.Env["PROMPT_COMMAND"], "]133;A") || !strings.Contains(spec.Env["PROMPT_COMMAND"], "history -a") {
t.Fatalf("prompt command=%q", spec.Env["PROMPT_COMMAND"])
}
command, err := spec.ShellCommand()
if err != nil {
t.Fatal(err)
}
if !strings.Contains(command, "set-option -p allow-passthrough on") {
t.Fatalf("shell command did not enable tmux passthrough: %q", command)
}
}

func TestCustomNonBashShellDoesNotInjectBashCommandMarks(t *testing.T) {
templates := NewLaunchTemplates(&config.Config{
Spawn: config.SpawnConfig{DefaultShell: "/bin/zsh"},
})
spec, err := templates.Interactive("shell", nil, nil)
if err != nil {
t.Fatal(err)
}
if _, ok := spec.Env["AC_COMMAND_MARKS"]; ok || len(spec.Preamble) != 0 {
t.Fatalf("non-bash shell received bash integration: %+v", spec)
}
}
70 changes: 70 additions & 0 deletions agents/agentd/internal/tmux/pty_bridge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/base64"
"io"
"reflect"
"strings"
"sync"
"testing"
"time"
Expand Down Expand Up @@ -43,6 +44,75 @@ func TestPtyBridgeCreatesGroupedReadOnlyViewerAtRequestedSize(t *testing.T) {
}
}

func TestViewerPTYBridgePinsAndReleasesLetterboxedWindow(t *testing.T) {
runner := newFakeTmuxRunner()
runner.outputs["display-message -p -t %7 #{session_name}\t#{window_index}\t#{pane_index}"] = []byte("agents\t2\t1\n")

bridge, err := newViewerPTYBridge(runner, viewerPTYOptions{
ChannelID: "channel-1",
PaneID: "%7",
Cols: 160,
Rows: 50,
Letterbox: true,
ResumeToken: "resume-1",
})
if err != nil {
t.Fatalf("newViewerPTYBridge: %v", err)
}
if !runner.hasRun([]string{"set-option", "-w", "-t", "ac-view-channel-1:2", "window-size", "manual"}) {
t.Fatal("letterboxed window was not pinned to manual sizing")
}
if !runner.hasRun([]string{"resize-window", "-t", "ac-view-channel-1:2", "-x", "160", "-y", "50"}) {
t.Fatal("letterboxed window was not resized to the requested grid")
}

bridge.close(false)
if !runner.hasRun([]string{"set-option", "-w", "-t", "ac-view-channel-1:2", "window-size", "latest"}) {
t.Fatal("letterboxed window did not release latest sizing on close")
}
}

func TestViewerPTYBridgeLetterboxUsesPrivateTmuxSocket(t *testing.T) {
client, _ := newPrivateTmuxClient(t)
panes, err := client.ListPanes()
if err != nil {
t.Fatalf("list private panes: %v", err)
}
if len(panes) != 1 {
t.Fatalf("private pane count=%d, want 1", len(panes))
}
runner := newExecTmuxRunner(client)
bridge, err := newViewerPTYBridge(runner, viewerPTYOptions{
ChannelID: "letterbox-integration",
PaneID: panes[0].PaneID,
Cols: 120,
Rows: 40,
Letterbox: true,
ResumeToken: "resume-integration",
})
if err != nil {
t.Fatalf("newViewerPTYBridge on private socket: %v", err)
}

if output, err := runner.Output("show-options", "-w", "-v", "-t", "hook-test:0", "window-size"); err != nil {
t.Fatalf("show pinned window-size: %v", err)
} else if got := strings.TrimSpace(string(output)); got != "manual" {
t.Fatalf("pinned window-size=%q, want manual", got)
}
if output, err := runner.Output("display-message", "-p", "-t", "hook-test:0", "#{window_width}x#{window_height}"); err != nil {
t.Fatalf("show pinned dimensions: %v", err)
} else if got := strings.TrimSpace(string(output)); got != "120x40" {
t.Fatalf("pinned dimensions=%q, want 120x40", got)
}

bridge.close(false)
if output, err := runner.Output("show-options", "-w", "-v", "-t", "hook-test:0", "window-size"); err != nil {
t.Fatalf("show released window-size: %v", err)
} else if got := strings.TrimSpace(string(output)); got != "latest" {
t.Fatalf("released window-size=%q, want latest", got)
}
}

func TestViewerSessionNameAvoidsSanitizationCollisions(t *testing.T) {
first := viewerSessionName("channel/one")
second := viewerSessionName("channel:one")
Expand Down
Loading
Loading