Skip to content

Conversation

@Heck-R
Copy link

@Heck-R Heck-R commented Dec 17, 2025

According to the Result.Preview.Description (PreviewInfo.Description) documentation

/// <summary>
/// Result description text that is shown at the bottom of the preview panel.
/// </summary>
/// <remarks>
/// When a value is not set, the <see cref="SubTitle"/> will be used.
/// </remarks>

However, it actually doesn't do anything.
This PR fixes this, so the Description does what it is documented to do.
I left the related TextBlock control name as PreviewSubTitle, because although this is confusing, changing it could break user themes.

@prlabeler prlabeler bot added the bug Something isn't working label Dec 17, 2025
@github-actions github-actions bot added this to the 2.1.0 milestone Dec 17, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 17, 2025

📝 Walkthrough

Walkthrough

The changes move subtitle display logic from directly binding to Result.SubTitle to using a new property DefaultPreviewCustomDescription that conditionally returns the preview description when available, otherwise falls back to the subtitle.

Changes

Cohort / File(s) Summary
Preview subtitle binding refactor
Flow.Launcher/MainWindow.xaml
Updated PreviewSubTitle Text binding from Result.SubTitle to DefaultPreviewCustomDescription
New ViewModel property
Flow.Launcher/ViewModel/ResultViewModel.cs
Added public read-only property DefaultPreviewCustomDescription returning Result.Preview?.Description ?? Result.SubTitle

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Straightforward property addition with simple conditional logic
  • Minimal binding change in XAML with no layout or structural modifications

Suggested reviewers

  • jjw24

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main fix: making Result.Preview.Description work as documented instead of being ignored.
Description check ✅ Passed The PR description clearly explains the issue (Result.Preview.Description not being displayed despite documentation) and the fix (binding the UI to DefaultPreviewCustomDescription to honor the documented behavior).
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant