Skip to content

mosh - #27

Merged
Vilos92 merged 7 commits into
mainfrom
mosh
Aug 4, 2026
Merged

mosh#27
Vilos92 merged 7 commits into
mainfrom
mosh

Conversation

@Vilos92

@Vilos92 Vilos92 commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added Mosh-based remote access aliases for Mac Mini connections.
    • Added installation support for the Mosh remote-shell tool.
  • Chores

    • Updated remote connection guidance for Tailscale and non-interactive Homebrew environments.
    • Removed the deprecated Sparkify SSH alias.
    • Added automated pull-request and main-branch validation through Woodpecker CI.
    • Enabled automated code review summaries and status reporting.
  • Style

    • Improved formatting checks for JavaScript, JSX, and MJS files, including paths with spaces or special characters.
    • Reformatted interface styling code without changing its behavior.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The changes add Homebrew support for Mosh, define Mac Mini Mosh aliases, remove the Sparkify alias, scope Prettier to JavaScript-related files, and replace the deleted GitHub Actions lint workflow with Woodpecker CI configuration.

Changes

Mosh remote access

Layer / File(s) Summary
Mosh setup and aliases
scripts/brews.sh, remote/.zshenv/post/remote.sh, AGENTS.md
Adds the remote-pkgs task and install_remote_packages function. Adds mosh-mini and mosh-mini-hermes, removes the Sparkify alias, and documents Mosh requirements.

Validation tooling

Layer / File(s) Summary
Scoped JavaScript formatting
scripts/prettier.sh, mac-productivity/Library/Application Support/Übersicht/widgets/Gmux.jsx
Restricts Prettier checks and writes to JavaScript, JSX, and MJS files. Reformats the JSX hover-style interpolation without changing its behavior.
CI pipeline configuration
.github/workflows/lint.yml, .coderabbit.yaml, .woodpecker.yml
Removes the GitHub Actions lint workflow, configures CodeRabbit, and adds Woodpecker validation steps for ShellCheck, Ruff, and Prettier.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ZshAliases
  participant MoshClient
  participant MacMiniMoshServer
  participant HermesZsh
  ZshAliases->>MoshClient: invoke mosh-mini or mosh-mini-hermes
  MoshClient->>MacMiniMoshServer: establish Mosh session
  MacMiniMoshServer->>HermesZsh: start interactive login shell
Loading

Possibly related PRs

  • Vilos92/dotfiles#20: Both PRs add a package-installation function and a corresponding TASKS entry in scripts/brews.sh.

Poem

A rabbit hops where Mosh winds flow,
Mac Mini paths now smooth and glow.
Prettier checks the scripts with care,
Woodpecker guards the code up there.
CI thumps its little drum—
“Clean commits, here we come!”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies Mosh, which is the primary functional change in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mosh

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
remote/.zshenv/post/remote.sh (1)

3-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the stale ssh-sparkify entry from AGENTS.md. No shell alias definition exists in the repository.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@remote/.zshenv/post/remote.sh` around lines 3 - 11, Remove the stale
ssh-sparkify entry from AGENTS.md, leaving the existing remote aliases and other
AGENTS.md guidance unchanged.
AGENTS.md (1)

87-87: 🩺 Stability & Availability | 🔵 Trivial

Document the Mosh UDP prerequisite.

Mosh requires SSH access and UDP access to ports 60000–61000 on gregs-mac-mini. Document the firewall or network requirement, or state that it is already configured.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` at line 87, Update the mosh-mini and mosh-mini-hermes
documentation in AGENTS.md to state that Mosh requires SSH access plus UDP
connectivity to ports 60000–61000 on gregs-mac-mini, and document the
firewall/network configuration or confirm it is already configured.
scripts/brews.sh (1)

112-117: 📐 Maintainability & Code Quality | 🔵 Trivial

Run the required shell validation before merge.

The new Mosh function has no Bash-mode ShellCheck findings. Run scripts/shellcheck.sh and test remote-pkgs with Mosh already installed, a declined prompt, and a failed brew install.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/brews.sh` around lines 112 - 117, Validate the new
install_remote_packages function by running scripts/shellcheck.sh, then exercise
remote-pkgs with Mosh already installed, a declined installation prompt, and a
failed brew install; resolve any validation failures before merge.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@remote/.zshenv/post/remote.sh`:
- Around line 3-6: Move all four *-mini aliases from
remote/.zshenv/post/remote.sh into the mac-mini Stow package under
.zshenv/post/, and update the mosh-mini alias so mosh-server is resolved on
gregs-mac-mini using target-side brew --prefix mosh or an equivalent target-side
wrapper supporting both Homebrew prefixes. Validate placement with stow -n
directly; do not use scripts/stow.sh for the dry run.

---

Nitpick comments:
In `@AGENTS.md`:
- Line 87: Update the mosh-mini and mosh-mini-hermes documentation in AGENTS.md
to state that Mosh requires SSH access plus UDP connectivity to ports
60000–61000 on gregs-mac-mini, and document the firewall/network configuration
or confirm it is already configured.

In `@remote/.zshenv/post/remote.sh`:
- Around line 3-11: Remove the stale ssh-sparkify entry from AGENTS.md, leaving
the existing remote aliases and other AGENTS.md guidance unchanged.

In `@scripts/brews.sh`:
- Around line 112-117: Validate the new install_remote_packages function by
running scripts/shellcheck.sh, then exercise remote-pkgs with Mosh already
installed, a declined installation prompt, and a failed brew install; resolve
any validation failures before merge.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6e42616e-6359-4f7a-ac47-677572712838

📥 Commits

Reviewing files that changed from the base of the PR and between 9e4abe7 and 8b21c70.

📒 Files selected for processing (3)
  • AGENTS.md
  • remote/.zshenv/post/remote.sh
  • scripts/brews.sh

Comment on lines +3 to +6
# Mac Mini (must be on tailscale). mosh needs an absolute --server path because
# homebrew is not on the mini's non-interactive PATH.
alias ssh-mini='ssh greg.linscheid@gregs-mac-mini'
# Interactive login zsh: -i for .zshrc (~/.local/bin on PATH), -l for
# /etc/zprofile & .zprofile (docker/homebrew on PATH).
# hermes attaches/creates the persistent "hermes" tmux session running the TUI.
alias mosh-mini='mosh --server=/opt/homebrew/bin/mosh-server greg.linscheid@gregs-mac-mini'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- candidate files ---'
git ls-files | rg '(^|/)(remote|mac-mini|front)(/|$)|(^|/)AGENTS\.md$|scripts/stow\.sh$'
printf '%s\n' '--- relevant file outline ---'
for f in remote/.zshenv/post/remote.sh AGENTS.md scripts/stow.sh; do
  if [ -f "$f" ]; then
    echo "### $f"
    wc -l "$f"
    ast-grep outline "$f" --lang bash 2>/dev/null || true
  fi
done
printf '%s\n' '--- target configuration ---'
cat -n remote/.zshenv/post/remote.sh 2>/dev/null || true
printf '%s\n' '--- machine-specific matches ---'
rg -n -C 3 'mac-mini|mosh-mini|ssh-mini|ssh-sparkify|/opt/homebrew|mosh-server|brew --prefix' . --glob '!node_modules' --glob '!dist' --glob '!build'
printf '%s\n' '--- guidelines ---'
if [ -f AGENTS.md ]; then sed -n '60,100p' AGENTS.md; fi
printf '%s\n' '--- stow script ---'
if [ -f scripts/stow.sh ]; then cat -n scripts/stow.sh; fi

Repository: Vilos92/dotfiles

Length of output: 21116


🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- package contents ---'
git ls-files remote mac-mini zsh 2>/dev/null | sed -n '1,180p'
printf '%s\n' '--- related shell files ---'
for f in $(git ls-files remote mac-mini zsh 2>/dev/null | rg '(^|/)(\.zshenv|\.zprofile|\.zshrc|.*\.sh)$' | head -80); do
  echo "### $f"
  cat -n "$f"
done
printf '%s\n' '--- package and setup references ---'
rg -n -C 4 'remote package|stow.*remote|source.*remote|\.zshenv|zshenv|mac-mini|Mac Mini' AGENTS.md README.md scripts remote mac-mini zsh 2>/dev/null | head -240
printf '%s\n' '--- hermes script ---'
cat -n mac-mini/.local/bin/hermes 2>/dev/null || true
printf '%s\n' '--- repository status and package directories ---'
git status --short
find remote mac-mini -maxdepth 4 -type f -print 2>/dev/null | sort

Repository: Vilos92/dotfiles

Length of output: 16862


🌐 Web query:

Mosh manual --server option remote mosh-server command path and Homebrew brew --prefix formula documentation

💡 Result:

The Mosh manual's --server option allows you to specify the path to the mosh-server command on the remote host, which is particularly useful when the binary is not in the default PATH [1][2][3]. The command to run is: mosh --server=/path/to/mosh-server [user@]host If you are using Homebrew, you can identify the location of an installed formula using the brew --prefix command [4]. When provided with a formula name, this command displays the base path where that formula is installed (or would be) [4]. For example: $(brew --prefix mosh)/bin/mosh-server Combining these, if you need to manually specify the path to a Homebrew-installed mosh-server on a remote machine (assuming the remote machine also uses Homebrew), you can dynamically reference it using the output of the brew command [2][4]. The server helper is unprivileged and can be installed in a user's home directory if needed [1][3][5].

Citations:


🌐 Web query:

site:github.com/mobile-shell/mosh --server option ssh mosh-server remote command source

💡 Result:

The --server option in the mosh command allows you to specify the absolute path or location of the mosh-server binary on the remote host [1][2][3]. This option is primarily used when the mosh-server binary is not located in the default search path ($PATH) of the user's login shell on the remote server [4][5]. If mosh-server cannot be found, you will typically receive a command not found error when attempting to connect [4]. To use the option, specify the full path to the binary as follows [4]: mosh --server=/full/path/to/mosh-server [user@]host If you also wish to execute a specific remote command using Mosh, you should use the -- separator to distinguish between Mosh options and the remote command [6][7]: mosh [user@]host -- [command] For example, to open a specific tmux session: mosh [user@]host -- tmux attach -t mysession Combining these capabilities, you can specify the server location and run a command simultaneously: mosh --server=/usr/local/bin/mosh-server [user@]host -- [command] Note that Mosh is designed for interactive terminal sessions [8]. Unlike SSH, it does not provide a raw byte stream, so it is generally unsuitable for non-interactive tasks like piping file contents or data transfer between systems [8].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
import re

remote = Path("remote/.zshenv/post/remote.sh")
text = remote.read_text()
aliases = dict(re.findall(r"^alias\s+([A-Za-z0-9_-]+)='([^']*)'$", text, re.M))

print("--- alias invariants ---")
for name, command in aliases.items():
    print(f"{name}: host={command.rsplit(' ', 1)[-1] if command else ''}")
    if "mosh --server=" in command:
        server = re.search(r"--server=([^ ]+)", command).group(1)
        print(f"  server={server}")

print("--- package placement ---")
print(f"remote source exists: {remote.is_file()}")
print(f"mac-mini contains equivalent shell config: "
      f"{any(p.as_posix().endswith(('.zshenv/post/remote.sh', '.zshenv/post/mac-mini.sh')) "
          f"for p in Path('mac-mini').rglob('*') if p.is_file())}")
print(f"stow.sh stows remote: {'prompt_and_stow remote' in Path('scripts/stow.sh').read_text()}")
print(f"stow.sh stows mac-mini: {'prompt_and_stow mac-mini' in Path('scripts/stow.sh').read_text()}")

print("--- relevant documentation ---")
agents = Path("AGENTS.md").read_text()
for line in agents.splitlines():
    if any(term in line for term in ("`remote/`", "`mac-mini/`", "`ssh-sparkify`", "`ssh-mini`", "`mosh-mini`")):
        print(line)
PY

printf '%s\n' '--- Homebrew path assumptions ---'
sed -n '1,24p' scripts/brews.sh

Repository: Vilos92/dotfiles

Length of output: 341


🏁 Script executed:

#!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
import re

remote = Path("remote/.zshenv/post/remote.sh")
text = remote.read_text()
aliases = dict(re.findall(r"^alias\s+([A-Za-z0-9_-]+)='([^']*)'$", text, re.M))

print("--- alias invariants ---")
for name, command in aliases.items():
    print(f"{name}: {command}")
    if "mosh --server=" in command:
        server = re.search(r"--server=([^ ]+)", command).group(1)
        print(f"  server={server}")

print("--- package placement ---")
print(f"remote source exists: {remote.is_file()}")
 mac_files = [
    p.as_posix()
    for p in Path("mac-mini").rglob("*")
    if p.is_file()
]
print("mac-mini shell config files:", mac_files)
stow = Path("scripts/stow.sh").read_text()
print(f"stow.sh stows remote: {'prompt_and_stow remote' in stow}")
print(f"stow.sh stows mac-mini: {'prompt_and_stow mac-mini' in stow}")

print("--- relevant documentation ---")
agents = Path("AGENTS.md").read_text()
for line in agents.splitlines():
    if any(term in line for term in ("`remote/`", "`mac-mini/`", "`ssh-sparkify`", "`ssh-mini`", "`mosh-mini`")):
        print(line)
PY

printf '%s\n' '--- Homebrew path assumptions ---'
sed -n '1,24p' scripts/brews.sh

Repository: Vilos92/dotfiles

Length of output: 234


🏁 Script executed:

#!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
import re

remote = Path("remote/.zshenv/post/remote.sh")
text = remote.read_text()
aliases = dict(re.findall(r"^alias\s+([A-Za-z0-9_-]+)='([^']*)'$", text, re.M))

print("--- alias invariants ---")
for name, command in aliases.items():
    print(f"{name}: {command}")
    if "mosh --server=" in command:
        server = re.search(r"--server=([^ ]+)", command).group(1)
        print(f"  server={server}")

print("--- package placement ---")
print(f"remote source exists: {remote.is_file()}")
mac_files = [
    p.as_posix()
    for p in Path("mac-mini").rglob("*")
    if p.is_file()
]
print("mac-mini shell config files:", mac_files)
stow = Path("scripts/stow.sh").read_text()
print(f"stow.sh stows remote: {'prompt_and_stow remote' in stow}")
print(f"stow.sh stows mac-mini: {'prompt_and_stow mac-mini' in stow}")

print("--- relevant documentation ---")
agents = Path("AGENTS.md").read_text()
for line in agents.splitlines():
    if any(term in line for term in ("`remote/`", "`mac-mini/`", "`ssh-sparkify`", "`ssh-mini`", "`mosh-mini`")):
        print(line)
PY

printf '%s\n' '--- Homebrew path assumptions ---'
sed -n '1,24p' scripts/brews.sh

Repository: Vilos92/dotfiles

Length of output: 2036


Move all Mac Mini aliases to the mac-mini Stow package.

Move the four *-mini aliases to mac-mini/.zshenv/post/ and resolve mosh-server on gregs-mac-mini, not on the invoking host. Use target-side brew --prefix mosh or a target-side wrapper to support both Homebrew prefixes. Use stow -n directly for the dry run; scripts/stow.sh performs an actual stow.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@remote/.zshenv/post/remote.sh` around lines 3 - 6, Move all four *-mini
aliases from remote/.zshenv/post/remote.sh into the mac-mini Stow package under
.zshenv/post/, and update the mosh-mini alias so mosh-server is resolved on
gregs-mac-mini using target-side brew --prefix mosh or an equivalent target-side
wrapper supporting both Homebrew prefixes. Validate placement with stow -n
directly; do not use scripts/stow.sh for the dry run.

Source: Coding guidelines

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/prettier.sh`:
- Around line 56-68: Update the Prettier invocations in the CHECK_MODE,
FIX_MODE, and fallback branches to tolerate the unmatched js_glob, either by
skipping the calls when no JavaScript files match or by adding Prettier’s
--no-error-on-unmatched-pattern option to all three commands.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c112b111-d155-48da-b933-61c7329e14fe

📥 Commits

Reviewing files that changed from the base of the PR and between 2cabd32 and b8e1f02.

📒 Files selected for processing (2)
  • mac-productivity/Library/Application Support/Übersicht/widgets/Gmux.jsx
  • scripts/prettier.sh

Comment thread scripts/prettier.sh
Vilos92 and others added 4 commits August 3, 2026 22:43
The alias itself is gone; this removes the now-stale doc line.

Co-Authored-By: Claude <noreply@anthropic.com>
prettier exits 2 on an unmatched pattern, so an empty match would fail CI.
Guard on the find output rather than passing --no-error-on-unmatched-pattern,
which would let a typo'd glob pass silently.

Also fixes file_count picking up "0\n0" from `grep -c . || echo "0"`, which
made the -gt test error instead of returning false.

Co-Authored-By: Claude <noreply@anthropic.com>
shellcheck, ruff and prettier now run on the greg-zone Woodpecker instance
from .woodpecker.yml, replacing the GitHub Actions lint workflow. The
greg-zone submodule is initialized over https (the repo is public, so no
token plumbing is needed). The CodeRabbit config comes from scriptlancer,
adapted to keep automatic reviews on.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds a CLAUDE.md section with the tokenless tailnet API recipe: resolve the
repo id, find the pipeline for a PR via its merge ref, list step states, and
decode step logs. Every command was validated against the live pipeline for
dotfiles PR #27.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Vilos92
Vilos92 merged commit 2566c1d into main Aug 4, 2026
1 of 2 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.woodpecker.yml (1)

17-28: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Make the Prettier submodule scope explicit.

clone.settings.recursive: false leaves submodules uninitialized, and the submodule step initializes only greg-zone. The repository also declares front. (raw.githubusercontent.com)

scripts/prettier.sh searches from . and expands **/*.{js,jsx,mjs} without excluding either path. (raw.githubusercontent.com) With depends_on: [], Woodpecker starts Prettier immediately in the shared workspace. (woodpecker-ci.org)

Either initialize every intended submodule before Prettier, or explicitly exclude front and greg-zone in the script. Confirm the intended scope before merge.

Also applies to: 42-48

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.woodpecker.yml around lines 17 - 28, Make the Prettier scan scope explicit
across the submodule initialization and formatting workflow: either initialize
both declared submodules, front and greg-zone, before the Prettier step, or
update scripts/prettier.sh to exclude both paths. Ensure the chosen approach is
applied consistently with the non-recursive clone configuration and parallel
step execution.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.woodpecker.yml:
- Around line 17-28: Make the Prettier scan scope explicit across the submodule
initialization and formatting workflow: either initialize both declared
submodules, front and greg-zone, before the Prettier step, or update
scripts/prettier.sh to exclude both paths. Ensure the chosen approach is applied
consistently with the non-recursive clone configuration and parallel step
execution.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 885cbbd0-5a13-4f61-bfc2-bc4396818aaa

📥 Commits

Reviewing files that changed from the base of the PR and between 9f4603e and 4ddebb7.

📒 Files selected for processing (3)
  • .coderabbit.yaml
  • .github/workflows/lint.yml
  • .woodpecker.yml
💤 Files with no reviewable changes (1)
  • .github/workflows/lint.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant