Skip to content

Demo - Working example with backend and frontend#1

Merged
bordumb merged 3 commits intomainfrom
dev-demo
Jan 3, 2026
Merged

Demo - Working example with backend and frontend#1
bordumb merged 3 commits intomainfrom
dev-demo

Conversation

@bordumb
Copy link
Copy Markdown
Owner

@bordumb bordumb commented Jan 3, 2026

No description provided.

@bordumb bordumb self-assigned this Jan 3, 2026
@bordumb bordumb merged commit f51733a into main Jan 3, 2026
0 of 2 checks passed
@bordumb bordumb deleted the dev-demo branch January 3, 2026 20:04
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
# [1.5.0](v1.4.0...v1.5.0) (2026-01-27)

### Features

* **cli:** add --date flag to match GUI anomaly_date parameter ([#89](#89)) ([c7a4f7a](c7a4f7a)), closes [#1](#1) [#2](#2)
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant