Home

dev / openkara

publicthedavidweng/OpenKara· sync paused
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

feat(ui): adopt shadcn/ui on Base UI for the source screens

merged
#701 opened by devfeat/ui-base-shadcn→main
Conversation4
devopened this pull requestAuthor· 2 weeks ago
Commits
0
Files changed…

Summary

The source screens mixed hand-styled buttons, pill tabs and menus that did not match each other. This adopts shadcn/ui on Base UI for the controls on those screens, mapped onto OpenKara's own theme tokens, and rebuilds the source page layout. Stacked on #699.

Changes

  • Add Base UI components through shadcn/ui (button, input, tabs, switch, badge, dropdown-menu) in src/components/ui/. Colors map onto existing tokens in one [@theme](/theme) inline block, so both themes keep their palette; text uses the 13px scale and no control is under 24px. The shadcn CLI is not a dependency; its Base UI state variants are copied into globals.css. Rationale in ADR 0050.
  • Source page: search field with icon and inline clear, line tabs, a playlist header with cover, metadata and a primary Import action, a Back control that stays visible while signed out, and an account menu that shows the signed-in name.
  • Settings: source rows, registries, the market, Installed/Discover tabs, the Official badge and the YouTube switch use the same components. The source action dialog keeps useModalDialog (see ADR 0050) with the new look.
  • Fixes found while testing with real accounts: an empty playlist said "No playlists", the empty search message dropped the query, a blank account name showed "Signed in as", and hour-long videos showed as 446:19.

Screenshots

WebKit, mock backend, 1280×800.

Source page, playlist (dark)

BeforeAfter
Playlist detail dark beforePlaylist detail dark after

Source page, playlist (light)

BeforeAfter
Playlist detail light beforePlaylist detail light after

Search results

BeforeAfter
Search results beforeSearch results after

Playlists

BeforeAfter
Playlists beforePlaylists after

Settings, installed sources (dark and light)

BeforeAfter
Installed dark beforeInstalled dark after
BeforeAfter
Installed light beforeInstalled light after

Settings, registries and install dialog

BeforeAfter
Registries beforeRegistries after
BeforeAfter
Install dialog beforeInstall dialog after

I also checked the same screens in the release app with real NetEase, Bilibili and QQ Music accounts (not attached, they show account names).

Test plan

  • node --run lint (3 only-export-components warnings on shadcn files, as upstream) and node --run build
  • pnpm exec vp test run: 2591 passed
  • Playwright settings, streaming-sources, focus-order, themes-and-motion in Chromium and WebKit: all pass; a track without audio finds a playable version is intermittently flaky in WebKit, as on main (passed 3/3 on rerun)
  • node --run check:i18n; new key catalog.streaming.playlistTracksEmpty in all 17 locales
  • Interaction and accessibility profile: keyboard tabs (arrows activate), menu Escape returns focus, axe passes in both themes including target size and contrast
  • Rust checks: no Rust changes

claude.ai/code/session_01N6gLNB1dzAQCEYjvHhcRPV

coderabbitai[bot]commented· 2 weeks ago

[!WARNING]

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: thedavidweng/OpenKara
  • Branch: feat/ui-base-shadcn
  • File: .coderabbit.yaml
  • Commit: 7881d90
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 72254b70-2cfb-4530-abe2-1fabc22b0b02
Commits

Reviewing files that changed from the base of the PR and between 9c8d5655ff95316a3d1fc5788ce06e271abe1ef2 and 7881d9061719821f8558ec4b949499d252f6e3a1.

Files ignored due to path filters: 2

  • packaging/flatpak/generated/node-sources.0.json is excluded by !**/generated/**, !**/generated/**, !packaging/flatpak/generated/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
Files selected for processing: 44

  • components.json
  • docs/adr/0050-build-controls-from-shadcn-ui-on-base-ui.md
  • docs/adr/README.md
  • package.json
  • src/components/Catalog/StreamingAccountMenu.tsx
  • src/components/Catalog/StreamingBrowser.test.tsx
  • src/components/Catalog/StreamingBrowser.tsx
  • src/components/Catalog/streaming-utils.test.ts
  • src/components/Catalog/streaming-utils.ts
  • src/components/Settings/OfficialBadge.tsx
  • src/components/Settings/SettingsOnlineSourcesSection.test.tsx
  • src/components/Settings/SettingsOnlineSourcesSection.tsx
  • src/components/Settings/SourceActionDialog.tsx
  • src/components/Settings/SourceMarket.tsx
  • src/components/Settings/SourceRegistries.tsx
  • src/components/Settings/StreamingSources.tsx
  • src/components/Settings/source-market-utils.ts
  • src/components/ui/badge.tsx
  • src/components/ui/button-variants.ts
  • src/components/ui/button.tsx
  • src/components/ui/dropdown-menu.tsx
  • src/components/ui/input.tsx
  • src/components/ui/switch.tsx
  • src/components/ui/tabs.tsx
  • src/lib/format.test.ts
  • src/lib/format.ts
  • src/locales/de.json
  • src/locales/en.json
  • src/locales/es.json
  • src/locales/fr.json
  • src/locales/id.json
  • src/locales/it.json
  • src/locales/ja.json
  • src/locales/ko.json
  • src/locales/nl.json
  • src/locales/pl.json
  • src/locales/pt-BR.json
  • src/locales/ru.json
  • src/locales/th.json
  • src/locales/tr.json
  • src/locales/vi.json
  • src/locales/zh-CN.json
  • src/locales/zh-TW.json
  • src/styles/globals.css
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

  • X
  • Mastodon
  • Reddit
  • LinkedIn
github-actions[bot]commented· 2 weeks ago

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 85.32% (🎯 65%) 9484 / 11115
🟢 Statements 84.48% (🎯 65%) 10153 / 12018
🟢 Functions 82.14% (🎯 60%) 2516 / 3063
🟢 Branches 77.31% (🎯 60%) 5977 / 7731
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/components/Catalog/StreamingAccountMenu.tsx 100% 71.42% 100% 100%
src/components/Catalog/StreamingBrowser.tsx 91.26% 90.52% 93.1% 91.39% 108-110, 139, 141-142, 146, 450
src/components/Catalog/streaming-utils.ts 88.88% 90% 100% 85.71% 18, 38
src/components/Settings/OfficialBadge.tsx 100% 100% 100% 100%
src/components/Settings/SettingsOnlineSourcesSection.tsx 94.11% 75% 100% 100% 27
src/components/Settings/SourceActionDialog.tsx 100% 100% 100% 100%
src/components/Settings/SourceMarket.tsx 94.56% 85.18% 94.11% 97.43% 89, 144, 151, 287, 326
src/components/Settings/SourceRegistries.tsx 92.2% 90% 95.23% 95.52% 32, 59, 77, 92-93, 240
src/components/Settings/StreamingSources.tsx 94.36% 82.85% 93.22% 95.93% 64, 67, 120, 136, 142, 428-432, 532, 573
src/components/Settings/source-market-utils.ts 90.47% 82.08% 100% 94% 65, 72, 78-81
src/components/ui/badge.tsx 100% 100% 100% 100%
src/components/ui/button-variants.ts 100% 100% 100% 100%
src/components/ui/button.tsx 100% 100% 100% 100%
src/components/ui/dropdown-menu.tsx 100% 100% 100% 100%
src/components/ui/input.tsx 100% 100% 100% 100%
src/components/ui/switch.tsx 100% 100% 100% 100%
src/components/ui/tabs.tsx 100% 100% 100% 100%
src/lib/format.ts 100% 100% 100% 100%
src/locales/de.json 100% 100% 100% 100%
src/locales/en.json 100% 100% 100% 100%
src/locales/es.json 100% 100% 100% 100%
src/locales/fr.json 100% 100% 100% 100%
src/locales/id.json 100% 100% 100% 100%
src/locales/it.json 100% 100% 100% 100%
src/locales/ja.json 100% 100% 100% 100%
src/locales/ko.json 100% 100% 100% 100%
src/locales/nl.json 100% 100% 100% 100%
src/locales/pl.json 100% 100% 100% 100%
src/locales/pt-BR.json 100% 100% 100% 100%
src/locales/ru.json 100% 100% 100% 100%
src/locales/th.json 100% 100% 100% 100%
src/locales/tr.json 100% 100% 100% 100%
src/locales/vi.json 100% 100% 100% 100%
src/locales/zh-CN.json 100% 100% 100% 100%
src/locales/zh-TW.json 100% 100% 100% 100%
Generated in workflow #2434 for commit 7881d90 by the Vitest Coverage Report Action
kilo-code-bot[bot]commented· 2 weeks ago

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Reviewed incremental changes on PR #701 from e7bbbb7c4fad6b9937d8bb59880a3cc9ba419d8b to HEAD (7881d9061719821f8558ec4b949499d252f6e3a1) across 15 changed files (artwork protocol/cache, source-art URI scheme, shared HTTP client with SSRF resolver, CSP update, dropdown-menu trimming, docs/types/tests).

No changed-code issues found at CRITICAL/WARNING/SUGGESTION confidence levels. Existing inline comments: none.

Files Reviewed (15 files)
  • docs/references/contracts/catalog.md
  • docs/references/contracts/source-host.md
  • src-tauri/src/catalog/artwork.rs
  • src-tauri/src/catalog/mod.rs
  • src-tauri/src/catalog/plugin.rs
  • src-tauri/src/catalog/plugin_tests.rs
  • src-tauri/src/commands/catalog.rs
  • src-tauri/src/lib.rs
  • src-tauri/src/source_host/network.rs
  • src-tauri/tauri.conf.json
  • src/components/Catalog/StreamingBrowser.test.tsx
  • src/components/Catalog/StreamingCover.test.tsx
  • src/components/Catalog/StreamingCover.tsx
  • src/components/ui/dropdown-menu.tsx
  • src/types/ipc.ts
Previous Review Summaries (2 snapshots, latest commit e7bbbb7)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit e7bbbb7)

Status: No Issues Found | Recommendation: Merge

Reviewed incremental changes on PR #701 from a8ad798b7c28a12ba26790960c8263139a6e22a4 to HEAD (e7bbbb7c4fad6b9937d8bb59880a3cc9ba419d8b) across 13 changed files (Rust streaming-sign-in cookie-group protocol, replacement lifecycle hardening, test/error-code updates, and frontend account-menu/sign-in wiring).

No changed-code issues found at CRITICAL/WARNING/SUGGESTION confidence levels. Existing inline comments: none. No Kilo inline review comments to reconcile.

Files Reviewed (13 files)
  • docs/references/contracts/catalog.md - replacement ordering doc
  • docs/references/contracts/streaming-source-protocol.md - cookie_names alternatives
  • src-tauri/src/commands/catalog.rs - cookie_groups + signed_in_cookies
  • src-tauri/src/remote/mutation.rs - test error code
  • src-tauri/src/source_host/lifecycle.rs - claim/take_over/plan replacement flow
  • src-tauri/src/source_host/mod.rs - cookie_groups re-export
  • src-tauri/src/source_host/registry.rs - cookie_groups validator
  • src-tauri/src/source_host/registry_tests.rs - replacement keeps current package
  • src/components/Catalog/StreamingAccountMenu.tsx - visibleName
  • src/components/Catalog/streaming-utils.test.ts - visibleName/formatDuration
  • src/components/Catalog/streaming-utils.ts - visibleName/formatDuration
  • src/components/Settings/StreamingSources.test.tsx - sign-in opens source
  • src/components/Settings/StreamingSources.tsx - openSource(signIn), visibleName

Previous review (commit a8ad798)

Status: No Issues Found | Recommendation: Merge

Reviewed PR #701 (a8ad798b7c28a12ba26790960c8263139a6e22a4) across 44 changed files (UI adoption of shadcn/ui on Base UI for source screens, settings/streaming browser refactors, formatDuration hour handling, locale additions, ADR 0050, deps/lockfile updates).

No changed-code issues found at CRITICAL/WARNING/SUGGESTION confidence levels based on the available diff and current PR state. Existing inline comments: none. CodeRabbit summary comment present; no Kilo inline review comments to reconcile.

Files Reviewed (44 files)
  • components.json
  • docs/adr/0050-build-controls-from-shadcn-ui-on-base-ui.md
  • docs/adr/README.md
  • package.json
  • packaging/flatpak/generated/node-sources.0.json
  • pnpm-lock.yaml
  • src/components/Catalog/StreamingAccountMenu.tsx
  • src/components/Catalog/StreamingBrowser.test.tsx
  • src/components/Catalog/StreamingBrowser.tsx
  • src/components/Settings/OfficialBadge.tsx
  • src/components/Settings/SettingsOnlineSourcesSection.test.tsx
  • src/components/Settings/SettingsOnlineSourcesSection.tsx
  • src/components/Settings/SourceActionDialog.tsx
  • src/components/Settings/SourceMarket.tsx
  • src/components/Settings/SourceRegistries.tsx
  • src/components/Settings/StreamingSources.tsx
  • src/components/Settings/source-market-utils.ts
  • src/components/ui/badge.tsx
  • src/components/ui/button-variants.ts
  • src/components/ui/button.tsx
  • src/components/ui/dropdown-menu.tsx
  • src/components/ui/input.tsx
  • src/components/ui/switch.tsx
  • src/components/ui/tabs.tsx
  • src/lib/format.test.ts
  • src/lib/format.ts
  • src/locales/de.json
  • src/locales/en.json
  • src/locales/es.json
  • src/locales/fr.json
  • src/locales/id.json
  • src/locales/it.json
  • src/locales/ja.json
  • src/locales/ko.json
  • src/locales/nl.json
  • src/locales/pl.json
  • src/locales/pt-BR.json
  • src/locales/ru.json
  • src/locales/th.json
  • src/locales/tr.json
  • src/locales/vi.json
  • src/locales/zh-CN.json
  • src/locales/zh-TW.json
  • src/styles/globals.css

Reviewed by free · Input: 53.6K · Output: 1.6K · Cached: 295.1K

codecov[bot]commented· 2 weeks ago

Codecov Report

:x: Patch coverage is 92.30769% with 16 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 88.3%. Comparing base (9c8d565) to head (7881d90). :white_check_mark: All tests successful. No failed tests found.

Files with missing linesPatch %Lines
src/components/Catalog/StreamingBrowser.tsx91.4%7 Missing and 4 partials :warning:
src/components/Catalog/StreamingAccountMenu.tsx66.6%1 Missing and 1 partial :warning:
src/components/Settings/StreamingSources.tsx81.8%2 Missing :warning:
src/components/Settings/SourceMarket.tsx80.0%1 Missing :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #701     +/-   ##
=======================================
+ Coverage   88.2%   88.3%   +0.1%
=======================================
  Files        242     249      +7
  Lines      14151   14156      +5
  Branches    4824    4737     -87
=======================================
+ Hits       12486   12508     +22
+ Misses      1573    1557     -16
+ Partials      92      91      -1
FlagCoverage Δ
frontend88.3% <92.3%> (+0.1%):arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

ComponentsCoverage Δ
frontend88.3% <92.3%> (+0.1%):arrow_up:
rust∅ <ø> (∅)
Files with missing linesCoverage Δ
src/components/Catalog/streaming-utils.ts88.8% <100.0%> (-0.6%):arrow_down:
src/components/Settings/OfficialBadge.tsx100.0% <ø> (ø)
...mponents/Settings/SettingsOnlineSourcesSection.tsx100.0% <100.0%> (ø)
src/components/Settings/SourceActionDialog.tsx100.0% <ø> (ø)
src/components/Settings/SourceRegistries.tsx95.0% <100.0%> (ø)
src/components/Settings/source-market-utils.ts91.8% <100.0%> (ø)
src/components/ui/badge.tsx100.0% <100.0%> (ø)
src/components/ui/button-variants.ts100.0% <100.0%> (ø)
src/components/ui/button.tsx100.0% <100.0%> (ø)
src/components/ui/dropdown-menu.tsx100.0% <100.0%> (ø)
... and 25 more

... and 3 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign in to comment.

Merge readiness

Checking mergeability after the indexing worker computes the current branch state.

Autopilot

Debug

Reviews

Approved0
ReviewersNone yet

Configure an OpenRouter key in repository settings.