Skip to content

Conversation

@manthanabc
Copy link
Owner

This PR adds visual enhancements to improve user experience during AI interactions.

Changes

MarkdownWriter Header Support

  • Added set_header() method to display status messages above markdown content
  • Header is rendered above the buffer when streaming content
  • Automatically cleared when not needed (e.g., after thinking phase completes)

Truncation Improvements

  • Added dimming effect to top lines when content is truncated due to max_height
  • Makes it visually clear that content has been truncated

Info Hints

  • Added with_hint() method to Info struct for displaying additional context
  • Hints are displayed at the end of info sections with a bullet point
  • Currently shows 'Ctrl+O to view transcript' hint in conversation summaries

UI Enhancements

  • Shows 'Thinking..' header during AI response generation
  • Improved spinner comment clarity

Testing

  • All 1373 tests pass
  • Added new tests for markdown writer header functionality
  • Added new tests for truncation dimming behavior

Co-Authored-By: Paws noreply@pawscode.dev

- Add header support to MarkdownWriter for displaying status messages
- Add dimming to truncated top lines in markdown output
- Add hint support to Info struct for displaying additional context
- Show 'Thinking..' header during AI response generation
- Display 'Ctrl+O to view transcript' hint in conversation info
- Improve spinner comment clarity

Co-Authored-By: Paws <noreply@pawscode.dev>
Copilot AI review requested due to automatic review settings January 26, 2026 09:14
@github-actions github-actions bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Jan 26, 2026
Copy link

Copilot AI left a comment

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 enhances the markdown-based UI during AI interactions by adding header support, visual truncation cues, and contextual hints, while simplifying some spinner behavior.

Changes:

  • Adds a header to MarkdownWriter with set_header() to show status text (e.g., “Thinking..”) above streamed markdown, and dims top lines when output is truncated by max_height.
  • Extends Info with an optional hint and a with_hint() builder method, and displays the hint at the end of rendered info (e.g., “Ctrl+O to view transcript”).
  • Updates UI call sites to use the new header/info behavior and clarifies spinner comments.

Reviewed changes

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

File Description
crates/paws_main/src/ui.rs Hooks the markdown header into thinking-phase UI and adjusts conversation summary display to use a title instead of a loading spinner.
crates/paws_main/src/info.rs Adds hint support to Info, wires it into metrics summaries, and renders hints at the end of the info display with tests.
crates/paws_common/src/spinner/mod.rs Updates spinner comment to match its actual output (no extra hint in the comment).
crates/paws_common/src/display/md/writer.rs Adds header support, truncation dimming, and new tests to MarkdownWriter, and refactors streaming logic to work on String lines.

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

&self.renderer.render(&self.buffer, Some(Attribute::Dim)),
spn,
);
self.stream(&self.renderer.render(&self.buffer, None), spn);
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The add_chunk_dimmed path no longer applies the Attribute::Dim styling (the render call now passes None), so content that is intended to be dimmed is rendered with normal intensity while last_was_dimmed is still set to true. Either restore the dim attribute in this call or rename the method/flag and update callers if the behavior change is intentional, to keep the implementation and naming consistent.

Suggested change
self.stream(&self.renderer.render(&self.buffer, None), spn);
self.stream(&self.renderer.render(&self.buffer, Some(Attribute::Dim)), spn);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant