Skip to content

chore: update promkit-widgets to 0.10.0 - #130

Open
ynqa wants to merge 1 commit into
mainfrom
chore/update-promkit
Open

ynqa wants to merge 1 commit into
mainfrom
chore/update-promkit

Conversation

@ynqa

@ynqa ynqa commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Update promkit-widgets from 0.5.0 to 0.10.0, the version published with promkit v0.17.0. The lockfile also updates promkit-core to 0.6.1 and the transitive dependencies required by the new widgets release.

Migrate the JSON viewer to json::Document and bounded viewport projection, and preserve the layout/cursor metadata returned by CreatedGraphemes for the renderer. Replace the removed status widget with a styled text widget, retaining existing guide messages and colors. Existing configuration files, including [json.stream], remain compatible; update the referenced API name in the README and default configuration comments.

Validation:

  • cargo fmt --all -- --check
  • cargo clippy --locked --offline --all-targets -- -D warnings
  • cargo test --locked --offline -- --nocapture --format pretty — 6 regression tests covering configuration compatibility, custom styles, folding/output preservation, filtered results, null/error fallback, and selected-row visibility after resizing a long document.
  • cargo build --locked --offline --bins --examples
  • PTY smoke checks: editing, completion selection, filtering, resizing, folding/expansion, redirected input/output content, default filters, no_hint, and successful exit. Output content was checked after stripping terminal control sequences.

Copilot AI balanced review requested due to automatic review settings October 26, 2026 05:05

Copilot AI left a comment

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.

🟡 Changes recommended

Completion paths need jq-compatible normalization, and completion rendering needs bounded projection to avoid growing per-navigation costs.

2 open issues
What changed in this PR

Updates promkit-widgets to 0.10.0 and migrates the interactive JSON interface to the new widget and renderer APIs while preserving existing configuration compatibility.

Changes:

  • Migrates JSON rendering to Document with bounded viewport projection and preserves renderer metadata.
  • Replaces the status widget with styled text while retaining guide messages and colors.
  • Updates dependencies and API comments, and adds six regression tests.
File Description
src/​runtime_tasks.rs Updates widget rendering calls during resizing.
src/​query_editor.rs Returns editor content with renderer metadata.
src/​main.rs Adapts renderer initialization and guide setup.
src/​json.rs Switches to the new JSON path utility module.
src/​json_viewer.rs Migrates document rendering and adds regression tests.
src/​guide.rs Replaces status messages with styled text.
src/​config.rs Adopts the new JSON configuration type and tests compatibility.
src/​completion.rs Adapts completion rendering to CreatedGraphemes.
README.md Corrects the configuration API name in a comment.
default.toml Corrects the configuration API name in a comment.
Cargo.toml Updates the widget dependency and enabled features.
Cargo.lock Records updated dependencies and transitive packages.

Review effort: Balanced

Comment thread src/completion.rs
Comment on lines +136 to +137
pub fn create_graphemes(&self) -> CreatedGraphemes {
self.state.create_graphemes()
Comment thread src/json.rs

use promkit_widgets::{
jsonstream::jsonz,
json::jsonz,
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.

2 participants