Skip to content

fix(v3.2.97): S1 起動時 ~/パス修正 + statusline.js 自動デプロイ - #255

Merged
Kensan196948G merged 1 commit into
mainfrom
fix/v3.2.97-tilde-path-statusline-deploy
Apr 27, 2026
Merged

Kensan196948G merged 1 commit into
mainfrom
fix/v3.2.97-tilde-path-statusline-deploy

Conversation

@Kensan196948G

@Kensan196948G Kensan196948G commented Apr 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • bash double-quote 内で ~ が展開されないバグを修正 — New-RemoteTemplateDeployScript で ~ を \$HOME に変換
    • cron-launcher.sh が /home/kensan/~/.claudeos/ ではなく /home/kensan/.claudeos/ に正しく配置されるよう修正
    • リテラル ~/ ディレクトリ(/home/kensan/~/)は手動で削除済み
  • S1 起動時に statusline.js を ~/.claude/ へ自動デプロイ(-InitializeOnly)
    • scripts/templates/statusline.js を新規追加
    • S1 → プロジェクト選択 → Claude 起動後に statusline が必ず動作

Test plan

  • node scripts/check-doc-versions.js PASSED (README=v3.2.97)
  • New-RemoteTemplateDeployScript で ~/ → \$HOME/ に変換されること確認
  • S1 で任意プロジェクト起動後に ~/.claude/statusline.js が存在すること確認
  • CI: PSScriptAnalyzer / test-and-validate SUCCESS

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes v3.2.97

  • Bug Fixes

    • Fixed tilde path expansion issue in SSH deployment mode
    • Resolved statusline utility not deploying to Linux environments
  • Documentation

    • Updated CHANGELOG and README with v3.2.97 release information

New-RemoteTemplateDeployScript で bash double-quote 内 ~ が展開されない
バグを修正(~ → $HOME 変換)。cron-launcher.sh が ~/~/.claudeos/ に
誤配置される問題を解消。S1 起動時に statusline.js を ~/.claude/ へ
InitializeOnly でデプロイするよう deployParts に追加。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 27, 2026 11:55
@coderabbitai

coderabbitai Bot commented Apr 27, 2026 •

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

S1 SSH起動時のテンプレートデプロイにおいて、bash での ~ 展開失敗によるパス問題を $HOME 置換で修正するとともに、ステータスライン生成機能を持つ新しい statusline.js テンプレートファイルをリモート側に自動デプロイする処理を追加しました。

Changes

コホート / ファイル(s) 概要
ドキュメント更新
CHANGELOG.md, README.md
v3.2.97リリースノートを追加。tilde→$HOME変換によるcron-launcher.sh誤配置問題の解決と、statusline.js Linux自動デプロイ対応を記載。バージョン情報を更新。
デプロイスクリプト修正
scripts/main/Start-ClaudeCode.ps1
生成bash内の ~/<path> を $HOME/<path> に書き換える処理を追加。SSH bootstrap段階で statusline.js テンプレートを ~/.claude/ へ InitializeOnly でデプロイするよう拡張。
新しいテンプレートファイル
scripts/templates/statusline.js
JSON標準入力からモデル・作業ディレクトリ・context window・コスト・レート制限情報を解析し、ANSIカラー処理とgit branch取得を含む4行のステータスライン出力を生成する新しいNode.jsスクリプト。

Sequence Diagram(s)

sequenceDiagram
    participant PowerShell as PowerShell<br/>Start-ClaudeCode
    participant SSH as SSH Connection
    participant Remote as Remote Host
    participant StatusLine as statusline.js

    PowerShell->>SSH: 1. SSH接続確立
    PowerShell->>SSH: 2. テンプレートscripts/templates/statusline.js<br/>をリモートへ送信
    SSH->>Remote: 3. InitializeOnlyで~/.claude/statusline.js<br/>へデプロイ(既存時は上書き不可)
    PowerShell->>SSH: 4. デプロイ用bashスクリプト生成<br/>(~をすべて$HOMEに置換)
    SSH->>Remote: 5. bash実行環境で$HOME展開<br/>(正しいパスでリソース配置)
    Remote->>StatusLine: 6. S1起動時にJSON入力で呼び出し
    StatusLine-->>Remote: 7. ステータスライン出力<br/>(model/branch/context/レート制限)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 ウサギも喜ぶホーム展開、
チルダの迷路を $HOME で脱出!
ステータスラインは虹色に輝き、
リモートの向こうで花咲く設定——
S1 よ、今こそ完璧に起動せよ ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed プルリクエストのタイトルは、メインの変更内容である「S1 起動時の ~ パス修正と statusline.js の自動デプロイ」を正確に要約しており、変更セットの主要な目的を明確に伝えています。
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/v3.2.97-tilde-path-statusline-deploy

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

Copilot AI 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.

Pull request overview

S1(SSH モード)起動時のリモートテンプレート配布を安定させるために、bash の double-quote 内で ~ が展開されない問題を回避しつつ、statusline.js を初回のみ自動配布できるようにするPRです。

Changes:

  • New-RemoteTemplateDeployScript で ~/ を $HOME/ に正規化し、リモートでの誤配置を防止
  • S1 起動時に statusline.js を ~/.claude/statusline.js へ -InitializeOnly で自動デプロイ
  • README / CHANGELOG を v3.2.97 向けに更新

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
scripts/templates/statusline.js statusline 用の Node.js スクリプトテンプレートを追加
scripts/main/Start-ClaudeCode.ps1 SSH 配布時の ~/ 正規化($HOME/)と statusline.js の初回配布を追加
README.md v3.2.97 の変更点に合わせてトップとバージョン表記を更新
CHANGELOG.md v3.2.97 の変更内容を追記

Comment on lines +34 to +38
// Green for filled, dim gray for empty
let color = C.green;
if (pct >= 80) color = C.red;
else if (pct >= 50) color = C.yellow;
return color + "\u25b0".repeat(filled) + C.cyan + "\u25b1".repeat(empty) + C.r;
Comment thread CHANGELOG.md

| バグ | 原因 | 修正 |
|---|---|---|
| `~/.claudeos/cron-launcher.sh` が `~/~/.cloudeos/` に誤配置 | bash double-quoteの中では `~` は展開されない | `~` → `$HOME` に変換するロジック追加 |
@@ -0,0 +1,145 @@
// Claude Code status line script (Windows / Node.js)
@Kensan196948G
Kensan196948G merged commit 06e48b1 into main Apr 27, 2026
7 of 8 checks passed
@Kensan196948G
Kensan196948G deleted the fix/v3.2.97-tilde-path-statusline-deploy branch April 27, 2026 12:00
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.

2 participants