-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiffnote.txt
More file actions
95 lines (80 loc) · 5.4 KB
/
diffnote.txt
File metadata and controls
95 lines (80 loc) · 5.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
## core/backends/gio/backend.py [+143 -~40]
- FEAT: Add GIOBackend.runnable tracking with mutex for JIT conflict resolution
- FEAT: Add resolve_conflict() method to inject resolutions into paused workers
- FEAT: Add get_metadata() for single path FileMetadata queries
- FEAT: Add query_children_metadata() for bulk directory scanning
- FEAT: Add get_capabilities() returning BackendCapabilities (locality, latency, reliability)
- FEAT: Add _info_to_metadata() helper mapping GIO FileInfo to FileMetadata
- REFACTOR: Remove deprecated is_directory/is_symlink/is_regular_file methods (replaced by get_metadata)
- REFACTOR: Rename return type hint to InversePayload (forward reference)
## core/backends/gio/io_ops.py [+234 -~50]
- FEAT: Add ConflictEncountered exception for non-blocking conflict signaling
- FEAT: Add JIT synchronization (QMutex + QWaitCondition) for pause/resume conflict handling
- FEAT: Add resolve() method to receive UI resolutions from TransactionManager
- FEAT: Add wait_for_resolution() to pause worker thread and emit operationError signal
- FEAT: Integrate TransferPolicy.decide() into BatchTransferRunnable._perform_single_transfer()
- FEAT: Add non-blocking conflict flow - raises ConflictEncountered, catches in loop, continues to next file
- FEAT: Add TOCTOU race handling in BatchTransferRunnable (line ~404) - re-query policy on EXISTS error
- FEAT: Add TOCTOU race handling in TransferRunnable (line ~673) - re-query policy on EXISTS error
- FEAT: Add policy parameter and job_id parameter to _perform_single_transfer()
- REFACTOR: Move _info_to_metadata() to base GIOOperationRunnable
## core/interfaces/io_backend.py [+59]
- NEW: Add FileMetadata TypedDict (size, mtime, is_dir, is_symlink)
- NEW: Add BackendCapabilities TypedDict (locality, latency_profile, supports_preflight, etc.)
- NEW: Add get_metadata() abstract method
- NEW: Add query_children_metadata() abstract method
- NEW: Add get_capabilities() abstract method
- NEW: Add resolve_conflict() abstract method
- REFACTOR: Implement query_exists/is_directory/is_symlink/is_regular_file using get_metadata
## core/transaction_manager.py [+~150 -~80]
- FEAT: Add getTransferCapabilities() to merge source/dest backend capabilities
- FEAT: Add policy parameter to executeBatchTransfer()
- FEAT: Add skip_preflight param for direct JIT execution
- FEAT: Add _transaction_policies dict to store per-TID policies
- FEAT: Add _batch_ledger dict to track conflicted job_ids per transaction
- FEAT: Add "Deferred" retry - when worker already moved on, starts fresh job after resolution
- FEAT: addOperation now checks for existing PENDING operation to reuse (for retries)
- FEAT: resolveConflict() now supports apply_to_all param and handles both paused/non-paused threads
- REFACTOR: Simplified resolveConflict() - delegates to FileOps.resolve_conflict() first
- REFACTOR: Legacy retry logic kept only for "restore" operations
- REFACTOR: executeBatchTransfer() now passes policy through to assessBatch/transfer_batch
## core/models/file_job.py [+7]
- FEAT: Add policy field (SyncPolicy | None) to FileJob dataclass
- FEAT: Add batchConflictEncountered signal to FileOperationSignals (tid, job_id, src, dest, conflict_data)
## core/logic/transfer_policy.py [NEW FILE]
- NEW: Add ConflictResolution StrEnum (PROMPT, OVERWRITE, SKIP, RENAME, UPDATE)
- NEW: Add SyncPolicy TypedDict for transfer configuration
- NEW: Add TransferPolicy class with DEFAULT_POLICY, BACKUP_POLICY
- NEW: Add TransferPolicy.decide() - stateless conflict decision engine
## ui/bridges/app_bridge.py [-244 +63]
- REFACTOR: Split into delegated sub-bridges (search, rename, drag, navigation)
- DELETION: Removed getThumbnailPath() (deprecated), startDrag() (now in DragBridge)
- DELETION: Removed handleDrop() (now in DragBridge), openPath() (now in NavigationBridge)
- DELETION: Removed renameFile() (now in RenameBridge), paste() (removed reference)
- DELETION: Removed zoom() (now in NavigationBridge), targetCellWidth property
## ui/bridges/search_bridge.py [NEW FILE]
- NEW: Extract search functionality from AppBridge
## ui/bridges/rename_bridge.py [NEW FILE]
- NEW: Extract rename functionality from AppBridge (background assessment)
## ui/bridges/drag_bridge.py [NEW FILE]
- NEW: Extract drag/drop functionality from AppBridge
## ui/bridges/navigation_bridge.py [NEW FILE]
- NEW: Extract navigation/zoom/cut-paths from AppBridge
## ui/qml/components/Sidebar.qml [+68]
- FEAT: Add gridItemSize property with shrink/grow buttons
- FEAT: Add currentSelectionIdentifier for non-path items (mounts)
- FEAT: Add adjustGridSize() function with bounds (24-60px, 12px steps)
- FEAT: Dynamic sizing: icon pixelSize = gridItemSize * 0.37, label = 60% of app font
- FEAT: Dynamic spacing: radius = gridItemSize/5, spacing = gridItemSize * 0.03
- FEAT: Mount handling now navigates to path after mount completes
## ui/qml/components/SidebarItem.qml [+~92 -~20]
- REFACTOR: Similar dynamic sizing adaptations for sidebar items
## ui/main_window.py [+6 -2]
- MINOR: Likely adapter changes for new bridge structure
## ui/managers/file_manager.py [+22]
- MINOR: Likely adapter for new bridge structure
## DELETIONS
- core/backends/backends_context.md: Documentation file deleted
- ui/managers/navigation_manager.py: Replaced by NavigationBridge
- ui/qml/components/Sidebar_Legacy.qml: Legacy component removed
- ui/widgets/: Entire directory deleted (7 files: __init__, custom_header, drag_helper, navigation_bar, progress_overlay, status_bar, widgets_context.md)