Conversation
Apply refactoring to improve overall code maintainability and robustness of Issue #162 file enhancement features. Improvements: - [DRY-003] Extract mapFsError() helper in file-operations.ts to eliminate 6 duplicated Node.js error-to-result mapping blocks - [SRP] Extract findNodeByPath() from MoveDialog inline function - Edge case: formatRelativeTime() now handles invalid date strings gracefully (returns empty string instead of throwing) - [PERF] Add useMemo for canCopy in FileViewer to avoid recalculation on every render - Enrich JSDoc across all target files (date-utils, file-operations, MoveDialog, useFileOperations, FileViewer, FileTreeView) - Add 2 new edge-case tests for invalid date handling Quality Metrics: - Tests: 3387 passed (3385 -> 3387, +2 edge case tests) - ESLint errors: 0 - TypeScript errors: 0 Refs #162 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add moveFileOrDirectory() with 5 security layers (SEC-005~009) - Add MoveDialog directory tree browser and useFileOperations hook - Add birthtime display in FileTreeView with locale-aware formatting - Add copy button in FileViewer with icon toggle feedback - Add i18n support (en/ja) for all new UI elements - Add 45 unit tests for new functionality - Update documentation (CLAUDE.md, README.md) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
ファイル移動機能
moveFileOrDirectory()をfile-operations.tsに追加(SEC-005〜009の5層セキュリティ)/api/worktrees/[id]/files/[...path]にaction: "move"を追加MoveDialog.tsxディレクトリツリーブラウザダイアログuseFileOperations.tsファイル操作状態管理フックContextMenu.tsxに「移動」メニュー項目追加ファイル作成時刻表示
TreeItemにbirthtimeフィールド追加readDirectory()でstat().birthtimeを取得date-utils.tsのformatRelativeTime()でロケール対応の相対時刻表示FileTreeView.tsxに時刻表示を追加ファイル内容コピー
FileViewer.tsxにコピーボタン追加(Copy → Check アイコン切替フィードバック)copyToClipboard()を活用その他
Test plan
Closes #162
🤖 Generated with Claude Code