Skip to content

Improve chat debugging and HTML reporting - #34

Merged
rahim-bhojani merged 8 commits into
dremio:mainfrom
aniket-s-kulkarni:codex/chat-html-overview-parity
Aug 5, 2026
Merged

Improve chat debugging and HTML reporting#34
rahim-bhojani merged 8 commits into
dremio:mainfrom
aniket-s-kulkarni:codex/chat-html-overview-parity

Conversation

@aniket-s-kulkarni

Copy link
Copy Markdown
Collaborator

Summary

This PR expands the dremio chat debugging workflow so chat runs can be inspected in the terminal or exported as a standalone HTML report.

What Changed

Richer transcript output

  • Added --show-tool-details to one-shot dremio chat -m ... output.
  • Added --show-tool-details to dremio chat history.
  • Transcript output now shows:
    • tool start and finish timestamps
    • per-tool duration
    • full tool result content instead of only compact status lines

Better chat history handling

  • Fixed chat history rendering to behave consistently for conversation message envelopes.
  • Added support for fetching the full paginated message history for HTML export.

Terminal Gantt improvements

  • Added transparent-background Gantt rendering that adapts foreground colors for light and dark terminal themes.
  • Kept --think-time support for synthetic gaps between steps.

Standalone HTML chat reports

  • Added dremio chat html.
  • Supports:
    • one or more positional conversation IDs
    • repeated --dump-file inputs
    • -o / --output
    • optional --think-time
  • The HTML report is self-contained and embeds all data in the page.
  • The report includes:
    • an overview page
    • aggregate stats across all selected conversations
    • mean, median, standard deviation, min, max, and totals for runtime metrics
    • navigation from the overview page to each conversation’s Gantt chart
    • conversation summary and result details
    • selected tool span payload and tool result details

Packaging fix

  • Added a fallback Hatch version for source trees without usable git metadata.
  • This allows uv sync / editable installs to work on machines where the checkout is missing full .git metadata, instead of failing during version resolution.

Why

  • Chat runs were difficult to debug from the CLI because tool activity was summarized too aggressively.
  • The original HTML export work needed an overview page and richer details to be useful across multiple conversations.
  • Source installs were fragile on fresh machines or copied source trees because hatch-vcs required VCS metadata.

Impact

  • Developers can inspect AI chat runs directly from the CLI with timestamps and tool outputs.
  • Multi-conversation debugging is easier with a portable standalone HTML report.
  • Local setup from a non-git source tree is more resilient.

Validation

  • uv run pytest tests/test_cli.py tests/test_chat_gantt_html.py
  • Verified uv sync succeeds from a git-less copy of the repo after adding the fallback version

@aniket-s-kulkarni
aniket-s-kulkarni marked this pull request as ready for review August 5, 2026 17:31

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 82b87e33c3

ℹ️ 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".

Comment thread src/drs/commands/chat.py Outdated
Comment thread src/drs/chat_gantt_html.py
@rahim-bhojani
rahim-bhojani merged commit f55f92e into dremio:main Aug 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants