Skip to content

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

Merged
mohamedsedkiyouzbechi merged 1 commit intomainfrom
msyo/ui/source-filter-label-improvements
Mar 24, 2026
Merged

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

Conversation

@mohamedsedkiyouzbechi
Copy link
Copy Markdown
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
    • Source filter now occupies its own full-width row; label shows “All Sources” or the static “Sources” text with a separate inline count badge indicating enabled/total.
  • Documentation
    • Changelog updated to document the source filter layout and label/count behavior changes.

Copilot AI review requested due to automatic review settings March 16, 2026 11:15
@coderabbitai
Copy link
Copy Markdown
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 24 minutes and 30 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: aecb92d7-e095-4e29-b2f0-5f7f3413f791

📥 Commits

Reviewing files that changed from the base of the PR and between a7be6b6 and fe4243b.

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

Walkthrough

Updated the source filter UI in the prompt cards webview: the filter label no longer embeds the X/Y count; the label text is now one of No Sources Selected, All Sources, or Sources, and the enabled/total count is rendered separately as a badge. Layout CSS for the source filter was adjusted to use flex-basis: 100% and min-width: 0.

Changes

Cohort / File(s) Summary
Source Filter UI
src/ui/promptCardsWebview.ts
Changed source filter label logic to show No Sources Selected / All Sources / Sources and render enabledCount/totalSources as a separate <span class="filter-count"> badge. Adjusted dropdown button inner HTML and updated .source-filter-container flex sizing from flex: 1 + min-width: fit-content to flex-basis: 100% + min-width: 0.
Changelog
CHANGELOG.md
Added 1.5.5 entry documenting the layout change (full-width row), the new enabled/total count badge on the dropdown, and the label behavior (All Sources vs Sources).

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 PR title accurately describes the main changes: improving source filter display with a count badge and consistent layout, which directly matches the CSS/layout updates, count badge addition, and dropdown label logic changes documented in the summary.
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

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
Copy Markdown
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
@mohamedsedkiyouzbechi mohamedsedkiyouzbechi force-pushed the msyo/ui/source-filter-label-improvements branch 2 times, most recently from 533635b to a7be6b6 Compare March 24, 2026 10:02
@mohamedsedkiyouzbechi mohamedsedkiyouzbechi force-pushed the msyo/ui/source-filter-label-improvements branch from a6cee1a to fe4243b Compare March 24, 2026 10:06
@mohamedsedkiyouzbechi mohamedsedkiyouzbechi merged commit d635b03 into main Mar 24, 2026
4 checks passed
@mohamedsedkiyouzbechi mohamedsedkiyouzbechi deleted the msyo/ui/source-filter-label-improvements branch March 24, 2026 13:37
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