Skip to content

visual indication of completion - #1137

Open
philocalyst wants to merge 7 commits into
nushell:mainfrom
philocalyst:visual-working-indicator
Open

visual indication of completion#1137
philocalyst wants to merge 7 commits into
nushell:mainfrom
philocalyst:visual-working-indicator

Conversation

@philocalyst

@philocalyst philocalyst commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

This adds really cute completion indicators to reedline! Effectively a series of dots, pulsating in/out. Included with this is a clearer APIs around completion status, through workingphase and completion progress.

Before

  • Completion rendered as a static marker.
  • Background work was tracked a boolean.

After

  • Completions are communicated as a dynamic state. This opens up doors for further extensibility (like 1-100 for bars and things)
  • Added apis for communicating when completion values are stale or un-stale, through working_indicator and working_marker.

Additional notes

@philocalyst philocalyst changed the title feat(completion): add CompletionOrigin and Partial data structures visual indication of completion Jul 30, 2026
@philocalyst
philocalyst force-pushed the visual-working-indicator branch from 803dc85 to 29ddc62 Compare July 31, 2026 23:43
@philocalyst
philocalyst marked this pull request as ready for review July 31, 2026 23:43
@fdncred

fdncred commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

I'm fine with this as long as there's a way to turn it off/disable it. Some people don't like things like this.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a richer “completion in progress” model to Reedline menus, enabling animated working indicators and optional delayed “working…” messaging while background completion work is pending/stale.

Changes:

  • Introduces WorkingIndicator, WorkingPhase, and CompletionProgress to represent and render in-flight completion state.
  • Updates IdeMenu and ColumnarMenu to track completion progress (replacing the previous boolean “awaiting results” approach) and to render a working message instead of flashing “NO RECORDS FOUND”.
  • Updates the engine loop to repaint when the active menu’s working phase advances (to animate the indicator), and re-exports the new types from the crate root.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/menu/mod.rs Adds the new working-indicator/progress types and integrates them into the Menu/MenuSettings API.
src/menu/ide_menu.rs Replaces awaiting_results with CompletionProgress and updates empty-state rendering while working.
src/menu/columnar_menu.rs Same progress-driven behavior as IDE menu; adds/updates tests for working indicator and empty-state behavior.
src/lib.rs Re-exports CompletionProgress, WorkingIndicator, and WorkingPhase as part of the public API.
src/engine.rs Repaints on working-phase changes to animate the in-flight indicator while polling background completion.

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

Comment thread src/menu/mod.rs

impl Default for WorkingIndicator {
fn default() -> Self {
// ASCII spinner: single-column in all terminals
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.

3 participants