Skip to content

Fix repository and discovery UI inconsistencies#100

Merged
AmintaCCCP merged 4 commits intomainfrom
codex/ui-polish-fixes
Apr 25, 2026
Merged

Fix repository and discovery UI inconsistencies#100
AmintaCCCP merged 4 commits intomainfrom
codex/ui-polish-fixes

Conversation

@AmintaCCCP
Copy link
Copy Markdown
Owner

@AmintaCCCP AmintaCCCP commented Apr 25, 2026

Summary

  • unify selected states for repository filters and highlight subscribed release state on repository cards
  • add clearer hover feedback for repository cards and replace unstar icons with a clearer action icon
  • align discovery sidebar/layout, improve discovery channel icon contrast, and normalize data management icons
  • vertically center release card metadata and clean up related UI class inconsistencies

Verification

  • npx tsc --noEmit
  • npm run build (fails in current workspace because @tailwindcss/typography is missing from the environment)

Summary by CodeRabbit

  • Style
    • Refined icons, badges, buttons, and filter chips with clearer colors, improved dark-mode variants, and updated hover/transition visuals across discovery, cards, subscriptions, search, and settings
  • Layout / Responsive
    • Sidebar made sticky within the desktop column; release metadata moved to a responsive block for better alignment and wrapping
  • Interactions
    • Enhanced card hover/press feedback and updated subscription/star button styling
  • Bug Fixes
    • Fixed discovery filter trigger and “last refreshed” visibility/styling
  • Refactor
    • Standardized search filter styling to reduce duplication

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c98afe95-d26f-45ce-8b84-3fe977c59f8c

📥 Commits

Reviewing files that changed from the base of the PR and between d648130 and a7e1f3e.

📒 Files selected for processing (1)
  • src/components/settings/BackendPanel.tsx
✅ Files skipped from review due to trivial changes (1)
  • src/components/settings/BackendPanel.tsx

📝 Walkthrough

Walkthrough

This PR adjusts UI styling and layout across discovery, cards, search filters, and settings: icon/text color updates, Tailwind class fixes, unified filter classes, sidebar wrapper changed from fixed to lg:sticky, and some modals now mounted via portal. No public API changes.

Changes

Cohort / File(s) Summary
Discovery view & sidebar
src/components/DiscoveryView.tsx, src/components/DiscoverySidebar.tsx
Channel icons now use explicit text-* / dark:text-* color classes (removed uniform opacity); PlatformFilter trigger class fixed (bg-light-surface text-gray-900); dropdown item selected/unselected class logic revised; desktop sidebar wrapper changed from a fixed wrapper to lg:sticky; "last refreshed" classes corrected to hidden sm:block.
Release card
src/components/ReleaseCard.tsx
Header layout restructured: timestamp/downloads moved into an md+ responsive block; title/header allow wrapping and consistent height; button/link background & hover classes adjusted for light/dark states.
Repository & Subscription cards
src/components/RepositoryCard.tsx, src/components/SubscriptionRepoCard.tsx
Star/unstar icon swapped to StarOff for relevant states; card hover effects updated (shadow-sm, hover:shadow-lg, hover:-translate-y-0.5, transition-all); subscribed/starred button styling switched to brand-indigo/white with dark variants; RepositoryEditModal and ReadmeModal now mounted via createPortal(document.body).
SearchBar filters
src/components/SearchBar.tsx
Introduced shared Tailwind class constants (filterChipBaseClass, filterChipActiveClass, filterChipInactiveClass, filterTagBaseClass) and replaced duplicated inline className strings across status, language, platform, and tag filter controls to standardize active/inactive styling.
Settings — Data & Backend
src/components/settings/DataManagementPanel.tsx, src/components/settings/BackendPanel.tsx
DataManagement badges/headers switched from colored status backgrounds to neutral light-surface and gray/text-secondary styling; Backend “Test Connection” button updated to use brand color tokens (bg-brand-indigo, hover:bg-brand-hover).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

  • PR #95: Overlaps DiscoveryView.tsx and sidebar/layout adjustments — likely to conflict with positioning or discovery-state handling.
  • PR #90: Edits Discovery UI and discoveryChannelIconMap styling — strong overlap on icon/color and sidebar behavior.
  • PR #96: Touches Discovery and Subscription/Repository card changes (layout and icons) — related to modal mounting and star/button styling.

Poem

🐰 I hopped through classes, nibbling stray gray,

painted tiny icons so they smile in play,
nudged the sidebar to stick where it should be,
wrapped titles gentle so words roam free,
indigo buttons gleam — hooray from me!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly summarizes the main objective of the changeset: fixing inconsistencies in repository and discovery UI components across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/ui-polish-fixes

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

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/ReleaseCard.tsx`:
- Around line 97-112: The metadata block in ReleaseCard.tsx is hidden on small
screens because it uses "hidden md:flex", causing mobile to lose publish time
and asset-count; make the metadata visible on mobile by removing the "hidden"
class or by adding a compact mobile-only fallback (e.g., a small "flex"
container shown on sm screens and the existing md layout preserved). Update the
div wrapping the calendar/download info (which reads release.published_at and
uses downloadLinks, selectedFilters and matchesActiveFilters) so it renders a
compact responsive view on mobile (smaller text/icons or collapsed count) while
retaining the current md:flex layout for larger screens.

In `@src/components/RepositoryCard.tsx`:
- Line 2: The JSX uses the lucide-react icon Star (used around the
RepositoryCard component at the usage near line 969) but the named import list
at the top (the import statement that currently lists GripVertical, StarOff,
ExternalLink, ...) no longer includes Star; restore Star into that import list
from 'lucide-react' so the JSX symbol resolves (ensure it is added as a named
import alongside the other icons and there are no duplicate imports).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2a2a4644-d42d-4a24-9df9-b4ff0516ec3a

📥 Commits

Reviewing files that changed from the base of the PR and between 0dcc2cf and 4ac5530.

📒 Files selected for processing (6)
  • src/components/DiscoveryView.tsx
  • src/components/ReleaseCard.tsx
  • src/components/RepositoryCard.tsx
  • src/components/SearchBar.tsx
  • src/components/SubscriptionRepoCard.tsx
  • src/components/settings/DataManagementPanel.tsx

Comment on lines +97 to +112
<div className="hidden md:flex min-w-[140px] flex-col justify-center gap-2 text-xs text-gray-500 dark:text-text-tertiary">
<div className="flex items-center gap-1.5">
<Calendar className="w-3.5 h-3.5" />
<span>{formatDistanceToNow(new Date(release.published_at), { addSuffix: true })}</span>
</div>
{downloadLinks.length > 0 && (
<div className="flex items-center gap-1.5">
<Download className="w-3.5 h-3.5" />
<span>
{selectedFilters.length > 0
? `${downloadLinks.filter(link => matchesActiveFilters(link.name)).length}/${downloadLinks.length}`
: downloadLinks.length}
</span>
</div>
)}
</div>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Mobile loses release metadata after this change.

At Line 97, the metadata block is hidden md:flex, so publish time and asset-count context are not shown on small screens anymore. There is no mobile replacement in this section.

📱 Suggested fix (keep compact metadata on mobile)
             <div className="hidden md:flex min-w-[140px] flex-col justify-center gap-2 text-xs text-gray-500 dark:text-text-tertiary">
               <div className="flex items-center gap-1.5">
                 <Calendar className="w-3.5 h-3.5" />
                 <span>{formatDistanceToNow(new Date(release.published_at), { addSuffix: true })}</span>
               </div>
               {downloadLinks.length > 0 && (
                 <div className="flex items-center gap-1.5">
                   <Download className="w-3.5 h-3.5" />
                   <span>
                     {selectedFilters.length > 0
                       ? `${downloadLinks.filter(link => matchesActiveFilters(link.name)).length}/${downloadLinks.length}`
                       : downloadLinks.length}
                   </span>
                 </div>
               )}
             </div>
+            <div className="flex md:hidden items-center gap-3 text-xs text-gray-500 dark:text-text-tertiary">
+              <div className="flex items-center gap-1">
+                <Calendar className="w-3.5 h-3.5" />
+                <span>{formatDistanceToNow(new Date(release.published_at), { addSuffix: true })}</span>
+              </div>
+              {downloadLinks.length > 0 && (
+                <div className="flex items-center gap-1">
+                  <Download className="w-3.5 h-3.5" />
+                  <span>
+                    {selectedFilters.length > 0
+                      ? `${downloadLinks.filter(link => matchesActiveFilters(link.name)).length}/${downloadLinks.length}`
+                      : downloadLinks.length}
+                  </span>
+                </div>
+              )}
+            </div>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="hidden md:flex min-w-[140px] flex-col justify-center gap-2 text-xs text-gray-500 dark:text-text-tertiary">
<div className="flex items-center gap-1.5">
<Calendar className="w-3.5 h-3.5" />
<span>{formatDistanceToNow(new Date(release.published_at), { addSuffix: true })}</span>
</div>
{downloadLinks.length > 0 && (
<div className="flex items-center gap-1.5">
<Download className="w-3.5 h-3.5" />
<span>
{selectedFilters.length > 0
? `${downloadLinks.filter(link => matchesActiveFilters(link.name)).length}/${downloadLinks.length}`
: downloadLinks.length}
</span>
</div>
)}
</div>
<div className="hidden md:flex min-w-[140px] flex-col justify-center gap-2 text-xs text-gray-500 dark:text-text-tertiary">
<div className="flex items-center gap-1.5">
<Calendar className="w-3.5 h-3.5" />
<span>{formatDistanceToNow(new Date(release.published_at), { addSuffix: true })}</span>
</div>
{downloadLinks.length > 0 && (
<div className="flex items-center gap-1.5">
<Download className="w-3.5 h-3.5" />
<span>
{selectedFilters.length > 0
? `${downloadLinks.filter(link => matchesActiveFilters(link.name)).length}/${downloadLinks.length}`
: downloadLinks.length}
</span>
</div>
)}
</div>
<div className="flex md:hidden items-center gap-3 text-xs text-gray-500 dark:text-text-tertiary">
<div className="flex items-center gap-1">
<Calendar className="w-3.5 h-3.5" />
<span>{formatDistanceToNow(new Date(release.published_at), { addSuffix: true })}</span>
</div>
{downloadLinks.length > 0 && (
<div className="flex items-center gap-1">
<Download className="w-3.5 h-3.5" />
<span>
{selectedFilters.length > 0
? `${downloadLinks.filter(link => matchesActiveFilters(link.name)).length}/${downloadLinks.length}`
: downloadLinks.length}
</span>
</div>
)}
</div>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/ReleaseCard.tsx` around lines 97 - 112, The metadata block in
ReleaseCard.tsx is hidden on small screens because it uses "hidden md:flex",
causing mobile to lose publish time and asset-count; make the metadata visible
on mobile by removing the "hidden" class or by adding a compact mobile-only
fallback (e.g., a small "flex" container shown on sm screens and the existing md
layout preserved). Update the div wrapping the calendar/download info (which
reads release.published_at and uses downloadLinks, selectedFilters and
matchesActiveFilters) so it renders a compact responsive view on mobile (smaller
text/icons or collapsed count) while retaining the current md:flex layout for
larger screens.

Comment thread src/components/RepositoryCard.tsx Outdated
AmintaCCCP and others added 2 commits April 25, 2026 15:23
…issues

1. RepositoryCard: Use React portal to render edit/readme modals at document body level, preventing them from being trapped inside card container's overflow context

2. DiscoveryView: Remove self-start from sidebar sticky container to fix vertical alignment with main content

3. DiscoveryView/DiscoverySidebar: Add explicit text color classes to channel icons for proper contrast against gradient backgrounds

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/components/DiscoveryView.tsx (1)

43-49: Channel icon colors now diverge between DiscoveryView and DiscoverySidebar.

src/components/DiscoverySidebar.tsx (lines 5–11) maps each channel to its own color (text-blue-600, text-orange-600, text-amber-600, text-emerald-600, text-violet-600 with dark: variants), while this map collapses everything to white/slate-900. Visually, the same channel ends up looking different in the desktop sidebar vs. the mobile tab vs. the toolbar pill. If the design intent is the colored treatment from DiscoverySidebar, consider centralizing one neutral/colored map and reusing it across both components (with the gradient pill being the only place that overrides to white/slate).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/DiscoveryView.tsx` around lines 43 - 49, The
discoveryChannelIconMap in DiscoveryView currently uses white/slate icons
causing inconsistent colors vs. DiscoverySidebar; extract a shared mapping
(e.g., discoveryChannelColorMap) that maps DiscoveryChannelIcon keys to the same
color class strings used in DiscoverySidebar (text-blue-600, text-orange-600,
text-amber-600, text-emerald-600, text-violet-600 with dark: variants), export
it from a shared module and import it into both DiscoveryView and
DiscoverySidebar, then update discoveryChannelIconMap (and the Sidebar's icon
map if needed) to apply those shared classes to the icon elements, leaving the
gradient pill rendering to explicitly override to white/slate-900 where
required.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/DiscoveryView.tsx`:
- Around line 43-49: The icons in discoveryChannelIconMap use hard-coded text
colors that are suitable for the gradient pill but not for the mobile tab nav;
split the mapping into two clear maps (e.g., discoveryChannelPillIconMap with
the existing gradient-tuned classes and discoveryChannelNeutralIconMap or reuse
the per-channel colored variants from DiscoverySidebar) and then update usages
so the toolbar pill (where currentChannelIcon is rendered around Line 918) uses
discoveryChannelPillIconMap[currentChannelIcon] while mobileChannels /
MobileTabNav (around Line 855) uses the neutral/per-channel-colored map so icons
inherit appropriate accessible colors in both light and dark themes.

---

Nitpick comments:
In `@src/components/DiscoveryView.tsx`:
- Around line 43-49: The discoveryChannelIconMap in DiscoveryView currently uses
white/slate icons causing inconsistent colors vs. DiscoverySidebar; extract a
shared mapping (e.g., discoveryChannelColorMap) that maps DiscoveryChannelIcon
keys to the same color class strings used in DiscoverySidebar (text-blue-600,
text-orange-600, text-amber-600, text-emerald-600, text-violet-600 with dark:
variants), export it from a shared module and import it into both DiscoveryView
and DiscoverySidebar, then update discoveryChannelIconMap (and the Sidebar's
icon map if needed) to apply those shared classes to the icon elements, leaving
the gradient pill rendering to explicitly override to white/slate-900 where
required.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f930d276-2e8a-4433-8f48-27a0640b3bd3

📥 Commits

Reviewing files that changed from the base of the PR and between f7c0f15 and d648130.

📒 Files selected for processing (3)
  • src/components/DiscoverySidebar.tsx
  • src/components/DiscoveryView.tsx
  • src/components/RepositoryCard.tsx
✅ Files skipped from review due to trivial changes (1)
  • src/components/DiscoverySidebar.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/RepositoryCard.tsx

Comment on lines 43 to 49
const discoveryChannelIconMap: Record<DiscoveryChannelIcon, React.ReactNode> = {
trending: <TrendingUp className="w-4 h-4" />,
rocket: <Rocket className="w-4 h-4" />,
star: <Crown className="w-4 h-4" />,
tag: <Tag className="w-4 h-4" />,
search: <Search className="w-4 h-4" />,
trending: <TrendingUp className="w-4 h-4 text-white" />,
rocket: <Rocket className="w-4 h-4 text-white" />,
star: <Crown className="w-4 h-4 text-slate-900" />,
tag: <Tag className="w-4 h-4 text-slate-900" />,
search: <Search className="w-4 h-4 text-white" />,
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Hard-coded text-white / text-slate-900 regresses contrast in the mobile tab nav.

These icon nodes are designed for the gradient pill at Line 918 (where text-white over the blue/orange/violet gradients and text-slate-900 over amber/emerald gradients makes sense). However, the same discoveryChannelIconMap is reused for mobileChannels at Line 855, and MobileTabNav renders those icons over bg-light-bg95 dark:bg-panel-dark/95 — no gradient:

  • Light mode: text-white icons (trending / rocket / search) become nearly invisible against bg-light-bg95.
  • Dark mode: text-slate-900 icons (star / tag) become nearly invisible against bg-panel-dark/95.

Consider either (a) splitting the map into a "pill" variant (gradient-tuned, current colors) and a "neutral" variant that inherits the parent text color for mobile tabs, or (b) reusing the per-channel colored variants already defined in src/components/DiscoverySidebar.tsx (text-blue-600 dark:text-blue-400, etc.) for the mobile tabs so they remain readable in both themes.

♻️ Sketch of one possible split
-const discoveryChannelIconMap: Record<DiscoveryChannelIcon, React.ReactNode> = {
-  trending: <TrendingUp className="w-4 h-4 text-white" />,
-  rocket: <Rocket className="w-4 h-4 text-white" />,
-  star: <Crown className="w-4 h-4 text-slate-900" />,
-  tag: <Tag className="w-4 h-4 text-slate-900" />,
-  search: <Search className="w-4 h-4 text-white" />,
-};
+// Used inside the gradient pill in the toolbar header only.
+const discoveryChannelPillIconMap: Record<DiscoveryChannelIcon, React.ReactNode> = {
+  trending: <TrendingUp className="w-4 h-4 text-white" />,
+  rocket: <Rocket className="w-4 h-4 text-white" />,
+  star: <Crown className="w-4 h-4 text-slate-900" />,
+  tag: <Tag className="w-4 h-4 text-slate-900" />,
+  search: <Search className="w-4 h-4 text-white" />,
+};
+
+// Used in mobile tabs / neutral surfaces — inherits theme text color.
+const discoveryChannelIconMap: Record<DiscoveryChannelIcon, React.ReactNode> = {
+  trending: <TrendingUp className="w-4 h-4" />,
+  rocket: <Rocket className="w-4 h-4" />,
+  star: <Crown className="w-4 h-4" />,
+  tag: <Tag className="w-4 h-4" />,
+  search: <Search className="w-4 h-4" />,
+};

Then update the toolbar pill at Line 918–920 to use discoveryChannelPillIconMap[currentChannelIcon] while mobileChannels (Line 855) keeps using the neutral discoveryChannelIconMap.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/DiscoveryView.tsx` around lines 43 - 49, The icons in
discoveryChannelIconMap use hard-coded text colors that are suitable for the
gradient pill but not for the mobile tab nav; split the mapping into two clear
maps (e.g., discoveryChannelPillIconMap with the existing gradient-tuned classes
and discoveryChannelNeutralIconMap or reuse the per-channel colored variants
from DiscoverySidebar) and then update usages so the toolbar pill (where
currentChannelIcon is rendered around Line 918) uses
discoveryChannelPillIconMap[currentChannelIcon] while mobileChannels /
MobileTabNav (around Line 855) uses the neutral/per-channel-colored map so icons
inherit appropriate accessible colors in both light and dark themes.

Use bg-brand-indigo text-white instead of bg-gray-100 text-white
for better visibility in both light and dark modes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

1 participant