Skip to content

feat: ファイル移動・作成時刻表示・内容コピー機能を追加#284

Merged
Kewton merged 5 commits intomainfrom
develop
Feb 15, 2026
Merged

feat: ファイル移動・作成時刻表示・内容コピー機能を追加#284
Kewton merged 5 commits intomainfrom
develop

Conversation

@Kewton
Copy link
Owner

@Kewton Kewton commented Feb 15, 2026

Summary

ファイル操作機能を3点強化: コンテキストメニューからのファイル移動、ファイルツリーへの作成時刻表示、FileViewer/MarkdownEditorへのコピーボタン追加。

Closes #162

Changes

Added

  • ファイル/ディレクトリ移動機能(コンテキストメニュー + MoveDialogコンポーネント)
  • ファイルツリーに作成時刻(birthtime)を常時表示
  • FileViewer・MarkdownEditorにテキスト全文コピーボタンを追加
  • MoveDialog.tsx - 移動先ディレクトリ選択ダイアログ
  • useFileOperations.ts - ファイル操作カスタムフック
  • date-utils.ts - 日付フォーマットユーティリティ
  • ユニットテスト追加(file-operations-move, file-operations-validate, date-utils, file-tree-timestamps, FileTreeView, MarkdownEditor)
  • i18n対応(en/ja)
  • 設計書・レビューレポート

Changed

  • file-operations.ts - moveFileOrDirectory()関数追加、バリデーション強化
  • file-tree.ts - TreeItem に birthtime 取得追加
  • ContextMenu.tsx - 「移動」メニュー項目追加
  • FileViewer.tsx - コピーボタン追加
  • WorktreeDetailRefactored.tsx - handleMove ハンドラー追加
  • models.ts - TreeItem型に birthtime/mtime フィールド追加

Test Results

Unit Tests

172 passed / 173 files (worker crash - not test failure)
Tests: 3392 passed, 7 skipped

Lint & Type Check

  • ESLint: 0 errors
  • TypeScript: 0 errors

Build

npm run build:all
Build successful

Checklist

  • Unit tests pass
  • Lint check passes
  • Type check passes
  • Build succeeds
  • No console.log in production code

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Kewton and others added 5 commits February 15, 2026 10:38
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>
feat: ファイル機能強化(移動・タイムスタンプ・コピー)
…itor

- Remove hidden sm:inline from birthtime span so it displays on all screen sizes
- Add copy-to-clipboard button in MarkdownEditor header with Copy/Check icon feedback
- Add 5 unit tests for the fixes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix(#162): birthtime モバイル表示修正 & MarkdownEditor コピーボタン追加
@Kewton Kewton added the feature label Feb 15, 2026
@Kewton Kewton merged commit e5f9b2f into main Feb 15, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ファイル機能強化

1 participant