fea7: th1s is a secret feature#153
Open
mirumodapon wants to merge 5 commits into
Open
Conversation
Dokploy Preview Deployment
|
f7cdb36 to
f7aef3a
Compare
There was a problem hiding this comment.
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.tscomposable that, on the client only, optionally applies a body rotation for?mode=askewand (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.vuecomponent that, using a decaying-probability "dice roll" every 10 seconds, briefly shows a sailing dragon-boat image with CSS animation. - Wired
useSecretFeature()intoapp/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
containerdiv is unconditionally created and appended todocument.bodyeven 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 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.