|
2 | 2 |
|
3 | 3 | ## Summary |
4 | 4 |
|
5 | | -**Status:** v0.2.0 released with feature parity across implementations |
6 | | -**Critical Issues:** 1 (sync data loss) |
7 | | -**Pending Enhancements:** 4 (prune, cd, single-file patch, fzf improvements) |
| 5 | +**Status:** v0.2.1 released with prune command and sync fixes |
| 6 | +**Critical Issues:** 0 (all P0 issues resolved) |
| 7 | +**Pending Enhancements:** 3 (cd refactor, single-file patch, fzf improvements) |
8 | 8 |
|
9 | 9 | ## Core Implementation Status |
10 | 10 |
|
|
61 | 61 | - [ ] **Improve interactive `fzf` selection** in native implementations - Better UI, preview panes, multi-select for batch operations. |
62 | 62 | - **Effort:** 3-5 hours |
63 | 63 |
|
| 64 | +### P3: Low Priority (UX Improvements) |
| 65 | + |
| 66 | +- [ ] **Context-aware `cross diff` command** - Smart diff behavior based on current working directory |
| 67 | + - **Issue:** Currently `cross diff` shows diffs for ALL patches regardless of PWD |
| 68 | + - **Desired Behavior:** |
| 69 | + - When executed inside a patched local_path: Show diff only for that specific patch |
| 70 | + - When executed outside any patch (anywhere in repo): Show diffs for all patches |
| 71 | + - When given explicit path argument: Show diff for that specific patch with informative header |
| 72 | + - **Effort:** 4-6 hours (includes complexity analysis and implementation) |
| 73 | + - **Files:** `Justfile.cross`, `src-go/main.go`, `src-rust/src/main.rs`, `test/016_diff_context.sh` |
| 74 | + - **Complexity Analysis Required:** |
| 75 | + - **Current Implementation:** |
| 76 | + - Justfile: Uses `_resolve_context2` to resolve patch from path/PWD (lines 578-592) |
| 77 | + - Go: Iterates all patches, filters by explicit path arg only (lines 880-911) |
| 78 | + - Rust: Same as Go - no PWD detection (lines 1194-1214) |
| 79 | + - **Required Changes:** |
| 80 | + - **Low complexity** for Justfile (already has PWD resolution via `_resolve_context2`) |
| 81 | + - **Medium complexity** for Go/Rust (need to add PWD detection logic) |
| 82 | + - Need to add: Get PWD → Check if inside patch → Filter patches accordingly |
| 83 | + - **Implementation Strategy:** |
| 84 | + 1. Detect current working directory relative to repo root |
| 85 | + 2. Check if CWD is within any patch's local_path |
| 86 | + 3. Filter patches based on context: |
| 87 | + - If inside patch + no explicit arg → show only that patch |
| 88 | + - If outside patches + no explicit arg → show all patches |
| 89 | + - If explicit arg provided → show only that patch (current behavior) |
| 90 | + 4. Add informative header: "Diff for patch: {local_path}" when contextual |
| 91 | + - **Impact Assessment:** |
| 92 | + - **User Experience:** HIGH - More intuitive, reduces noise |
| 93 | + - **Breaking Changes:** NONE - Backwards compatible (explicit args work same) |
| 94 | + - **Code Complexity:** LOW to MEDIUM |
| 95 | + - Justfile: ~10-15 lines (reuse existing `_resolve_context2`) |
| 96 | + - Go: ~20-30 lines (add `getCurrentPath()` helper) |
| 97 | + - Rust: ~20-30 lines (add `get_current_path()` helper) |
| 98 | + - **Testing:** MEDIUM - Need scenarios for: |
| 99 | + 1. Diff from inside patch (should show only that patch) |
| 100 | + 2. Diff from outside patches (should show all) |
| 101 | + 3. Diff with explicit arg (should show specified patch) |
| 102 | + 4. Diff from nested subdirectory within patch (should resolve parent patch) |
| 103 | + - **Edge Cases:** |
| 104 | + - CWD inside nested subdirectory of patch (needs parent resolution) |
| 105 | + - Multiple patches in nested directories (resolve closest parent) |
| 106 | + - Symlinked directories (should follow symlinks) |
| 107 | + - **Priority Rationale:** Low priority - UX improvement, not a bug |
| 108 | + - **Status:** Documented for future implementation |
| 109 | + |
| 110 | +- [ ] **Add `cross cd` to local_path capability** - Currently only changes to worktree |
| 111 | + - **Issue:** `cross cd` currently opens a shell in the WORKTREE (hidden `.git/cross/worktrees/`) |
| 112 | + - **Desired Behavior:** |
| 113 | + - Provide ability to change directory to LOCAL_PATH (the actual patched directory in main repo) |
| 114 | + - Options: |
| 115 | + 1. Add `--local` flag: `cross cd --local [patch]` → changes to local_path |
| 116 | + 2. Add separate command: `cross path [patch]` → outputs local_path for use with shell `cd $(cross path patch)` |
| 117 | + 3. Make `cd` default to local_path, add `--worktree` flag for old behavior |
| 118 | + - **Current Implementation:** |
| 119 | + - Justfile (lines 761-797): `cd` target opens shell in worktree directory |
| 120 | + - Go (lines 681-730): Same behavior - opens shell in worktree |
| 121 | + - Rust: Similar behavior |
| 122 | + - **Effort:** 2-3 hours |
| 123 | + - **Files:** `Justfile.cross`, `src-go/main.go`, `src-rust/src/main.rs`, `test/017_cd_local.sh` |
| 124 | + - **Complexity:** LOW - Just need to add path resolution and output logic |
| 125 | + - **Impact:** MEDIUM - Improves workflow for users editing patched files |
| 126 | + - **Priority Rationale:** Low priority - workaround exists (manually navigate to patch), but UX improvement |
| 127 | + - **Status:** Not yet implemented, documented for future consideration |
| 128 | + |
64 | 129 | ### Completed Enhancements |
65 | 130 |
|
66 | 131 | ## Known Issues (To FIX) |
|
0 commit comments