Repository navigation
feat(tools): add song sliding puzzle solver replay tool - #104
Conversation
Add a dedicated Song Sliding Puzzle replay tool under /tools/song-puzzle to display optimal and near-optimal solution animations and text steps for the in-game song cover sliding puzzle minigame across dimensions from 3x3 to 8x8.
|
感谢贡献这个很有意思且完成度很高的工具!路由注册、5 语种 i18n 对齐、MUI 按路径按需引入、复用 完整审阅代码与上游数据包后,整理出以下几个建议在合并前处理的关键问题与细节优化: 1. 【阻塞 / 架构与国内可用性】静态解法数据源与
|
- Use R2 storage with local and GitHub fallbacks to ensure domestic accessibility - Prevent replaceState rate limit crash during autoplay - Guard spoiler song auto-selection and retain header picker in spoiler state - Keep step list scrolling contained within container to avoid page jumps - Use screen reading numbers for tile display and add subtle slot targets - Replace broken animation classes with self-contained CSS keyframes - Align with Material Design 3 semantic colors and aria attributes - Correct i18n typos in Traditional Chinese and Japanese
|
非常感谢 @Exmeaning 如此详尽细致且切中要害的 Review!提出的每个问题都非常关键,尤其是在 Safari 速率限制、移动端滚动和剧透边界处理上。 针对以上建议,已完成全量整改并通过验证,具体处理如下: 1. 静态解法数据源与国内可用性
2. 运行时边界与移动端交互修复
3. 交互逻辑与 MD3 规范对齐
4. 文案笔误与代码清理
相关提交: |
|
动作好快!复审了 二审走读新代码时发现 1 个因 1. 【功能 Bug】
|
Summary
Add a dedicated Song Sliding Puzzle tool at
/tools/song-puzzleto showcase optimal and near-optimal solution replays for the in-game song cover sliding puzzle minigame across all supported grid dimensions (3x3 to 8x8).Features & Implementation
src/lib/song-puzzle/math.ts):background-positionandbackground-sizedirectly from original cover artwork without requiring pre-cut image assets.getTileDisplayNumber) and physical movement vectors (getTileDirection).PuzzleStage.tsx):translate3dto eliminate DOM reconstruction during high-frequency playback (60/120fps).cubic-bezier(0.05, 0.7, 0.1, 1.0)) with adaptive duration for variable speeds (0.5x, 1x, 2x, 4x) andmotion-reduce:transition-nonerespect.PuzzleControls.tsx,PuzzleStepList.tsx):optimal,near-optimal,heuristic) and solver algorithm indicators.RouteGlyph.tsx.zh-CN,zh-TW,ja-JP,en-US,ko-KR).https://storage.bdon.moe/moenotes/slidepuzzle/dist) with local development and upstream GitHub raw fallbacks.Review Fixes
https://storage.bdon.moe/moenotes/slidepuzzle/dist/(EdgeOne CDN cached); eliminated 404 cascade in production; added clear network error banner and retry button.replaceUrlupdates during active autoplay to avoid browserreplaceStatesafety rate limit exceptions on WebKit/Safari.listContainerRef.scrollTopto prevent hijacking window/page scroll on mobile viewports.bg-primary-container,.md3-surface, etc.), addedaria-pressedstates, and wireduseSongTitlefor user title language preferences.Verification
bun test tests/song-puzzle-math.test.ts tests/song-puzzle-steplist.test.ts tests/md3-shell.test.tsx(all pass)bun run lint:i18n(5 core locales strictly verified)bun run lint:routes(all 69 routes verified)bun run lint:arch(architecture rules pass)bun run lint:text(no hardcoded UI text)bun run check(TypeScript typecheck passes with 0 errors)bun run check:search-seo(search and SEO routes pass)