Skip to content

Bump up promkit-widget version to v0.5.0 - #109

Merged
ynqa merged 5 commits into
v0.7.0/devfrom
bump-up-promkit
Mar 25, 2026
Merged

Bump up promkit-widget version to v0.5.0#109
ynqa merged 5 commits into
v0.7.0/devfrom
bump-up-promkit

Conversation

@ynqa

@ynqa ynqa commented Mar 17, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 17, 2026 13:44

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.

Pull request overview

This PR upgrades the promkit-widgets dependency and introduces a new --write-to-stdout feature for jnv. The widget API migration replaces Pane/PaneFactory with StyledGraphemes/Widget, and text::State with status::State/Severity for cleaner status message creation. The --write-to-stdout flag allows piping the current JSON result to stdout on exit, with stdout redirection to /dev/tty during TUI rendering on Unix.

Changes:

  • Migrates from Pane/PaneFactory/text::State APIs to StyledGraphemes/Widget/status::State APIs across all widget usage, and replaces the custom spinner implementation with the library's built-in spinner module.
  • Adds --write-to-stdout CLI flag with StdoutRedirect to save/restore stdout fd, enabling piped output while keeping TUI rendering on the terminal (Unix only).
  • Updates dependency versions (clap, tokio, promkit-widgets) and adds rustix for fd manipulation.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Cargo.toml Updates deps, adds rustix, changes promkit-widgets to local path (needs fix)
Cargo.lock Reflects dependency version updates
README.md Documents --write-to-stdout usage examples
src/stdout_redirect.rs New module for Unix stdout fd redirection during TUI
src/main.rs Integrates --write-to-stdout flag and StdoutRedirect
src/prompt.rs Returns Option<String> for stdout output; migrates to new widget APIs
src/processor.rs Migrates PaneStyledGraphemes in trait and helpers
src/processor/monitor.rs Implements spinner::State trait for ContextMonitor
src/processor/spinner.rs Deleted custom spinner in favor of library's spinner module
src/editor.rs Migrates text::Statestatus::State for guide messages
src/search.rs Migrates PaneStyledGraphemes return type
src/json.rs Migrates to status::State/StyledGraphemes for panes and messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread Cargo.toml Outdated
Comment on lines +33 to +34
# version = "0.3.0"
path = "../promkit/promkit-widgets"
Comment thread README.md
# or write current result to stdout on exit (UNIX only)
cat data.json | jnv --write-to-stdout | some-command
# and also output to file
cat data.json | jnv -- --write-to-stdout > result.json
@ynqa
ynqa force-pushed the bump-up-promkit branch from 11ae7c2 to b46252f Compare March 17, 2026 14:04
@ynqa
ynqa merged commit 4303712 into v0.7.0/dev Mar 25, 2026
7 checks passed
@ynqa
ynqa deleted the bump-up-promkit branch March 25, 2026 09:54
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