|
52 | 52 | - **Status:** COMPLETE - Ready for v0.2.1 release |
53 | 53 |
|
54 | 54 | ### P2: Lower Priority |
55 | | -- [ ] **Refactor `cross cd`** - Target local patched folder (not worktree) and output path (no subshell), supporting fzf |
56 | | - - **Issue:** Currently `cross cd` changes to WORKTREE directory (`.git/cross/worktrees/`), which is incorrect |
| 55 | +- [ ] **Fix `cross cd` command** - Should target local_path, not worktree |
| 56 | + - **Issue:** Currently `cross cd` changes to WORKTREE directory (`.git/cross/worktrees/`), but it should change to LOCAL_PATH |
| 57 | + - **Design Intent:** |
| 58 | + - `cross wt [path]` → changes to WORKTREE (`.git/cross/worktrees/`) - for working with git history |
| 59 | + - `cross cd [path]` → changes to LOCAL_PATH (patched directory in main repo) - for editing files |
| 60 | + - These are **separate commands with different purposes**, not one command with flags |
| 61 | + - **Current Bug:** |
| 62 | + - `cross cd` is doing what `wt` should do (going to worktree) |
| 63 | + - `cross cd` needs to be fixed to target local_path instead |
57 | 64 | - **Desired Behavior:** |
58 | | - - `cross cd [path]` → changes to LOCAL_PATH (the actual patched directory in main repo) |
59 | | - - `cross cd` (no args) → uses fzf to list and select from local_paths (same as `wt` command implementation) |
| 65 | + - `cross cd [path]` → outputs LOCAL_PATH for the patch |
| 66 | + - `cross cd` (no args) → uses fzf to list and select from local_paths |
60 | 67 | - Output path only (no subshell) → Enable pattern: `cd $(cross cd <patch>)` |
61 | 68 | - **Current Implementation:** |
62 | | - - Justfile (lines 761-797): Opens shell in worktree directory (WRONG) |
63 | | - - Go (lines 681-730): Opens shell in worktree directory (WRONG) |
64 | | - - Rust: Same behavior (WRONG) |
65 | | - - `wt` command: Already has fzf selection working correctly - can reuse this pattern |
| 69 | + - Justfile (lines 761-797): Goes to worktree (WRONG - should go to local_path) |
| 70 | + - Go (lines 681-730): Goes to worktree (WRONG - should go to local_path) |
| 71 | + - Rust: Same behavior (WRONG - should go to local_path) |
| 72 | + - `wt` command: Correctly goes to worktree - can reuse fzf pattern for `cd` |
66 | 73 | - **Required Changes:** |
67 | | - - Change target from worktree_path to local_path |
68 | | - - Add fzf selection when no path provided (reuse from `wt` command) |
| 74 | + - Change `cd` command target from worktree_path to local_path |
| 75 | + - Keep `wt` command as-is (it's correct) |
| 76 | + - Add fzf selection to `cd` when no path provided (reuse from `wt`) |
69 | 77 | - Output path string instead of opening subshell |
70 | 78 | - **Effort:** 2-3 hours |
71 | | - - **Files:** `Justfile.cross`, `src-go/main.go`, `src-rust/src/main.rs`, `test/017_cd_refactor.sh` |
72 | | - - **Impact:** HIGH - Fixes incorrect behavior, improves UX significantly |
73 | | - - **Status:** Not yet implemented - current behavior is incorrect |
| 79 | + - **Files:** `Justfile.cross`, `src-go/main.go`, `src-rust/src/main.rs`, `test/017_cd_fix.sh` |
| 80 | + - **Impact:** HIGH - Fixes incorrect behavior, makes commands work as designed |
| 81 | + - **Status:** Not yet implemented - current behavior is buggy |
74 | 82 |
|
75 | 83 | - [ ] **Single file patch capability** - Review and propose implementation (tool and test) to be able to patch even single file. If not easily possible without major refactoring, evaluate new command "patch-file". |
76 | 84 | - **Effort:** 4-6 hours (includes research) |
|
124 | 132 | - **Priority Rationale:** Low priority - UX improvement, not a bug |
125 | 133 | - **Status:** Documented for future implementation |
126 | 134 |
|
127 | | -- [ ] **Add `cross cd` to local_path capability** - Currently only changes to worktree |
128 | | - - **Issue:** `cross cd` currently opens a shell in the WORKTREE (hidden `.git/cross/worktrees/`) |
129 | | - - **Desired Behavior:** |
130 | | - - Provide ability to change directory to LOCAL_PATH (the actual patched directory in main repo) |
131 | | - - Options: |
132 | | - 1. Add `--local` flag: `cross cd --local [patch]` → changes to local_path |
133 | | - 2. Add separate command: `cross path [patch]` → outputs local_path for use with shell `cd $(cross path patch)` |
134 | | - 3. Make `cd` default to local_path, add `--worktree` flag for old behavior (covered in P2 refactor) |
135 | | - - **Current Implementation:** |
136 | | - - Justfile (lines 761-797): `cd` target opens shell in worktree directory |
137 | | - - Go (lines 681-730): Same behavior - opens shell in worktree |
138 | | - - Rust: Similar behavior |
139 | | - - **Relationship to P2 Task:** |
140 | | - - P2 refactor will change default behavior to local_path |
141 | | - - This task documents alternative approaches (flags, separate command) |
142 | | - - May be resolved by P2 implementation or kept as additional options |
143 | | - - **Effort:** 2-3 hours |
144 | | - - **Files:** `Justfile.cross`, `src-go/main.go`, `src-rust/src/main.rs`, `test/017_cd_local.sh` |
145 | | - - **Complexity:** LOW - Add path resolution and output logic |
146 | | - - **Impact:** MEDIUM - Improves workflow for users editing patched files |
147 | | - - **Priority Rationale:** Low priority - workaround exists (manually navigate to patch), P2 refactor may address this |
148 | | - - **Status:** Not yet implemented, may be covered by P2 refactor |
149 | | - |
150 | 135 | ### Completed Enhancements |
151 | 136 |
|
152 | 137 | ## Known Issues (To FIX) |
|
0 commit comments