Conversation
bordumb
added a commit
that referenced
this pull request
Jan 27, 2026
- Panels accumulate progressively (don't replace each other) - Each panel shows [MM:SS] elapsed timestamp prefix - Hypotheses numbered sequentially (#1, #2, etc.) - Event type mapping: hypothesis_testing, run_evidence, run_completed - Timeline persists after completion (transient=False) - Heartbeat events refresh display without new panels - Ctrl+C exits cleanly with code 130 - Updated test to match new "Synthesis" output format Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
bordumb
added a commit
that referenced
this pull request
Jan 27, 2026
* feat(cli): add timeline display formatters for streaming output Add new Rich formatting functions to display.py: - format_timestamp(): elapsed time as [MM:SS] - format_hypothesis(): blue-bordered hypothesis panels - format_query(): yellow-bordered SQL with syntax highlighting - format_evidence_item(): green/red panels based on support - format_synthesis(): cyan panel with root cause and recommendations All formatters handle missing fields gracefully and truncate long SQL content (>20 lines) with ellipsis indicator. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(cli): refactor _watch_run() for progressive timeline streaming - Panels accumulate progressively (don't replace each other) - Each panel shows [MM:SS] elapsed timestamp prefix - Hypotheses numbered sequentially (#1, #2, etc.) - Event type mapping: hypothesis_testing, run_evidence, run_completed - Timeline persists after completion (transient=False) - Heartbeat events refresh display without new panels - Ctrl+C exits cleanly with code 130 - Updated test to match new "Synthesis" output format Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(cli): add --no-stream flag for wait-and-output behavior - Add --no-stream flag: waits silently, outputs final result only - Deprecate --no-watch (still works, exits immediately after URL) - Add _wait_for_completion() helper for silent waiting - Support both JSON and Rich output modes with --no-stream - Exit code 0 on success, 1 on failure Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(cli): use NDJSON format for --json streaming output - Remove indent=2 from JSON output (NDJSON requires single-line) - Add separators=(",", ":") for compact output - Use print() instead of console.print() to avoid ANSI codes - Each event is now one parseable JSON line Output is now compatible with jq streaming: dataing run start ... --json | jq .event Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(cli): add non-TTY detection with plain text fallback - Detect non-TTY stdout with sys.stdout.isatty() - Add _watch_run_plain_text() for piped output - Plain text format: [MM:SS] event_type: message - No ANSI codes when output is piped to file/tee - Updated test to accept both Rich and plain text formats Works with: dataing run start ... > output.txt Works with: dataing run start ... | tee output.log Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test(cli): add comprehensive tests for timeline formatters Add 20 new test cases for timeline display functionality: - TestFormatTimestamp: elapsed time formatting - TestFormatHypothesis: blue panels with numbering - TestFormatQuery: yellow panels with SQL highlighting, truncation - TestFormatEvidenceItem: green/red/yellow based on verdict - TestFormatSynthesis: cyan panels with recommendations - TestTimelineFormattersEdgeCases: missing data, mock objects All 108 CLI tests now pass. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * docs(cli): update docs and demo for streaming timeline - Update cli.md with progressive timeline display documentation - Add color coding table for event types (hypothesis, query, evidence, synthesis) - Document --no-stream flag for wait-and-output behavior - Document NDJSON streaming format with examples - Document non-TTY plain text fallback - Update justfile demo output with explicit CLI commands: - dataing run start with streaming timeline - dataing --json for NDJSON output - dataing --no-stream for scripted usage Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(docs): use schema-qualified table names in CLI docs - Use main.orders, main.events etc. (correct for DuckDB demo) - Schema qualification is standard for real databases: - PostgreSQL: schema.table (e.g., public.orders) - Snowflake: database.schema.table - DuckDB: schema.table (e.g., main.orders) - Keep user_id (matches demo fixture anomaly) - Update justfile demo commands with correct table names Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(cli): add --date flag to match GUI anomaly_date parameter Add missing --date flag to CLI that maps to anomaly_date in the SDK, ensuring CLI investigations target the correct date like the GUI does. - Add --date option (YYYY-MM-DD format, defaults to today) - Pass anomaly_date to start_investigation() call - Add test for --date flag - Update CLI docs with --date in options table and examples Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
bordumb
pushed a commit
that referenced
this pull request
Jan 27, 2026
bordumb
added a commit
that referenced
this pull request
Jan 27, 2026
* feat(cli): add timeline display formatters for streaming output Add new Rich formatting functions to display.py: - format_timestamp(): elapsed time as [MM:SS] - format_hypothesis(): blue-bordered hypothesis panels - format_query(): yellow-bordered SQL with syntax highlighting - format_evidence_item(): green/red panels based on support - format_synthesis(): cyan panel with root cause and recommendations All formatters handle missing fields gracefully and truncate long SQL content (>20 lines) with ellipsis indicator. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(cli): refactor _watch_run() for progressive timeline streaming - Panels accumulate progressively (don't replace each other) - Each panel shows [MM:SS] elapsed timestamp prefix - Hypotheses numbered sequentially (#1, #2, etc.) - Event type mapping: hypothesis_testing, run_evidence, run_completed - Timeline persists after completion (transient=False) - Heartbeat events refresh display without new panels - Ctrl+C exits cleanly with code 130 - Updated test to match new "Synthesis" output format Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(cli): add --no-stream flag for wait-and-output behavior - Add --no-stream flag: waits silently, outputs final result only - Deprecate --no-watch (still works, exits immediately after URL) - Add _wait_for_completion() helper for silent waiting - Support both JSON and Rich output modes with --no-stream - Exit code 0 on success, 1 on failure Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(cli): use NDJSON format for --json streaming output - Remove indent=2 from JSON output (NDJSON requires single-line) - Add separators=(",", ":") for compact output - Use print() instead of console.print() to avoid ANSI codes - Each event is now one parseable JSON line Output is now compatible with jq streaming: dataing run start ... --json | jq .event Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(cli): add non-TTY detection with plain text fallback - Detect non-TTY stdout with sys.stdout.isatty() - Add _watch_run_plain_text() for piped output - Plain text format: [MM:SS] event_type: message - No ANSI codes when output is piped to file/tee - Updated test to accept both Rich and plain text formats Works with: dataing run start ... > output.txt Works with: dataing run start ... | tee output.log Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test(cli): add comprehensive tests for timeline formatters Add 20 new test cases for timeline display functionality: - TestFormatTimestamp: elapsed time formatting - TestFormatHypothesis: blue panels with numbering - TestFormatQuery: yellow panels with SQL highlighting, truncation - TestFormatEvidenceItem: green/red/yellow based on verdict - TestFormatSynthesis: cyan panels with recommendations - TestTimelineFormattersEdgeCases: missing data, mock objects All 108 CLI tests now pass. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * docs(cli): update docs and demo for streaming timeline - Update cli.md with progressive timeline display documentation - Add color coding table for event types (hypothesis, query, evidence, synthesis) - Document --no-stream flag for wait-and-output behavior - Document NDJSON streaming format with examples - Document non-TTY plain text fallback - Update justfile demo output with explicit CLI commands: - dataing run start with streaming timeline - dataing --json for NDJSON output - dataing --no-stream for scripted usage Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(docs): use schema-qualified table names in CLI docs - Use main.orders, main.events etc. (correct for DuckDB demo) - Schema qualification is standard for real databases: - PostgreSQL: schema.table (e.g., public.orders) - Snowflake: database.schema.table - DuckDB: schema.table (e.g., main.orders) - Keep user_id (matches demo fixture anomaly) - Update justfile demo commands with correct table names Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(cli): add --date flag to match GUI anomaly_date parameter Add missing --date flag to CLI that maps to anomaly_date in the SDK, ensuring CLI investigations target the correct date like the GUI does. - Add --date option (YYYY-MM-DD format, defaults to today) - Pass anomaly_date to start_investigation() call - Add test for --date flag - Update CLI docs with --date in options table and examples Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor(api): consolidate runs endpoints into investigations - Remove standalone /runs endpoints, consolidate into /investigations - Update SDK client with streaming support for investigations - Regenerate frontend API client - Fix unused variable warnings in tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.