Repository navigation
Add dice-tiles extension - #22021
Add dice-tiles extension#22021
Conversation
left a comment
There was a problem hiding this comment.
Greptile Overview
Summary
This PR introduces **Dice Tiles**, a new minimalist dice-and-tiles elimination game extension for Raycast. The game allows users to roll dice and eliminate numbered tiles by selecting combinations that match the dice roll sum. Players have limited HP, and mistakes cost health while clearing all tiles grants victory.The extension leverages Raycast's LocalStorage API for persistent game statistics tracking (victories/defeats) and implements a progressive emoji-based reward system that unlocks visual upgrades as players accumulate wins, culminating in a "random-tier pattern" after 500 victories. The UI is built using Raycast's Detail component with keyboard shortcuts for game interaction.
The implementation follows Raycast extension patterns with proper TypeScript typing, React hooks for state management, and ActionPanel integration for native keyboard controls. The extension is categorized under "Fun" and "Games", similar to existing gaming extensions like roll-d20, expanding Raycast's entertainment offerings with a more complex gameplay experience.
PR Description Notes:
- The Buy Me a Coffee link contains a placeholder "yourusername" that should be updated to the actual username
- Minor documentation inconsistency: shortcuts show "Shift + [1–0]" in description but implementation uses standard 1-0 keys
Important Files Changed
Changed Files
| Filename | Score | Overview |
|---|---|---|
| extensions/dice-tiles/package.json | 2/5 | New extension package configuration with missing metadata folder, CHANGELOG.md, and ESLint setup |
| extensions/dice-tiles/src/index.tsx | 4/5 | Main game implementation with React hooks, dice mechanics, tile selection, and LocalStorage persistence |
| extensions/dice-tiles/README.md | 4/5 | Comprehensive game documentation with placeholder Buy Me a Coffee link and minor shortcut inconsistency |
| extensions/dice-tiles/LICENSE | 5/5 | Standard MIT License file with proper copyright attribution |
Confidence score: 2/5
- This PR introduces a new extension but has several critical missing components that prevent store submission
- Score reflects missing required metadata folder with screenshots, missing CHANGELOG.md entry, and missing ESLint configuration
- Pay close attention to package.json requirements and ensure all new extension submission requirements are met
Context used:
Rule from dashboard - Extensions must include at least one screenshot in a metadata folder for store submission. (source)
Rule from dashboard - ## ESLint Configuration
Import Path for defineConfig
- The correct import path for `defineConf... (source)
4 files reviewed, no comments
|
The shortcut documentation is accurate. Each tile selection is mapped to Shift + [1–0], consistent with the code: shortcut={{ key: i === 9 ? "0" : `${i + 1}`, modifiers: ["shift"] }}This explicitly applies the Shift modifier for all numeric keys (1 through 0). The reviewer’s observation seems based on a misunderstanding — the |
commented
Oct 7, 2025
|
Sorry for the number of commits; I was just trying to fix as many issues as possible flagged by the verification bots... |
commented
Oct 15, 2025
|
@pernielsentikaer Sorry to bother you, but the PR bot isn't working and I don't understand why... |
…iguration, and update dependencies. Remove outdated assets and improve README documentation.
commented
Oct 16, 2025
|
Hi 👋 I tried to optimize the code best possible, can you have a look to make sure I didn't break it |
commented
Oct 16, 2025
|
Congratulations on your new Raycast extension! 🚀 You can expect an initial review within five business days. Once the PR is approved and merged, the extension will be available on our Store. |
…ions and updating shortcut types in GameActions component.
commented
Oct 30, 2025
|
This pull request has been automatically marked as stale because it did not have any recent activity. It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊 |
left a comment
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
This PR introduces a new "dice-tiles" extension - a minimalist dice-and-tiles game for Raycast. The extension implements a game where players roll dice and eliminate numbered tiles by selecting combinations that match the dice sum, featuring persistent statistics tracking, progressive emoji-based rewards, and a special random pattern unlock at 500 victories. The codebase follows modern React patterns with a clean separation of concerns: custom hooks manage state and game logic (useGameState, useGameActions), pure utility functions handle game mechanics (gameLogic.ts), and separate UI components render the interface (GameDisplay, GameActions). The extension uses Raycast's LocalStorage for persistence, follows TypeScript best practices with proper type definitions, and includes comprehensive keyboard shortcuts for gameplay interaction.
Important Files Changed
| Filename | Score | Overview |
|---|---|---|
extensions/dice-tiles/package.json |
4/5 | Defines extension metadata, dependencies, and Raycast configuration for the new dice-tiles game |
extensions/dice-tiles/src/index.tsx |
5/5 | Main component orchestrating game state and actions through custom hooks with clean architecture |
extensions/dice-tiles/src/hooks/useGameState.ts |
5/5 | Custom hook managing all game state including tiles, HP, statistics, and persistent storage |
extensions/dice-tiles/src/hooks/useGameActions.ts |
4/5 | Custom hook encapsulating game logic for dice rolling, validation, and victory/defeat handling |
extensions/dice-tiles/src/components/GameDisplay.tsx |
4/5 | Optimized UI component rendering game state and help using Raycast's Detail component |
extensions/dice-tiles/src/components/GameActions.tsx |
4/5 | ActionPanel component providing keyboard shortcuts with performance optimizations |
extensions/dice-tiles/src/gameLogic.ts |
4/5 | Pure utility functions for dice rolling, validation, and reward calculations |
extensions/dice-tiles/src/types.ts |
5/5 | Well-structured TypeScript interfaces defining game state, configuration, and reward system |
extensions/dice-tiles/src/storage.ts |
5/5 | Simple storage functions for persisting victories and defeats using Raycast's LocalStorage |
extensions/dice-tiles/src/constants.ts |
5/5 | Game configuration constants and emoji arrays for visual representation |
extensions/dice-tiles/CHANGELOG.md |
5/5 | Properly formatted initial changelog entry with required template string |
extensions/dice-tiles/README.md |
5/5 | Updated documentation with proper metadata folder structure and formatting |
Confidence score: 4/5
- This PR is generally safe to merge with well-structured code following React and Raycast best practices
- Score reflects excellent architectural patterns but some complexity in game logic that could benefit from additional testing, plus missing metadata folder validation
- Pay close attention to
src/hooks/useGameActions.tsfor complex game state transitions and ensure the metadata folder contains required screenshots
15 files reviewed, 4 comments
| const handleMainAction = useCallback(() => { | ||
| if (showHelp) toggleHelp(); | ||
| else if (gameOver) resetGame(); | ||
| else if (lastRoll.length === 0) gameActions.rollDiceHandler(); | ||
| else gameActions.validateSelectionHandler(); | ||
| }, [showHelp, gameOver, lastRoll.length, toggleHelp, resetGame, gameActions]); |
There was a problem hiding this comment.
style: Dependency array includes gameActions object which will cause unnecessary re-renders since objects have unstable references. Consider memoizing the gameActions hook or extracting specific functions needed.
| await saveVictoriesWithPattern(newVictories); | ||
| setGameOver(true); | ||
| setMessage( | ||
| `🎉 Victory! Cleared all tiles! Total victories: ${newVictories} ${getLifeEmoji(victories, randomLifePattern)} — Press Enter to restart 🕹️`, |
There was a problem hiding this comment.
logic: Victory message uses old victories count instead of newVictories for emoji pattern calculation
| `🎉 Victory! Cleared all tiles! Total victories: ${newVictories} ${getLifeEmoji(victories, randomLifePattern)} — Press Enter to restart 🕹️`, | |
| `🎉 Victory! Cleared all tiles! Total victories: ${newVictories} ${getLifeEmoji(newVictories, randomLifePattern)} — Press Enter to restart 🕹️`, |
| }, [ | ||
| lastRoll, | ||
| gameOver, | ||
| selected, | ||
| tiles, | ||
| setTiles, | ||
| victories, | ||
| randomLifePattern, | ||
| saveVictoriesWithPattern, | ||
| hp, | ||
| setHp, | ||
| setMessage, | ||
| setGameOver, | ||
| saveDefeatsWithState, | ||
| setSelected, | ||
| setLastRoll, | ||
| ]); |
There was a problem hiding this comment.
logic: Missing defeats dependency in useCallback dependency array
| }, [ | |
| lastRoll, | |
| gameOver, | |
| selected, | |
| tiles, | |
| setTiles, | |
| victories, | |
| randomLifePattern, | |
| saveVictoriesWithPattern, | |
| hp, | |
| setHp, | |
| setMessage, | |
| setGameOver, | |
| saveDefeatsWithState, | |
| setSelected, | |
| setLastRoll, | |
| ]); | |
| }, [ | |
| lastRoll, | |
| gameOver, | |
| selected, | |
| tiles, | |
| setTiles, | |
| victories, | |
| defeats, | |
| randomLifePattern, | |
| saveVictoriesWithPattern, | |
| hp, | |
| setHp, | |
| setMessage, | |
| setGameOver, | |
| saveDefeatsWithState, | |
| setSelected, | |
| setLastRoll, | |
| ]); |
| interface GameDisplayProps { | ||
| hp: number; | ||
| victories: number; | ||
| defeats: number; | ||
| randomLifePattern: string[]; | ||
| message: string; | ||
| tiles: number[]; | ||
| selected: number[]; | ||
| showHelp: boolean; | ||
| actions: React.ReactNode; | ||
| } |
There was a problem hiding this comment.
style: Consider using type instead of interface for better consistency with TypeScript conventions
| interface GameDisplayProps { | |
| hp: number; | |
| victories: number; | |
| defeats: number; | |
| randomLifePattern: string[]; | |
| message: string; | |
| tiles: number[]; | |
| selected: number[]; | |
| showHelp: boolean; | |
| actions: React.ReactNode; | |
| } | |
| type GameDisplayProps = { | |
| hp: number; | |
| victories: number; | |
| defeats: number; | |
| randomLifePattern: string[]; | |
| message: string; | |
| tiles: number[]; | |
| selected: number[]; | |
| showHelp: boolean; | |
| actions: React.ReactNode; | |
| } |
Context Used: Context from dashboard - Coding style (source)
commented
Nov 7, 2025
|
Could you look into the suggestions from Greptile, @Jumitti I converted this PR into a draft until it's ready for the review, please press the button |
commented
Nov 7, 2025
|
Everything seems perfect to me. I was able to test it today and it works on my end. Sorry for the late reply, I was in the middle of a big move and my PC wasn't working. Thank you very much for your help! 😀 |
left a comment
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
This PR adds a new Raycast extension called "dice-tiles" - a minimalist dice-and-tiles game where players roll dice and eliminate numbered tiles by selecting combinations that match the dice roll sum. The extension includes a progressive reward system with emoji upgrades, persistent victory/defeat tracking through Raycast's LocalStorage API, and keyboard shortcuts for gameplay. The codebase is well-structured with proper separation of concerns: game state management in custom hooks, type definitions, constants for configuration, and storage utilities. The extension follows standard Raycast extension patterns with proper configuration files, documentation, and metadata.
Important Files Changed
| Filename | Score | Overview |
|---|---|---|
| extensions/dice-tiles/package.json | 4/5 | New extension configuration with proper metadata and dependencies |
| extensions/dice-tiles/src/hooks/useGameState.ts | 4/5 | Game state management hook with proper structure and async data loading |
| extensions/dice-tiles/src/hooks/useGameActions.ts | 4/5 | Game actions hook encapsulating dice rolling and validation logic |
| extensions/dice-tiles/src/types.ts | 5/5 | Well-defined TypeScript interfaces for game state and configuration |
| extensions/dice-tiles/src/constants.ts | 5/5 | Clean game configuration constants and reward system setup |
| extensions/dice-tiles/src/storage.ts | 5/5 | Simple storage abstraction for persistent game statistics |
| extensions/dice-tiles/CHANGELOG.md | 5/5 | Proper changelog format with required PR_MERGE_DATE template |
| extensions/dice-tiles/README.md | 5/5 | Comprehensive documentation with gameplay rules and shortcuts |
| extensions/dice-tiles/LICENSE | 5/5 | Standard MIT license with proper attribution |
| extensions/dice-tiles/.prettierrc | 5/5 | Standard Raycast formatting configuration |
Confidence score: 4/5
- This PR adds a well-structured game extension with solid architecture and follows most Raycast guidelines
- Score reflects generally good implementation but with some logic bugs in game mechanics that could affect user experience
- The useGameActions hook needs attention due to a victory message bug and missing useCallback dependency
10 files reviewed, no comments
commented
Nov 7, 2025
|
Let's get the first iteration out and then we'll see how it goes 😊 |
commented
Nov 7, 2025
|
Published to the Raycast Store: |
commented
Nov 7, 2025
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
Description
Dice Tiles is a minimalist dice-and-tiles game built for Raycast.
The goal is to roll dice and eliminate numbered tiles by selecting those whose sum matches the dice roll.
Each mistake costs HP; clearing all tiles grants a victory. Track your progress through victories and defeats, unlock emoji-based rewards, and reach the ultimate random-tier pattern after 500 wins.
Core features:
Shortcuts:
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare located outside the metadata folder if they were not generated with our metadata tool