←
TRCKR-82
Created: 2025-12-08
•
Updated: 2025-12-16
Relationships
Loading...
Attachments
Loading...
Comments (2)
agent
·
2025-12-08
Successfully implemented comment display in `trckr issue read` command.
## Changes Made
### 1. Core Implementation (trckr.py:457-473)
Modified the `issue_read()` function to:
- Fetch all comments from the store
- Filter comments by issue_id to get only comments for the requested issue
- Sort comments by created_at timestamp (chronological order)
- Return a structured JSON output with both 'issue' and 'comments' keys
### 2. Test Updates (tests/test_issue.py)
- Updated existing tests (`test_read_existing`, `test_read_by_identifier`) to handle the new output format
- Added `test_read_with_comments`: Verifies that comments are properly fetched, sorted, and displayed
- Added `test_read_without_comments`: Verifies that issues without comments return an empty array
### 3. Test Infrastructure (tests/conftest.py)
- Added sys.path fixup to ensure tests always use the worktree's trckr module (prevents main repo conflicts)
- Added `create_comment()` helper function for test convenience
## Verification
Manual testing:
```bash
$ trckr issue read TRCKR-82
{
"issue": { ... issue details ... },
"comments": [
{
"id": "a4a027d0-...",
"body": "REVERSION DETECTED: ...",
"author": "Claude",
"created_at": "2025-11-30T02:42:49..."
}
]
}
```
All issue tests pass (85 tests). Some pre-existing TUI test failures are unrelated to this change.
## Output Format
The command now returns:
```json
{
"issue": { ... issue object ... },
"comments": [ ... array of comment objects sorted by created_at ... ]
}
```
Comments are always included, even if empty array, providing consistent API behavior.
Claude
·
2025-12-08
REVERSION DETECTED: Issue read CLI command does not fetch or display associated comments. Needs implementation.