|
5 | 5 |
|
6 | 6 | ## Issue Analysis: 2025-06-22 |
7 | 7 |
|
8 | | -### [enhancement-completed] Script simplification and trace syntax fixes |
| 8 | +### [enhancement-completed] Script simplification |
9 | 9 |
|
10 | 10 | **Problems Fixed**: |
11 | 11 |
|
12 | | -1. **Inconsistent claude-trace syntax**: Fixed local mode missing "claude" command |
13 | | - - Local: `claude-trace --run-with claude .` (was missing "claude") |
14 | | - - Docker: `claude-trace --run-with .` → properly transforms to `--run-with claude --dangerously-skip-permissions .` |
15 | | - |
16 | | -2. **USE_NONROOT complexity eliminated**: Removed 50+ lines of unnecessary code |
| 12 | +1. **USE_NONROOT complexity eliminated**: Removed 50+ lines of unnecessary code |
17 | 13 | - Always run as claude user (was already default behavior) |
18 | 14 | - Removed dead root mode code path from docker-entrypoint.sh |
19 | 15 | - Simplified UID/GID mapping logic |
20 | 16 |
|
21 | 17 | **Results**: |
22 | 18 | - ✅ Consistent trace syntax between local and Docker modes |
23 | 19 | - ✅ 50+ lines removed from docker-entrypoint.sh |
24 | | -- ✅ Cleaner, more maintainable codebase |
25 | 20 | - ✅ Always run as claude user for security and simplicity |
26 | 21 |
|
27 | 22 | **Status**: ✅ **COMPLETED** |
|
30 | 25 |
|
31 | 26 | ## Issue Analysis: 2025-06-22 |
32 | 27 |
|
| 28 | +### [bug-fixed] Incorrect Claude CLI usage with redundant '.' directory argument |
| 29 | + |
| 30 | +**Problem**: Throughout the codebase, Claude CLI was being used incorrectly with '.' as a directory argument. |
| 31 | + |
| 32 | +**Root Cause**: Claude CLI doesn't take a directory argument. According to `claude --help`, Claude: |
| 33 | +- Starts an interactive session by default |
| 34 | +- Automatically works in the current working directory |
| 35 | +- Takes `[prompt]` as an optional argument, not a directory path |
| 36 | + |
| 37 | +**Issues Fixed**: |
| 38 | +- `claude .` → `claude` (the '.' was being passed as a prompt, not a directory) |
| 39 | +- `claude-yolo .` → `claude-yolo` (no directory argument needed) |
| 40 | +- All help text examples showing incorrect usage patterns |
| 41 | + |
| 42 | +**Files Updated**: |
| 43 | +- **claude.sh**: Fixed 11 examples in help text |
| 44 | +- **claude-yolo**: Fixed 4 examples in help text |
| 45 | +- **All documentation**: Will need updating (README.md, CLAUDE.md, install.sh) |
| 46 | + |
| 47 | +**Impact**: This explains why `--trace .` was showing version info instead of starting interactive mode - the '.' was being interpreted as a prompt argument to Claude. |
| 48 | + |
| 49 | +**Status**: ✅ **COMPLETED** - Help text fixed, documentation needs updating |
| 50 | + |
| 51 | +## Issue Analysis: 2025-06-22 |
| 52 | + |
| 53 | +### [enhancement-completed] Improved docker-entrypoint.sh environment detection |
| 54 | + |
| 55 | +**Problem**: docker-entrypoint.sh incorrectly classified Dockerfile-installed files as "user-mounted" and provided poor environment information. |
| 56 | + |
| 57 | +**Issues Fixed**: |
| 58 | +1. **Incorrect file classification**: `.oh-my-zsh`, `.zshrc`, `.local`, etc. marked as "user-mounted" when installed by Dockerfile |
| 59 | +2. **Poor environment detection**: Basic tool versions without context or organization |
| 60 | +3. **Verbose logging noise**: All container-installed files logged as if user-mounted |
| 61 | +4. **Missing tool information**: No detection of AWS CLI, GitHub CLI, Docker, etc. installed in container |
| 62 | + |
| 63 | +**Solution Implemented**: |
| 64 | +- **Smart file classification**: Distinguish Dockerfile-installed vs user-mounted files |
| 65 | +- **Enhanced environment detection**: Show all development tools from Dockerfile (Python, Node.js, Go, Rust, AWS CLI, GitHub CLI, Docker) |
| 66 | +- **Organized verbose output**: Categorized sections for Tools, Authentication, Configuration |
| 67 | +- **Appropriate logging levels**: Container-installed files use `log_verbose`, user-mounted use `log_entrypoint` |
| 68 | + |
| 69 | +**Technical Implementation**: |
| 70 | +- Updated file classification in `/root/*` handling with explicit categories |
| 71 | +- Enhanced `show_environment_info()` with structured tool detection |
| 72 | +- Added authentication status detection (AWS, GCloud, GitHub tokens) |
| 73 | +- Improved verbose logging organization with clear sections |
| 74 | + |
| 75 | +**Results**: |
| 76 | +- ✅ **Accurate classification**: Container vs user-mounted files properly identified |
| 77 | +- ✅ **Comprehensive tool info**: All Dockerfile-installed tools detected and versioned |
| 78 | +- ✅ **Clean verbose output**: Organized sections with relevant information |
| 79 | +- ✅ **Reduced noise**: Container-installed files no longer logged as "user-mounted" |
| 80 | + |
| 81 | +**Status**: ✅ **COMPLETED** |
| 82 | + |
| 83 | +--- |
| 84 | + |
| 85 | +## Issue Analysis: 2025-06-22 |
| 86 | + |
| 87 | +### [enhancement-completed] Unified logging system implementation |
| 88 | + |
| 89 | +**Problem**: Inconsistent logging patterns scattered throughout claude.sh and docker-entrypoint.sh with mixed approaches to verbosity control. |
| 90 | + |
| 91 | +**Issues Fixed**: |
| 92 | +1. **Inconsistent patterns**: Mix of `[ "$QUIET" != true ] && echo`, `[ "$VERBOSE" = true ] && echo`, direct echo |
| 93 | +2. **Duplicate logic**: Repeated verbosity checks throughout both scripts |
| 94 | +3. **Poor maintainability**: No centralized logging functions |
| 95 | +4. **Inconsistent stderr usage**: Some logs to stdout, others to stderr |
| 96 | + |
| 97 | +**Solution Implemented**: |
| 98 | +- **Unified logging functions**: `log_info()`, `log_verbose()`, `log_error()`, `log_warn()` |
| 99 | +- **Specialized functions**: `log_auth()`, `log_model()`, `log_proxy()`, `log_entrypoint()` |
| 100 | +- **Consistent stderr routing**: All logs go to stderr, keeping stdout clean |
| 101 | +- **Centralized flag handling**: Single point of verbosity control per script |
| 102 | + |
| 103 | +**Technical Implementation**: |
| 104 | +- Added 6 core logging functions to both scripts |
| 105 | +- Migrated 33+ logging patterns in claude.sh to unified system |
| 106 | +- Migrated 20+ logging patterns in docker-entrypoint.sh with argument-based detection |
| 107 | +- Updated documentation across README.md, CLAUDE.md, CHANGELOG.md |
| 108 | +- Maintained backward compatibility |
| 109 | + |
| 110 | +**Results**: |
| 111 | +- ✅ **Consistent API**: All logging through standardized functions |
| 112 | +- ✅ **Clean migration**: Drop-in replacements for existing patterns |
| 113 | +- ✅ **Proper flag handling**: Centralized QUIET/VERBOSE logic |
| 114 | +- ✅ **Maintainable code**: Eliminated duplicate logging logic |
| 115 | +- ✅ **Enhanced UX**: Clean, controllable output at all verbosity levels |
| 116 | + |
| 117 | +**Status**: ✅ **COMPLETED** |
| 118 | + |
| 119 | +--- |
| 120 | + |
| 121 | +## Issue Analysis: 2025-06-22 |
| 122 | + |
| 123 | +### [enhancement-completed] Clean up version and startup message verbosity |
| 124 | + |
| 125 | +**Problem**: Current --version and startup messages are excessively verbose, poor UX. |
| 126 | + |
| 127 | +**Issues Fixed**: |
| 128 | +1. **--version chaos**: Shows full container startup + environment info + linking messages |
| 129 | +2. **Startup noise**: 30+ lines of environment info, entrypoint messages, linking details |
| 130 | +3. **Poor expectations**: Users expect clean, fast version info |
| 131 | + |
| 132 | +**Solution Implemented**: |
| 133 | +- **--version**: Clean local version only ("Claude Code YOLO v0.2.0") |
| 134 | +- **--version --verbose**: Extended info including Claude CLI version via container check |
| 135 | +- **Startup**: Two-line summary with key info: |
| 136 | + ``` |
| 137 | + Claude Code YOLO v0.2.0 | Auth: OAuth | Working: /path/to/project |
| 138 | + Container: claude-code-yolo-myproject-12345 |
| 139 | + ``` |
| 140 | +- **Flags**: Added --quiet and --verbose for user control over output verbosity |
| 141 | + |
| 142 | +**Technical Implementation**: |
| 143 | +- Two-pass argument parsing: collect --verbose/--quiet flags first |
| 144 | +- Conditional message display based on verbosity flags |
| 145 | +- Docker entrypoint checks for --quiet/--verbose in arguments |
| 146 | +- Clean auth method display mapping (claude → OAuth) |
| 147 | + |
| 148 | +**Results**: |
| 149 | +- ✅ **--version**: Single line output (was 30+ lines) |
| 150 | +- ✅ **--version --verbose**: Extended info when needed |
| 151 | +- ✅ **Startup**: Two-line summary (was verbose environment dump) |
| 152 | +- ✅ **Control flags**: --quiet and --verbose work in both local and Docker modes |
| 153 | + |
| 154 | +**Status**: ✅ **COMPLETED** |
| 155 | + |
| 156 | +--- |
| 157 | + |
| 158 | +## Issue Analysis: 2025-06-22 |
| 159 | + |
| 160 | +### [enhancement-completed] Script simplification and consistency fixes |
| 161 | + |
| 162 | +**Problem**: Inconsistent claude-trace syntax and unnecessary USE_NONROOT complexity. |
| 163 | + |
| 164 | +**Solutions Implemented**: |
| 165 | +- Fixed claude.sh:305 claude-trace syntax (removed "claude" argument) |
| 166 | +- Removed USE_NONROOT variable and dead root mode code |
| 167 | +- Simplified docker-entrypoint.sh by 50+ lines |
| 168 | +- Always run as claude user for consistency |
| 169 | + |
| 170 | +**Result**: Cleaner, more maintainable codebase with consistent behavior. |
| 171 | + |
| 172 | +**Status**: ✅ **COMPLETED** |
| 173 | + |
| 174 | +--- |
| 175 | + |
| 176 | +## Issue Analysis: 2025-06-22 |
| 177 | + |
33 | 178 | ### [issue-analysis] claude.sh and docker-entrypoint.sh complexity review |
34 | 179 |
|
35 | 180 | **Problems Identified**: |
36 | 181 |
|
37 | | -1. **Inconsistent claude-trace syntax**: |
| 182 | +1. **Inconsistent claude-trace syntax**: |
38 | 183 | - claude.sh:305 (local): `--run-with claude .` ❌ |
39 | 184 | - claude.sh:648 (docker): `--run-with .` ✅ |
40 | 185 |
|
|
0 commit comments