beniya 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e937b12eb5f1aa3425c8dd832cb7bd11396dfd86b6e232de58fe771c3da47a2
4
- data.tar.gz: 1c41f33e6419d9458c778e8d7937472ad29e4f6d49ffcca12f1e78fac07f16ca
3
+ metadata.gz: 5467834753b4cd28f856d6f2bec367deeca3718af5ac8ee3f538e284552f31b9
4
+ data.tar.gz: 9615cf65617d91c6aa5e69d3768cebe89f9c8a7ec0053a4b2b99b56e04afebc1
5
5
  SHA512:
6
- metadata.gz: 272779c673aa653ffeada51b3f46ff4da876d2107310fd79460d1f3a50eae6690dd60d3c21fb9f9ff21ab6914e5baab7ac96c54cb273c68c0b4859d95cb66077
7
- data.tar.gz: 4bf52e383efe9457ec8e0b46b90a5b0742eddd48a222197d83de6e374942cefb92df4c802cd40bb3b047c6e4180311e87a326fd1eabfb453f9b5bac3938d8dd6
6
+ metadata.gz: faef534b972dcad18c504fa27baf110eaffb0762620bdb6d41372a546fc438752db973fe7d7703f3fa2e639fc598599afe0721ddf3ac175aff94d804210b1626
7
+ data.tar.gz: 3b351e8907db499aeb4fbabbacfd1ee7c7bdfd3cb716ac98afc80d351c8a12b6c4ce2217783e610157b989fbe59c0b5adaea7632b37d02a2b48c98f439337002
data/CHANGELOG.md ADDED
@@ -0,0 +1,99 @@
1
+ # Changelog
2
+
3
+ All notable changes to beniya will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.4.0] - 2025-01-13
11
+
12
+ ### Added
13
+ - **Floating Dialog System**: Modern floating confirmation dialogs for delete operations
14
+ - **Enhanced Delete Operations**: Comprehensive error handling with file system verification
15
+ - **English-Only Interface**: Complete localization to English, removing multi-language complexity
16
+ - **Character Width Calculation**: Proper Japanese character width handling for UI rendering
17
+ - **Debug Support**: `BENIYA_DEBUG=1` environment variable for detailed logging
18
+ - **Real-time Result Display**: Success/failure counts in floating dialogs
19
+ - **Post-deletion Verification**: File system checks to ensure actual deletion
20
+ - **HSL Color Model Support**: Intuitive color configuration with HSL values
21
+
22
+ ### Changed
23
+ - **All UI messages converted to English** from Japanese
24
+ - **Delete confirmation workflow** now uses floating dialogs instead of command-line prompts
25
+ - **Error messages standardized** to English across all components
26
+ - **Documentation updated** to reflect English-only interface
27
+ - **Code style unified** with single quotes throughout
28
+
29
+ ### Removed
30
+ - **Multi-language support** configuration and related code
31
+ - **Language setting environment variables** (`BENIYA_LANG`)
32
+ - **Language configuration files** support
33
+ - **Japanese UI messages** and localization infrastructure
34
+
35
+ ### Technical
36
+ - **+290 lines** of new functionality in core keybind handler
37
+ - **New test files** for floating dialog system and delete operations
38
+ - **Enhanced error handling** patterns throughout codebase
39
+ - **Improved file system safety** checks and validation
40
+
41
+ For detailed information, see [CHANGELOG_v0.4.0.md](./CHANGELOG_v0.4.0.md)
42
+
43
+ ## [0.3.0] - 2024-XX-XX
44
+
45
+ ### Added
46
+ - Enhanced file operations and management features
47
+ - Improved user interface and navigation
48
+ - Additional configuration options
49
+
50
+ ### Changed
51
+ - Performance improvements
52
+ - Bug fixes and stability enhancements
53
+
54
+ ## [0.2.0] - 2024-XX-XX
55
+
56
+ ### Added
57
+ - New features and functionality improvements
58
+ - Enhanced file management capabilities
59
+
60
+ ### Changed
61
+ - User interface improvements
62
+ - Performance optimizations
63
+
64
+ ## [0.1.0] - 2024-XX-XX
65
+
66
+ ### Added
67
+ - Initial release of beniya
68
+ - Basic file manager functionality
69
+ - Vim-like key bindings
70
+ - File preview capabilities
71
+ - Multi-platform support
72
+
73
+ ---
74
+
75
+ ## Release Links
76
+
77
+ - [v0.4.0 Detailed Release Notes](./CHANGELOG_v0.4.0.md) - Comprehensive changelog with technical details
78
+ - [GitHub Releases](https://github.com/masisz/beniya/releases) - Download releases and view release history
79
+ - [Installation Guide](./README.md#installation) - How to install beniya
80
+ - [Usage Documentation](./README.md#usage) - Complete usage guide
81
+
82
+ ## Version Numbering
83
+
84
+ beniya follows [Semantic Versioning](https://semver.org/):
85
+
86
+ - **MAJOR** version for incompatible API changes
87
+ - **MINOR** version for backwards-compatible functionality additions
88
+ - **PATCH** version for backwards-compatible bug fixes
89
+
90
+ ## Contributing
91
+
92
+ When contributing to beniya:
93
+
94
+ 1. Update the **[Unreleased]** section with your changes
95
+ 2. Follow the existing changelog format
96
+ 3. Link to detailed release notes for major versions
97
+ 4. Include migration notes for breaking changes
98
+
99
+ For more information, see [Contributing Guidelines](./README.md#contributing).
@@ -0,0 +1,146 @@
1
+ # beniya v0.4.0 Release Notes
2
+
3
+ ## 🎉 Major Features & Improvements
4
+
5
+ ### 🪟 Floating Dialog System
6
+ - **New floating confirmation dialogs** for delete operations
7
+ - **Visual feedback** with red borders and warning colors for dangerous operations
8
+ - **Intuitive keyboard controls**: Y/N confirmation, ESC to cancel
9
+ - **Auto-centering** and responsive dialog sizing
10
+ - **Modern UI experience** replacing command-line prompts
11
+
12
+ ### 🗑️ Enhanced Delete Operations
13
+ - **Comprehensive error handling** with detailed error messages
14
+ - **File system verification** to ensure actual deletion before reporting success
15
+ - **Real-time result display** showing success/failure counts in floating dialogs
16
+ - **Post-deletion verification** with 10ms filesystem sync delay
17
+ - **Debug support** with `BENIYA_DEBUG=1` environment variable
18
+ - **Atomic operations** with proper rollback on partial failures
19
+
20
+ ### 🌐 English-Only Interface
21
+ - **Complete localization cleanup** - removed multi-language support
22
+ - **All UI messages converted to English**:
23
+ - `削除確認` → `Delete Confirmation`
24
+ - `移動/コピー` → `Move/Copy`
25
+ - `ファイルが見つかりません` → `File not found`
26
+ - `削除に失敗しました` → `Deletion failed`
27
+ - **Cleaner codebase** without language configuration complexity
28
+ - **Consistent English terminology** throughout the application
29
+
30
+ ### 🎨 UI/UX Improvements
31
+ - **Japanese character width calculation** for proper text rendering
32
+ - **HSL color model support** for intuitive color configuration
33
+ - **Multi-byte character handling** improvements
34
+ - **Better visual hierarchy** with color-coded operation results
35
+ - **Screen-aware positioning** for floating dialogs
36
+
37
+ ## 🔧 Technical Improvements
38
+
39
+ ### Code Quality
40
+ - **Unified code style** with single quotes throughout
41
+ - **Enhanced error handling** patterns
42
+ - **Improved file system safety** checks
43
+ - **Better separation of concerns** between UI and business logic
44
+
45
+ ### Testing & Debugging
46
+ - **New test files**:
47
+ - `test/test_floating_dialog.rb` - Floating dialog system tests
48
+ - `test/debug_delete_timing.rb` - Delete operation timing and verification tests
49
+ - **Debug logging system** with detailed operation tracking
50
+ - **Environment-based debug controls**
51
+
52
+ ### Architecture
53
+ - **Modular floating window system** (`draw_floating_window`, `clear_floating_window_area`)
54
+ - **Character width calculation utilities** (`display_width`, `pad_string_to_width`)
55
+ - **Screen positioning utilities** (`get_screen_center`)
56
+ - **Enhanced deletion workflow** with proper state management
57
+
58
+ ## 📚 Documentation Updates
59
+
60
+ ### README Improvements
61
+ - **Removed multi-language configuration** sections
62
+ - **Added detailed delete operation documentation**:
63
+ - Floating dialog workflow
64
+ - Safety features
65
+ - Error handling
66
+ - Debug support
67
+ - **Updated feature descriptions** to reflect English-only interface
68
+ - **Enhanced safety features documentation**
69
+
70
+ ### Both English and Japanese READMEs Updated
71
+ - **Consistent documentation** across languages
72
+ - **New operation workflow** diagrams
73
+ - **Comprehensive feature descriptions**
74
+ - **Updated installation and usage instructions**
75
+
76
+ ## 🛠️ Breaking Changes
77
+
78
+ ### Removed Features
79
+ - ❌ **Multi-language support** configuration removed
80
+ - ❌ **Language setting environment variables** (`BENIYA_LANG`)
81
+ - ❌ **Language configuration files** support
82
+ - ❌ **Japanese UI messages** (now English-only)
83
+
84
+ ### Configuration Changes
85
+ - 🔄 **Simplified configuration** - no more language settings required
86
+ - 🔄 **Removed language priority system**
87
+ - 🔄 **Streamlined color configuration** (HSL support added)
88
+
89
+ ## 📊 Statistics
90
+
91
+ ### Code Changes
92
+ - **+290 lines** in `lib/beniya/keybind_handler.rb` (586 → 876 lines)
93
+ - **Multiple files updated** across the codebase
94
+ - **New test files** added for quality assurance
95
+ - **Documentation updates** in both languages
96
+
97
+ ### Files Modified
98
+ - `lib/beniya/keybind_handler.rb` - Core functionality expansion
99
+ - `lib/beniya/terminal_ui.rb` - UI message updates
100
+ - `lib/beniya/file_opener.rb` - Error message localization
101
+ - `README.md` & `README_EN.md` - Documentation updates
102
+ - `test/` - New test files added
103
+
104
+ ## 🚀 Migration Guide
105
+
106
+ ### For Users
107
+ 1. **No action required** - existing installations will work seamlessly
108
+ 2. **Language settings** in config files will be ignored (no errors)
109
+ 3. **Environment variables** like `BENIYA_LANG` will have no effect
110
+ 4. **All UI will be in English** regardless of system locale
111
+
112
+ ### For Developers
113
+ 1. **Remove language-related configuration** from your setup
114
+ 2. **Update any scripts** that relied on Japanese output parsing
115
+ 3. **Use new debug environment variable**: `BENIYA_DEBUG=1`
116
+ 4. **Test with new floating dialog system**
117
+
118
+ ## 🎯 What's Next
119
+
120
+ This release establishes beniya as a modern, English-focused file manager with:
121
+ - ✅ **Consistent user experience** across all environments
122
+ - ✅ **Modern UI patterns** with floating dialogs
123
+ - ✅ **Enhanced safety** for file operations
124
+ - ✅ **Better debugging capabilities**
125
+ - ✅ **Improved maintainability** without multi-language complexity
126
+
127
+ ---
128
+
129
+ **Release Date**: 2025-01-13
130
+ **Version**: 0.4.0
131
+ **Previous Version**: 0.3.0
132
+ **Compatibility**: Ruby 2.7.0+
133
+
134
+ ## 📥 Installation
135
+
136
+ ```bash
137
+ gem install beniya --version 0.4.0
138
+ ```
139
+
140
+ ## 🐛 Bug Reports
141
+
142
+ Please report issues at: https://github.com/masisz/beniya/issues
143
+
144
+ ---
145
+
146
+ *This release represents a significant step forward in beniya's evolution, focusing on modern UI patterns, safety, and maintainability while streamlining the user experience.*
data/README.md CHANGED
@@ -19,7 +19,6 @@ beniyaは、Yaziにインスパイアされたターミナル上で動作する
19
19
  - **高度な検索機能**: fzfとrgaを使った強力な検索
20
20
  - **マルチプラットフォーム**: macOS、Linux、Windowsで動作
21
21
  - **外部エディタ連携**: お気に入りのエディタでファイルを開く
22
- - **多言語対応**: 日本語・英語インターフェース
23
22
  - **ヘルスチェック**: システム依存関係の確認機能
24
23
 
25
24
  ## インストール
@@ -130,6 +129,16 @@ beniya起動時のディレクトリが**ベースディレクトリ**として
130
129
  | **コピー** | `p` | 選択したアイテムをベースディレクトリにコピー |
131
130
  | **削除** | `x` | 選択したアイテムを削除 |
132
131
 
132
+ #### 削除操作の詳細
133
+
134
+ - **フローティングダイアログ確認**: モダンなフローティングウィンドウで明確な選択肢を表示
135
+ - **視覚的フィードバック**: 赤い枠線と警告色で注意を引く
136
+ - **安全な操作**: 削除前のダブルチェック
137
+ - **包括的エラーハンドリング**: 削除失敗時の詳細なエラーメッセージ
138
+ - **リアルタイム結果表示**: フローティングダイアログで成功/失敗数を表示
139
+ - **ファイルシステム検証**: 成功報告前に実際の削除を確認
140
+ - **デバッグサポート**: BENIYA_DEBUG=1でオプションのデバッグログ出力
141
+
133
142
  #### 操作の流れ
134
143
 
135
144
  ```
@@ -138,16 +147,18 @@ beniya起動時のディレクトリが**ベースディレクトリ**として
138
147
  - m → ベースディレクトリに移動
139
148
  - p → ベースディレクトリにコピー
140
149
  - x → 削除
141
- 3. y/n確認ダイアログで実行/キャンセル
142
- 4. 結果表示 → 処理結果を確認
150
+ 3. フローティングダイアログY/Nで確認、ESCでキャンセル
151
+ 4. 結果表示 → フローティングウィンドウで操作結果を確認
143
152
  ```
144
153
 
145
154
  #### 安全機能
146
155
 
147
- - **確認ダイアログ**: 移動・コピー・削除前に必ず確認
156
+ - **フローティング確認ダイアログ**: 確認用のモダンなフローティングウィンドウインターフェース
157
+ - **視覚警告システム**: 危険な操作時の赤い枠線と警告色
148
158
  - **重複チェック**: 同名ファイルがある場合は自動でスキップ
149
159
  - **エラーハンドリング**: 権限不足などのエラーに適切に対応
150
- - **操作ログ**: 処理結果を詳細に表示
160
+ - **操作ログ**: フローティングダイアログで処理結果を詳細表示
161
+ - **削除後検証**: ファイルシステムから実際に削除されたことを確認
151
162
 
152
163
  ### フィルター機能の詳細
153
164
 
@@ -204,39 +215,6 @@ apt install fzf
204
215
 
205
216
  ## 設定
206
217
 
207
- ### 言語設定
208
-
209
- beniyaは多言語対応しています。言語は以下の方法で設定できます:
210
-
211
- #### 環境変数(推奨)
212
-
213
- ```bash
214
- # 日本語
215
- export BENIYA_LANG=ja
216
-
217
- # 英語(デフォルト)
218
- export BENIYA_LANG=en
219
- ```
220
-
221
- #### 設定ファイル
222
-
223
- ```bash
224
- # 設定ディレクトリを作成
225
- mkdir -p ~/.config/beniya
226
-
227
- # 設定例をコピー
228
- cp config_example.rb ~/.config/beniya/config.rb
229
-
230
- # 設定ファイルを編集
231
- # 日本語の場合は LANGUAGE = 'ja'、英語の場合は LANGUAGE = 'en' を設定
232
- ```
233
-
234
- ### 優先順位
235
-
236
- 1. 設定ファイル(`~/.config/beniya/config.rb`)
237
- 2. `BENIYA_LANG`環境変数
238
- 3. デフォルト(英語)
239
-
240
218
  ### 色設定(カスタマイズ)
241
219
 
242
220
  beniyaではファイルタイプや UI 要素の色をカスタマイズできます。HSLカラーモデルによる直感的な色指定をサポートしています。
data/README_EN.md CHANGED
@@ -19,7 +19,7 @@ beniya is a terminal-based file manager inspired by Yazi. It's implemented in Ru
19
19
  - **Advanced Search**: Powerful search using fzf and rga
20
20
  - **Multi-platform**: Runs on macOS, Linux, and Windows
21
21
  - **External Editor Integration**: Open files with your favorite editor
22
- - **Multi-language Support**: English and Japanese interface
22
+ - **English Interface**: Clean English interface
23
23
  - **Health Check**: System dependency verification
24
24
 
25
25
  ## Installation
@@ -130,6 +130,16 @@ The directory where beniya starts becomes the **base directory**, which serves a
130
130
  | **Copy** | `p` | Copy selected items to base directory |
131
131
  | **Delete** | `x` | Delete selected items |
132
132
 
133
+ #### Delete Operation Details
134
+
135
+ - **Floating Dialog Confirmation**: Modern floating window with clear options
136
+ - **Visual Feedback**: Red border and warning colors for attention
137
+ - **Safe Operation**: Double confirmation before deletion
138
+ - **Comprehensive Error Handling**: Detailed error messages for failed deletions
139
+ - **Real-time Result Display**: Shows success/failure count in floating dialog
140
+ - **File System Verification**: Confirms actual deletion before reporting success
141
+ - **Debug Support**: Optional debug logging with BENIYA_DEBUG=1
142
+
133
143
  #### Operation Workflow
134
144
 
135
145
  ```
@@ -138,16 +148,18 @@ The directory where beniya starts becomes the **base directory**, which serves a
138
148
  - m → Move to base directory
139
149
  - p → Copy to base directory
140
150
  - x → Delete
141
- 3. y/n → Confirm or cancel in confirmation dialog
142
- 4. Result Display → Review operation results
151
+ 3. Floating Dialog → Confirm with Y/N, ESC to cancel
152
+ 4. Result Display → Review operation results in floating window
143
153
  ```
144
154
 
145
155
  #### Safety Features
146
156
 
147
- - **Confirmation Dialog**: Always confirm before move/copy/delete operations
157
+ - **Floating Confirmation Dialog**: Modern floating window interface for confirmations
158
+ - **Visual Warning System**: Red borders and colors for dangerous operations
148
159
  - **Duplicate Check**: Automatically skip files with same names
149
160
  - **Error Handling**: Proper handling of permission errors and other issues
150
- - **Operation Log**: Detailed display of operation results
161
+ - **Operation Log**: Detailed display of operation results in floating dialogs
162
+ - **Post-deletion Verification**: Confirms files are actually deleted from filesystem
151
163
 
152
164
  ### Filter Feature
153
165
 
@@ -204,39 +216,6 @@ apt install fzf
204
216
 
205
217
  ## Configuration
206
218
 
207
- ### Language Settings
208
-
209
- beniya supports multiple languages. You can configure the language in several ways:
210
-
211
- #### Environment Variable (Recommended)
212
-
213
- ```bash
214
- # Japanese
215
- export BENIYA_LANG=ja
216
-
217
- # English (default)
218
- export BENIYA_LANG=en
219
- ```
220
-
221
- #### Configuration File
222
-
223
- ```bash
224
- # Create config directory
225
- mkdir -p ~/.config/beniya
226
-
227
- # Copy example config
228
- cp config_example.rb ~/.config/beniya/config.rb
229
-
230
- # Edit the config file
231
- # Set LANGUAGE = 'ja' for Japanese or LANGUAGE = 'en' for English
232
- ```
233
-
234
- ### Priority Order
235
-
236
- 1. Configuration file (`~/.config/beniya/config.rb`)
237
- 2. `BENIYA_LANG` environment variable
238
- 3. Default (English)
239
-
240
219
  ### Color Configuration (Customization)
241
220
 
242
221
  beniya allows you to customize colors for file types and UI elements. It supports intuitive color specification using the HSL color model.
@@ -66,7 +66,7 @@ module Beniya
66
66
  end
67
67
  end
68
68
  rescue StandardError => e
69
- warn "ファイルを開けませんでした: #{e.message}"
69
+ warn "Failed to open file: #{e.message}"
70
70
  false
71
71
  end
72
72
 
@@ -105,7 +105,7 @@ module Beniya
105
105
  end
106
106
  end
107
107
  rescue StandardError => e
108
- warn "ファイルを開けませんでした: #{e.message}"
108
+ warn "Failed to open file: #{e.message}"
109
109
  false
110
110
  end
111
111
 
@@ -132,7 +132,7 @@ module Beniya
132
132
  system("xdg-open #{quoted_path}")
133
133
  end
134
134
  rescue StandardError => e
135
- warn "ディレクトリを開けませんでした: #{e.message}"
135
+ warn "Failed to open directory: #{e.message}"
136
136
  false
137
137
  end
138
138
  end