Skip to content

chdig v26.8.1: ratatui, tmux panes, tmuxinator sessions, sharing logs with colors - #115216

Merged
azat merged 1 commit into
ClickHouse:masterfrom
azat:chdig-v26.8.1
Aug 18, 2026
Merged

azat merged 1 commit into
ClickHouse:masterfrom
azat:chdig-v26.8.1

Conversation

@azat

@azat azat commented Aug 17, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

chdig v26.8.1: ratatui, tmux panes, tmuxinator sessions, sharing logs with colors, feature tour

asciicast


Workflow [PR]
Sync PR [sync-upstream/pr/115216]

Version info

  • Merged into: 26.8.1.1646 (included in 26.8 and later)

@clickhouse-gh

clickhouse-gh Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [1efea49]

Summary: ❌

job_name test_name status info comment
Stress test (arm_release) FAIL
Segmentation fault (STID: 3414-41c1) FAIL cidb
Stress test (arm_tsan) FAIL
Logical error: No host found for exchange stream A (STID: 3994-5da6) FAIL cidb

AI Review

Summary

This PR bumps contrib/chdig to v26.8.1, bringing in the ratatui port, pane/layout support, named view instances, async-insert views, colored log sharing, and the corresponding Rust dependency refresh. The feature set is useful, but I do not think the submodule bump is ready to merge as-is: I found two new regressions in the async-insert and named-instance paths, and the previously reported ANSI-export issue is still present in the current head even though its thread was resolved.

Findings

⚠️ Majors

  • [contrib/chdig:1] The new async-insert log drilldowns lose the selected-host constraint. show_logs_by_query_ids, show_logs_by_query, and show_flush_logs all construct TextLogArguments with hostname: None (src/tui/views/providers/asynchronous_inserts.rs:175-179, 224-228; src/tui/views/providers/asynchronous_insert_log.rs:129-133), but TextLogView::new still hides the hostname column whenever ctx.selected_host.is_some() (src/tui/views/text_log_view.rs:54-56). In --cluster mode, opening logs from a host-scoped async-insert row can therefore silently mix records from other replicas with no way to tell them apart. Suggested fix: thread the current selected_host into these TextLogArguments, and reuse the same host filter in the async-insert-log subqueries.

  • [contrib/chdig:1] Named query-view instances are advertised as having instance-aware settings lookups, but the settings dialog still reads and writes queries_filter through Context::settings_queries_filter() (src/interpreter/options.rs:248-249, src/interpreter/context.rs:196-208, src/tui/views/settings_view.rs:237, 463-465). That helper only sees current_view: ChDigViews, so it always resolves the provider’s default widget name instead of the focused instance name. With instances like last_selects and last_inserts, editing the filter from one pane mutates the shared last_query_log slot, and the focused instance comes back with its original filter. Suggested fix: resolve the focused pane name first and key the runtime filter off that widget/instance, the same way the rebuild path already resolves instance.

  • [contrib/chdig:1] [dismissed by author -- https://github.com/ClickHouse/ClickHouse/pull/115216#discussion_r3799332624] The .terminal log-sharing path still writes raw span.content bytes while also injecting its own SGR sequences (src/tui/views/log_view.rs:1259-1275, src/interpreter/worker.rs:1789-1792). A literal ESC[ sequence already present in logged query text or query_id is therefore reinterpreted as terminal styling in pastila instead of being rendered as data, so the shared transcript is not faithful and can hide or recolor content. Suggested fix: strip or escape ANSI control sequences from the rendered content before writing the .terminal payload, or otherwise ensure only renderer-generated escapes are emitted.

Tests
  • ⚠️ There is still no focused coverage for --cluster + selected-host async-insert log drilldowns or for editing queries_filter from a named query-view instance. The new integration tests cover config parsing and query_kind, but they would not fail if either of the regressions above were reintroduced.
Final Verdict

Changes requested: fix the selected-host leak in the new async-insert log actions, make the settings dialog use the focused instance’s filter slot, and address the still-open ANSI-export issue before merging.

@clickhouse-gh clickhouse-gh Bot added pr-improvement Pull request with some product improvements submodule changed At least one submodule changed in this PR. labels Aug 17, 2026
@azat azat changed the title chdig v26.8.1: ratatui, tmux panes, tmuxaintor sessions, sharing logs with colors chdig v26.8.1: ratatui, tmux panes, tmuxinator sessions, sharing logs with colors Aug 17, 2026
Comment thread contrib/chdig
@@ -1 +1 @@
Subproject commit 3e046e4dfabd98ef667ed0e5a058fd673c06a479
Subproject commit 9302521212c898fa7d91df827136e74f3a760bb7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

chdig now uploads shared logs as .terminal, but the exported payload still writes each span.content byte verbatim while also injecting its own SGR (src/tui/views/log_view.rs:1259-1275, src/interpreter/worker.rs:1789-1792). That means any literal \x1b[...m already present in the log/query text becomes active styling in pastila instead of data. A logged query or query_id containing SGR can therefore recolor or hide parts of the shared transcript, so the paste is no longer a faithful rendering of what chdig intended to export. Please strip or escape ANSI from the content before re-inserting the renderer-generated SGR sequences.

Comment thread contrib/chdig
@@ -1 +1 @@
Subproject commit 3e046e4dfabd98ef667ed0e5a058fd673c06a479
Subproject commit 9302521212c898fa7d91df827136e74f3a760bb7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These new async-insert log drilldowns drop the selected-host filter. show_logs_by_query_ids, show_logs_by_query, and show_flush_logs all build TextLogArguments with hostname: None (src/tui/views/providers/asynchronous_inserts.rs:175-179, 224-228; src/tui/views/providers/asynchronous_insert_log.rs:129-133). In cluster mode, TextLogView::new hides the hostname column whenever ctx.selected_host.is_some() (src/tui/views/text_log_view.rs:54-56), so opening logs from a host-scoped async-insert row can silently mix records from other replicas with no way to tell them apart. Please thread the current selected_host into these TextLogArguments (and ideally into the async-insert-log subqueries too) so the drilldown stays on the same host the row came from.

Comment thread contrib/chdig
@@ -1 +1 @@
Subproject commit 3e046e4dfabd98ef667ed0e5a058fd673c06a479
Subproject commit 9302521212c898fa7d91df827136e74f3a760bb7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Named views: instances are documented as having instance-aware settings lookups (src/interpreter/options.rs:248-249), and the query views themselves honor that by keying their runtime filter off the actual widget name (src/tui/views/queries_view.rs:1229-1245). The settings dialog no longer does: it loads and saves queries_filter through Context::settings_queries_filter() (src/interpreter/context.rs:196-208, src/tui/views/settings_view.rs:237, 463-465), which only sees current_view: ChDigViews and therefore always resolves the provider's default widget name. With two last_queries instances like last_selects / last_inserts, editing the filter from last_selects mutates the shared last_query_log slot instead, so the focused instance comes back with its old filter and the user's change is ignored. The dialog should key the runtime filter off the focused pane name the same way the rebuild path below already resolves instance.

@clickhouse-gh

clickhouse-gh Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 1efea49b4 with master b99a4b375 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes
Binary Master PR Δ
programs/clickhouse-stripped 702.06 MiB 698.92 MiB -3.13 MiB (-0.45%)

Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction.

Compile time of recompiled translation units

7 translation units recompiled, 4 s compile time in total, 7 of them have a recent master baseline.

Job report

@azat
azat enabled auto-merge August 18, 2026 16:37
@azat
azat added this pull request to the merge queue Aug 18, 2026
Merged via the queue into ClickHouse:master with commit 3436fef Aug 18, 2026
178 of 181 checks passed
@azat
azat deleted the chdig-v26.8.1 branch August 18, 2026 16:57
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 18, 2026
thevar1able added a commit that referenced this pull request Nov 11, 2026
Bring the release branch to the same Rust toolchain and Rust contribs as
master, so that it shares master's `rust_vendor` commit (`c4fd435`):

- `nightly-2026-11-02` instead of `nightly-2025-07-07`.
- `wasmtime` v41 -> v45.0.1 (`561b224`), with the `ValType` API change in
  `WasmTimeRuntime.cpp` from #106836
  (also covers #98603 and
  #102603, which only moved the
  submodule).
- `delta-kernel-rs` v23 (`3ae3062`), with the FFI adaptations, tests and the
  `arrow` crate feature from #105861.
  The branch keeps its `default-engine-rustls` feature and its per-batch
  `add_files` loop in `WriteTransaction::commit`; only the `commit` call is
  changed to the committed-transaction API.
- `chdig` v26.10.1 (`a28e107`), with the `config.toml.in` sources from
  #103145,
  #110938 and
  #115216.
- `rust/workspace/Cargo.lock` re-resolved offline against that vendor commit.

Original PR: #128815

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements pr-synced-to-cloud The PR is synced to the cloud repo submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants