Conversation
@cct_issue_binding Issue: #1 Context: - Parse Cursor export format into normalized loglines Acceptance criteria: - [ ] Parsing works for real exports - [ ] Tests/fixtures added - [ ] HTML output renders correctly @cct_new_format_support @cct_tdd @cct_dev_commands @cct_pr_checklist
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e96b382f8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Cursor chat export JSON -> normalized loglines | ||
| cursor_data = _parse_cursor_export(data, filepath) | ||
| if cursor_data is not None: | ||
| return cursor_data | ||
|
|
||
| # Some exports may be a bare list of loglines | ||
| if isinstance(data, list) and all( | ||
| isinstance(item, dict) and {"type", "timestamp", "message"}.issubset(item) | ||
| for item in data |
There was a problem hiding this comment.
Check for bare loglines before Cursor export parsing
When a JSON file is already a bare list of normalized loglines (each item has type, timestamp, message), it now gets routed through _parse_cursor_export first. Because _parse_cursor_export accepts lists and its “looks like” check treats the type/message keys as cursor hints, it will reinterpret those loglines as Cursor messages and reserialize assistant messages (e.g., a list-of-blocks message.content) into a JSON string via _cursor_message_text. In that scenario, previously valid loglines are corrupted and rendered as JSON blobs in the HTML instead of assistant text. This regression only affects JSON inputs that are lists of loglines, but that is explicitly supported by the later branch, so the Cursor parsing should come after that check or explicitly exclude entries that already have timestamp/message logline structure.
Useful? React with 👍 / 👎.
Auto-created by Codex: merge $branch into main.