Skip to content

feat: add AeroSpace layout restoration script - #393

Merged
keito4 merged 1 commit into
mainfrom
feat/aerospace-fix-layout-script
Jan 30, 2026
Merged

feat: add AeroSpace layout restoration script#393
keito4 merged 1 commit into
mainfrom
feat/aerospace-fix-layout-script

Conversation

@keito4

@keito4 keito4 commented Jan 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • 全ワークスペースのレイアウトを縦タイル(v_tiles)で復元するスクリプトを追加
  • ディスプレイ再接続後のレイアウト崩れを修正するために使用

Changes

  • script/aerospace-fix-layout: 新規スクリプト追加

Usage

# 直接実行
./script/aerospace-fix-layout

# エイリアスを設定(~/.zshrcに追加)
alias aerospace-fix='~/develop/github.com/keito4/config/script/aerospace-fix-layout'

Test plan

  • スクリプトを手動実行してレイアウトが復元されることを確認済み

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added aerospace-fix-layout utility script for workspace layout management. Reloads configuration, identifies workspaces with active windows, reverts existing layouts, and applies vertical tiling. Includes progress feedback and graceful error handling per workspace.

✏️ Tip: You can customize this high-level summary in your review settings.

全ワークスペースのレイアウトを縦タイル(v_tiles)で復元するスクリプトを追加。
ディスプレイ再接続後のレイアウト崩れを修正するために使用。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jan 30, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

A new Bash script aerospace-fix-layout is added to restore AeroSpace workspace layouts after display configuration changes. The script reloads AeroSpace configuration, collects all workspaces containing windows, and applies vertical tiling layout to each workspace with error tolerance.

Changes

Cohort / File(s) Summary
AeroSpace Layout Fix Script
script/aerospace-fix-layout
New executable Bash script that reloads AeroSpace configuration, retrieves all workspaces with active windows, flattens their tree layouts, and applies vertical tiling. Includes Japanese progress messages and tolerates per-workspace operation failures.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 Layouts fixed with gentle care,
Workspaces dance through the air,
Vertical tiles, so neat and bright,
AeroSpace blooms in the light!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: adding a script for AeroSpace layout restoration, which matches the changeset's primary purpose.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/aerospace-fix-layout-script

Tip

🧪 Unit Test Generation v2 is now available!

We have significantly improved our unit test generation capabilities.

To enable: Add this to your .coderabbit.yaml configuration:

reviews:
  finishing_touches:
    unit_tests:
      enabled: true

Try it out by using the @coderabbitai generate unit tests command on your code files or under ✨ Finishing Touches on the walkthrough!

Have feedback? Share your thoughts on our Discord thread!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@keito4
keito4 merged commit 97d5940 into main Jan 30, 2026
2 of 3 checks passed
@claude

claude Bot commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

Pull Request Review: feat: add AeroSpace layout restoration script

概要

AeroSpaceのワークスペースレイアウトを復元するスクリプトの追加。ディスプレイ再接続後のレイアウト崩れを修正する目的で作成されています。


✅ 良い点

1. ドキュメンテーション

  • script/aerospace-fix-layout:1-36: スクリプト冒頭の詳細なドキュメントが非常に充実
    • Purpose、Usage、Prerequisites、Troubleshootingが明確
    • エイリアス設定例も記載されており、ユーザビリティが高い

2. エラーハンドリング

  • script/aerospace-fix-layout:38: set -euo pipefail でシェルスクリプトのベストプラクティスに準拠
  • script/aerospace-fix-layout:60-61: || true を使用してエラーを許容し、グレースフルに処理

3. ユーザーフィードバック

  • 各ステップで適切な日本語メッセージを表示し、進捗が分かりやすい
  • 絵文字を使用して視覚的にも分かりやすい

⚠️ 改善提案

1. テストカバレッジの欠如 (重要)

問題点:

  • リポジトリの品質基準(CLAUDE.md)では「70%+ 行カバレッジ」が要求されています
  • package.json:15 で shellcheck が設定されていますが、このスクリプトは対象外(.sh 拡張子なし)
  • 単体テストまたは統合テストが存在しません

2. 依存関係チェックの欠如

問題点:

  • script/aerospace-fix-layout:44: AeroSpaceがインストールされているか事前確認がない
  • 実行時エラーが発生してから問題が判明する

推奨: スクリプト冒頭で command -v aerospace で存在確認を追加

3. 設定ファイル存在確認

問題点:

  • script/aerospace-fix-layout:44: ~/.aerospace.toml の存在確認がない
  • Prerequisitesに記載されているが、実行時にチェックしていない

4. ShellCheck対象外の問題

問題点:

  • package.json:15: 現在のshellcheck設定では .sh 拡張子のファイルのみが対象
  • このスクリプトは静的解析されていない

推奨: package.json の shellcheck スクリプトを更新して拡張子なしのスクリプトも対象に含める


🔒 セキュリティ

  • ✅ 機密情報の漏洩リスクなし
  • ✅ ユーザー入力を受け付けないため、インジェクション攻撃の心配なし
  • set -euo pipefail でセキュアなシェル設定

⚡ パフォーマンス

  • script/aerospace-fix-layout:45: sleep 0.5 は必要最小限
  • 大きなパフォーマンス問題なし

📊 Definition of Done チェック

項目 状態 コメント
Quality Gates Pass ⚠️ ShellCheckが実行されていない
ドキュメント更新 スクリプト内ドキュメント充実
テスト 単体/統合テストなし
70%+ カバレッジ テストが存在しない

🎯 優先度別アクションアイテム

必須 (マージ前)

  1. ✅ Conventional Commits準拠 (完了済み)
  2. ❌ テストの追加 - BATS統合テストまたは手動テスト手順の文書化
  3. ❌ ShellCheck実行 - 静的解析でバグを検出

推奨 (マージ前)

  1. 依存関係チェック (aerospace コマンド存在確認)
  2. 設定ファイル存在確認 (~/.aerospace.toml)

📝 総評

コード品質: 7/10

  • ドキュメンテーションとエラーハンドリングは優秀
  • テストカバレッジとShellCheck対象外が主な課題

推奨アクション: 最低限、ShellCheckを手動実行して問題がないことを確認してからマージすることを推奨します

レビューは以上です。ご確認よろしくお願いいたします 🙇

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.60.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions github-actions Bot added the released リリース済み label Jan 30, 2026
@keito4
keito4 deleted the feat/aerospace-fix-layout-script branch March 1, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released リリース済み

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant