daaain / daaain/claude-code-log

Markdown content jumbled up in TUI preview

Open
#84 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
1.2k
Forks
98
Avg merge
3d 2h
Merged PRs (30d)
13

Description

When we're rendering the Markdown in the TUI as preview, we have a mess...

Image

(test/test_data/real_projects/-Users-dain-workspace-coderabbit-review-helper, session 741790a4-4fe2-4644-9a51-fb4482074060.jsonl)

Rendering that session alone works fine:

uv run claude-code-log test/test_data/real_projects/-Users-dain-workspace-coderabbit-review-helper/741790a4-4fe2-4644-9a51-fb4482074060.jsonl -o 741790a4.md -f md 

We get:


## 🤷 User: *I checked and it looks great!*

```
I checked and it looks great!

Spotted another issue though, we seem to be printing `Lines 0` in each title which doesn't make sense.

It also says **Total files with feedback:** 1 despite later a lot of different files mentioned.

Can you please investigate these issues? I s'pose we should be grouping feedback by file and correctly printing line numbers, and the omitting the Lines: n bit if we can't find line numbers in the feedback
```

### 🤖 Assistant: *I'll investigate these issues - the "Lines…*

<details>
<summary>Thinking...</summary>

> The user has noticed two issues:
> 
> 1. "Lines 0" appearing in titles - doesn't make sense
> 2. "Total files with feedback: 1" but multiple files mentioned - incorrect grouping
> 
> They want me to investigate these issues. They suggest:
> - Group feedback by file
> - Correctly print line numbers
> - Omit "Lines: n" if we can't find line numbers
> 
> Since I'm in plan mode, I need to:
> 1. Use a Task tool with Plan subagent to investigate the issues
> 2. Present a plan using ExitPlanMode
> 
> Let me investigate what's happening with the line numbers and file grouping.
</details>

> I'll investigate these issues - the "Lines 0" problem and the incorrect file grouping.

#### 🤖 Task (Plan): *Investigate line number and file grouping issues*

(same results with --no-cache)

No idea about what's going on, yet.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the TUI preview path and reproduce the issue using test/test_data/real_projects/-Users-dain-workspace-coderabbit-review-helper/741790a4-4fe2-4644-9a51-fb4482074060.jsonl. Compare its output with the standalone uv run claude-code-log ... -o 741790a4.md -f md result, including --no-cache. Done means the TUI preview preserves the Markdown structure and does not show the reported jumbled content.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.