Skip to content

fix(charts): use the app theme provider in the area chart - #985

Merged
T3ST3ST3R0N merged 1 commit into
devfrom
fix/area-chart-theme
Oct 10, 2026
Merged

T3ST3ST3R0N merged 1 commit into
devfrom
fix/area-chart-theme

Conversation

@T3ST3ST3R0N

@T3ST3ST3R0N T3ST3ST3R0N commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #952; finishes the dark-mode problem it fixed for the pie chart.

area-costume-chart.tsx read useTheme from next-themes, but no next-themes provider is mounted. So resolvedTheme was always undefined, and the chart used its light-mode colors in dark mode. It now reads the theme from the app's own provider, like user-sub-update-pie-chart.tsx. No other next-themes import remains in dashboard/src, so the next-themes dependency is now unused; it can be removed in a separate change.

Note: #604 also edits this file (smart polling), on other lines.

Checked: tsc --noEmit reports nothing new compared with dev, and vite build passes.

Summary by CodeRabbit

  • Refactor
    • Updated the chart to use the app’s theme provider. The chart’s appearance remains unchanged.

area-costume-chart.tsx read useTheme from next-themes, but no next-themes
provider is mounted, so resolvedTheme was always undefined and the chart
used its light-mode colors in dark mode. Read the theme from the app's own
provider, as the pie chart already does since #952.
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 58acefee-f755-4036-9193-7deaef018034

📥 Commits

Reviewing files that changed from the base of the PR and between d94e157 and e1376a5.


📒 Files selected for processing (1)
  • dashboard/src/components/charts/area-costume-chart.tsx

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.



Walkthrough

AreaCostumeChart now imports useTheme from the app’s theme provider. The chart continues to use resolvedTheme.

Changes

Chart theme provider

Layer / File(s) Summary
Use the app theme provider
dashboard/src/components/charts/area-costume-chart.tsx
The chart imports useTheme from the app’s theme provider instead of next-themes. It continues to use resolvedTheme.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Bug fix

Suggested reviewers: x0sina

Merge Risk: ⚪ Minimal · up to e1376

The chart now receives the app’s active theme for its gradient colors. No actionable merge risk remains.

Pre-merge checks | Passed 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 clearly and concisely describes the main change: using the app theme provider for the area chart.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR


🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • 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

A rabbit checks the chart’s theme,
The app provider joins the scene.
resolvedTheme stays in place,
No gradient changes its trace.
The rabbit hops beneath the beam.

Comment @coderabbitai help to get the list of available commands.

@T3ST3ST3R0N
T3ST3ST3R0N merged commit 51e5385 into dev Oct 10, 2026
7 checks passed
@T3ST3ST3R0N
T3ST3ST3R0N deleted the fix/area-chart-theme branch October 22, 2026 12:34
Free-Guy-IR added a commit to Free-Guy-IR/panel that referenced this pull request Nov 2, 2026
…ain bba95f274

Checked with git ls-remote on 2026-10-11 02:55 UTC. Panel dev moved from
d94e157 to 83fe90e with 22 commits; main is still v5.4.1.

- PasarGuard#879 (2d0ca81, loopback Xray client inbounds) is ported by design: the
  fork took the open pull request on 2026-09-25 as 2e7fc45 with migration
  bfd88026565b, the same listener rewrite.
- PasarGuard#934 (a5b28f3) moves from the port queue to a dated waiver until
  2026-11-09: the fork refuses to delete a core that nodes still use
  (W3-013, fix/node-health) instead of restarting those nodes.
- PasarGuard#993 (Hysteria2 FinalMask without a udp mask) is queued until 2026-10-18:
  the fork has the same FinalMask | dict field and the same non-null-safe
  udpHop reads, so a udpHop-only host can fail the whole subscription.
- PasarGuard#984, PasarGuard#985, PasarGuard#986, PasarGuard#989, PasarGuard#944, PasarGuard#864, PasarGuard#948, PasarGuard#951, PasarGuard#778, PasarGuard#774, PasarGuard#787, PasarGuard#994,
  PasarGuard#865, PasarGuard#875, PasarGuard#718, PasarGuard#967, PasarGuard#772, PasarGuard#662, PasarGuard#995 and PasarGuard#913 are queued as
  security: no until 2026-10-25, each with its reason; PasarGuard#913's node-removal
  half is already in the fork through sync_remove_users.
- The branch commits that upstream squash-merged (the three dashboard
  branches, telegram/tests, fix/core-editor-api-section-followup,
  fix/hwid-count-test-cleanup, fix/hysteria-finalmask-quic-only) follow
  their squash, by patch-id or by an equal tree.

Scripts main moved to bba95f274 (PasarGuard#35, PasarGuard#36, PasarGuard#37 after PasarGuard#34). The three
squashes are queued security: no until 2026-10-25, and their pre-squash
branch commits are waived as superseded (equal trees).

Against live upstream the panel gate now fails only on the 17 port-queue
commits classified security: yes, and the forks gate only on node
f72ac0ef (security: yes). No upstream commit is undecided.
Free-Guy-IR pushed a commit to Free-Guy-IR/panel that referenced this pull request Nov 3, 2026
…#985)

area-costume-chart.tsx read useTheme from next-themes, but no next-themes
provider is mounted, so resolvedTheme was always undefined and the chart
used its light-mode colors in dark mode. Read the theme from the app's own
provider, as the pie chart already does since PasarGuard#952.

(cherry picked from commit 51e5385)
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