Skip to content

fea7: th1s is a secret feature#153

Open
mirumodapon wants to merge 5 commits into
mainfrom
secret-feature
Open

fea7: th1s is a secret feature#153
mirumodapon wants to merge 5 commits into
mainfrom
secret-feature

Conversation

@mirumodapon
Copy link
Copy Markdown
Collaborator

No description provided.

@rileychh-dokploy-coscup
Copy link
Copy Markdown

rileychh-dokploy-coscup Bot commented May 17, 2026

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
Nuxt ✅ Done Preview URL 2026-05-17T07:38:39.928Z

@mirumodapon mirumodapon marked this pull request as ready for review May 17, 2026 06:38
Copilot AI review requested due to automatic review settings May 17, 2026 06:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Introduces a hidden "secret feature" mechanism on the client that, on the Dragon Boat Festival, lazy-loads a small animated dragon-boat SVG/WebP overlay, and additionally supports a ?mode=askew query parameter that randomly rotates the page slightly. The hook is wired into the root app.vue so it runs once on app mount.

Changes:

  • Added app/secrets/useSecretFeature.ts composable that, on the client only, optionally applies a body rotation for ?mode=askew and (on a hardcoded date) dynamically imports and renders the dragon-boat component into a body-appended container during browser idle time.
  • Added app/secrets/CpDragonBoatFestival.vue component that, using a decaying-probability "dice roll" every 10 seconds, briefly shows a sailing dragon-boat image with CSS animation.
  • Wired useSecretFeature() into app/app.vue.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
app/secrets/useSecretFeature.ts New client-only hook gating festival/askew features behind a date and query check
app/secrets/CpDragonBoatFestival.vue New animated overlay component with timed visibility and CSS keyframes
app/app.vue Imports and invokes useSecretFeature() at app root
Comments suppressed due to low confidence (2)

app/secrets/useSecretFeature.ts:21

  • The Dragon Boat Festival in 2026 falls on June 19, not June 25. With getMonth() === 5 && getDate() === 25, this component will never render on the intended holiday and will instead render on an unrelated date. Consider adjusting the date check (e.g. getMonth() === 5 && getDate() === 19), or, since the date varies year to year on the Gregorian calendar, computing the date from the lunar calendar or hard‑coding the correct dates per year.
    if (now.getMonth() === 5 && now.getDate() === 25) {

app/secrets/useSecretFeature.ts:19

  • The empty container div is unconditionally created and appended to document.body even when the date check below does not match (i.e., on every page load, year-round). This leaves a stray empty <div> in the DOM. The container creation/appending should be moved inside the date check so it only happens when a feature is actually rendered.
    const container = document.createElement('div')
    document.body.appendChild(container)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/secrets/useSecretFeature.ts Outdated
Comment on lines +14 to +16
if (mode === 'askew') {
document.body.style.transform = `rotate(${Math.random() * 2 - 1}deg)`
}
Comment on lines +1 to +5
<script setup>
const show = ref(false)
let weight = 0.95
let interval = null
let timeout = null
Comment on lines +24 to +26
timeout = setTimeout(() => {
show.value = false
}, 10_000)
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.

2 participants