Repository navigation
feat(ui): community pages — Starboard and Levels as connected components - #955
Conversation
…ric layout and quote-card patterns Levels: Anchor to Discord (role-color rows, native server vibe) + Linear (compact density). - LeaderboardRowPrimary: emphasize rank 1 with p-6 gradient bg (panel→elevated), 3xl heading, level badge, XpBar (solid #ec4899), footer XP metrics - LeaderboardRowCompact: ranks 2-10 in divided list (36px-style rows, monospace rank, hover state) - Settings/Rewards panels tighter Label spacing (space-y-1.5) Starboard: Anchor to Notion (warm-minimal, quote-card aesthetic). - EntryCard: left border (w-1 bg-lucky-brand/60), content-first (p text-sm leading-relaxed), metadata footer (monospace star count, author, date) - Single-column grid (grid-cols-1 gap-3) - SkeletonCard updated to match quote structure Tokens: locked to Lucky CSS vars (--color-lucky-brand #ec4899, --font-lucky-display Sora, etc.) No em dashes, no gradients (except controlled bg-gradient-to-br), no default shadows, no identical card grids, no glassmorphism.
Make leaderboard, rewards, settings, entries, and channels optional props with sensible defaults. Pages can now be rendered from App.tsx and tests without providing props, and they internally handle empty data gracefully. Fixes TS2739 prop-contract regression.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
📝 WalkthroughWalkthroughThis pull request combines comprehensive formatting updates across test and frontend UI files with two substantial page refactors and one documentation enhancement. The main changes involve reformatting Jest tests and JSX attributes for improved readability, along with significant logic updates to the Levels and Starboard pages, GuildAutomation UI, and npm cache strategy documentation. ChangesFrontend Pages & Services
🎯 4 (Complex) | ⏱️ ~60 minutes Possibly Related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
Resolve conflicts: - package.json: take main's v2.15.0 version + updated scripts - pnpm-lock.yaml: take main's lock state Fix TypeScript errors in PR changes: - Levels.tsx: remove unused 'config' state variable and LevelConfig import - Starboard.tsx: fix Button variant from 'outline' to 'secondary' Levels.tsx and Starboard.tsx component changes preserved from branch.
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Size Change: -820 B (-0.19%) Total Size: 425 kB 📦 View Changed
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/decisions/2026-05-24-docker-npm-cache-key-strategy.md (1)
48-54:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winClarify Alternative A’s rationale about cache mount persistence
Alternative A’s conclusion fitstype=ghabehavior (BuildKit cache mounts fromRUN --mount=type=cachearen’t preserved in the exported GitHub Actions cache by default), but the wording “GHA runners are ephemeral” doesn’t pinpoint the mechanism. Rephrase to attribute the non-persistence to--cache-to type=gha/BuildKit not exporting mount contents (and keep consistent with the doc’s distinction between “mount cache” vs the “GHA layer cache”).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/decisions/2026-05-24-docker-npm-cache-key-strategy.md` around lines 48 - 54, Alternative A's rationale should be clarified to state that the non-persistence is due to BuildKit's export behavior (e.g. `--cache-to type=gha` not exporting contents written to `RUN --mount=type=cache`) rather than the general ephemerality of GHA runners; update the text in the "Alternative A" paragraph to mention `RUN --mount=type=cache` and `--cache-to type=gha` explicitly, explain that BuildKit does not export mount contents into the GitHub Actions cache by default, and adjust the wording to preserve the doc's distinction between the "mount cache" and the "GHA layer cache."
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/frontend/src/pages/GuildAutomation.tsx`:
- Around line 87-92: The chevron currently only renders when run.summary exists;
change the condition to render the expand/collapse affordance whenever there is
any expandable content (e.g. run.summary or run.error). Update the JSX that
checks run.summary to instead check (run.summary || run.error) so the
ChevronUp/ChevronDown toggle still uses the existing expanded state to decide
which icon to show (symbols: run.summary, run.error, expanded, ChevronUp,
ChevronDown).
In `@packages/frontend/src/pages/Levels.tsx`:
- Around line 323-330: The remove button is an icon-only button (using
TrashIcon) and needs an accessible name; update the button in Levels.tsx that
calls handleRemoveReward(reward.level) to include an aria-label (or
aria-labelledby/visually hidden text) such as aria-label={`Remove reward for
level ${reward.level}`} so screen readers can announce the action while keeping
the existing onClick and styling intact.
- Around line 120-137: The add/remove reward handlers are using the current
closure's rewards array which can be stale for async calls; update both places
to use the functional state updater form of setRewards so updates are applied to
the latest state. Specifically, in the add-reward handler (the block that
currently calls setRewards([...rewards, reward])) change it to use
setRewards(prev => [...prev, reward]), and in handleRemoveReward replace
setRewards(rewards.filter(r => r.level !== level)) with setRewards(prev =>
prev.filter(r => r.level !== level)). This ensures concurrent async mutations
won’t overwrite each other.
In `@packages/frontend/src/pages/Starboard.tsx`:
- Around line 83-89: The save path calls api.starboard.updateConfig but does not
persist the returned config into component state, so the UI (variables like
config and related UI elements such as the “Active” badge and Disable button)
remains stale; update the save handler (where api.starboard.updateConfig is
awaited) to capture the returned config object and set it into the component
state (e.g., call the state setter that holds config) after a successful
response, then show the toast as before so the UI immediately reflects the saved
configuration.
---
Outside diff comments:
In `@docs/decisions/2026-05-24-docker-npm-cache-key-strategy.md`:
- Around line 48-54: Alternative A's rationale should be clarified to state that
the non-persistence is due to BuildKit's export behavior (e.g. `--cache-to
type=gha` not exporting contents written to `RUN --mount=type=cache`) rather
than the general ephemerality of GHA runners; update the text in the
"Alternative A" paragraph to mention `RUN --mount=type=cache` and `--cache-to
type=gha` explicitly, explain that BuildKit does not export mount contents into
the GitHub Actions cache by default, and adjust the wording to preserve the
doc's distinction between the "mount cache" and the "GHA layer cache."
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 599e708e-a797-4ab5-90dd-c5686bf606b1
📒 Files selected for processing (29)
docs/decisions/2026-05-24-docker-npm-cache-key-strategy.mdpackages/bot/src/functions/management/commands/customcommand.spec.tspackages/bot/src/handlers/player/streamBridge.spec.tspackages/bot/src/handlers/player/trackNowPlaying.spec.tspackages/bot/src/services/musicRecommendation/recommendationHelpers.spec.tspackages/bot/src/utils/general/responseEmbeds/buildTrackEmbed.spec.tspackages/bot/src/utils/music/autoplay/candidateScorer.spec.tspackages/bot/src/utils/music/autoplay/diversitySelector.spec.tspackages/bot/src/utils/music/autoplay/lastFmSeeds.spec.tspackages/bot/src/utils/music/autoplay/sessionMood.spec.tspackages/bot/src/utils/music/candidateFallback.spec.tspackages/bot/src/utils/music/collaborativePlaylist.spec.tspackages/bot/src/utils/music/duplicateDetection/similarityChecker.spec.tspackages/bot/src/utils/music/languageHeuristics.spec.tspackages/bot/src/utils/music/namedSessions.spec.tspackages/bot/src/utils/music/queue/queueStrategy.spec.tspackages/bot/src/utils/music/queueEditOps.spec.tspackages/bot/src/utils/music/queueStateManager.spec.tspackages/bot/src/utils/music/service.spec.tspackages/bot/src/utils/music/trackUtils/cacheManager.spec.tspackages/bot/src/utils/music/trackUtils/index.spec.tspackages/frontend/src/pages/Admin.tsxpackages/frontend/src/pages/Config.tsxpackages/frontend/src/pages/GuildAutomation.tsxpackages/frontend/src/pages/LastFm.tsxpackages/frontend/src/pages/Levels.tsxpackages/frontend/src/pages/ServerSettings.test.tsxpackages/frontend/src/pages/Spotify.tsxpackages/frontend/src/pages/Starboard.tsx
💤 Files with no reviewable changes (1)
- packages/bot/src/handlers/player/trackNowPlaying.spec.ts
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|



Summary
Rewrites
StarboardandLevelspages as connected components that pull data fromuseGuildStoreand the centralapiservice — replacing the previous prop-based stubs.Both components:
useEffectwith a mounted cleanup flag to prevent setState on unmounted componentsApiError+console.error+ user-facing toastselectedGuild?.idas the effect dependencyInput validation: emoji trim + ⭐ fallback,
parseIntNaN guard on reward level, numeric inputs withmin/maxconstraints.All 646 frontend tests pass.
Summary by CodeRabbit
Style
Chores