Skip to content

feat: theme#23

Merged
anton62k merged 1 commit intomasterfrom
feat/theme
Mar 21, 2026
Merged

feat: theme#23
anton62k merged 1 commit intomasterfrom
feat/theme

Conversation

@anton62k
Copy link
Copy Markdown
Contributor

@anton62k anton62k commented Mar 21, 2026

Summary by cubic

Sync the site theme across revisium.io using a revisium-theme cookie. Applies the cookie theme on navigation and persists changes to the cookie and localStorage.

  • New Features
    • Registered ./src/theme/colorModeSync.js via clientModules to sync with the revisium-theme cookie.
    • On route updates, apply cookie to data-theme and localStorage; observe data-theme and write a 1‑year SameSite=Lax cookie on .revisium.io (no domain on localhost).

Written for commit 303275a. Summary will update on new commits.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/theme/colorModeSync.js">

<violation number="1" location="src/theme/colorModeSync.js:32">
P2: `onRouteDidUpdate` registers a new `MutationObserver` on every navigation without cleanup, which leaks observers and duplicates cookie writes over time.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread src/theme/colorModeSync.js Outdated
@sonarqubecloud
Copy link
Copy Markdown

@anton62k anton62k merged commit fa365bf into master Mar 21, 2026
2 checks passed
@anton62k anton62k deleted the feat/theme branch March 21, 2026 17:11
anton62k added a commit that referenced this pull request Mar 22, 2026
This reverts commit fa365bf.
@anton62k anton62k mentioned this pull request Mar 22, 2026
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