Skip to content

fix: improve source filter display with count badge and consistent layout#35

Open
mohamedsedkiyouzbechi wants to merge 1 commit intomainfrom
msyo/ui/source-filter-label-improvements
Open

fix: improve source filter display with count badge and consistent layout#35
mohamedsedkiyouzbechi wants to merge 1 commit intomainfrom
msyo/ui/source-filter-label-improvements

Conversation

@mohamedsedkiyouzbechi
Copy link
Contributor

@mohamedsedkiyouzbechi mohamedsedkiyouzbechi commented Mar 16, 2026

Summary

Improves the "All Sources" dropdown in the Prompts webview for better clarity and visual consistency.

Changes

  • Full-width source filter row: The source filter dropdown now always occupies its own line in the filter bar, regardless of label length. Previously, shorter labels (e.g., 7/8) could cause it to share a line with other filter buttons.
  • Count badge: Added an enabled/total count badge to the source dropdown button, matching the style of the other filter buttons (All, Agents, Prompts, Instructions).
  • Dynamic label: The dropdown label now reads:
    • 📦 All Sources [n/n] — when all sources are selected
    • 📦 Sources [x/n] — when a subset is selected
    • 📦 None Selected [0/n] — when no sources are selected

Screenshots

Before:

After:

Summary by CodeRabbit

  • Style
    • Improved source filter display with a static "Sources" label and an inline count badge showing the number of selected versus total sources, enhancing UI clarity and layout.

Copilot AI review requested due to automatic review settings March 16, 2026 11:15
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 16, 2026

Warning

Rate limit exceeded

@mohamedsedkiyouzbechi has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 8 minutes and 49 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7dab6a50-0922-4162-946e-cc948cbeca72

📥 Commits

Reviewing files that changed from the base of the PR and between 7f2596a and 533635b.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • src/ui/promptCardsWebview.ts

Walkthrough

The changes modify the source filter UI in the prompt cards webview to separate the filter label from the count display. Instead of showing "X/Y" in the label text, the UI now displays a static "Sources" label alongside a separate count badge component, with supporting CSS flexbox adjustments.

Changes

Cohort / File(s) Summary
Source Filter UI Rendering
src/ui/promptCardsWebview.ts
Updated source filter section to display static "Sources" label with separate inline count badge (X/Y format). Modified flexbox properties (flex-basis and min-width) and introduced sourceCountLabel variable for badge rendering.
Configuration
package.json
Minor dependency or configuration updates.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • Soap-141
  • MatFillion
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: adding a count badge and improving layout consistency in the source filter UI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch msyo/ui/source-filter-label-improvements
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Copy link
Contributor

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

Improves the Prompts webview “All Sources” filter UI so the source dropdown has a stable, full-width layout and a consistent enabled/total count badge.

Changes:

  • Forces the source filter control to occupy its own full-width row in the filter bar.
  • Updates the source dropdown button label to be consistent (“All Sources” / “Sources” / “None Selected”) and adds a count badge.

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

@mohamedsedkiyouzbechi mohamedsedkiyouzbechi force-pushed the msyo/ui/source-filter-label-improvements branch from cd1d340 to 90d2dca Compare March 16, 2026 11:33

## [Unreleased]

### Changed
Copy link
Member

Choose a reason for hiding this comment

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

This is in a Unreleased section. Shouldn't be in a new 1.5.5 version section?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Waiting the merge of other PRs, and before merging into main, I’ll rebase and update the changelog accordingly to keep everything consistent.
It'll be 1.5.7.

@mohamedsedkiyouzbechi mohamedsedkiyouzbechi force-pushed the msyo/ui/source-filter-label-improvements branch from 6368b63 to 533635b Compare March 18, 2026 13:27
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.

4 participants