Skip to content

Add StarMine Command Deck UI (React), styles and preview HTML#1

Open
jayCryptoJay wants to merge 1 commit into
mainfrom
codex/improve-telegram-app-usability-and-design
Open

Add StarMine Command Deck UI (React), styles and preview HTML#1
jayCryptoJay wants to merge 1 commit into
mainfrom
codex/improve-telegram-app-usability-and-design

Conversation

@jayCryptoJay
Copy link
Copy Markdown
Owner

Motivation

  • Provide a playable frontend for the StarMine project featuring mining mechanics, upgrades, a mini-game and activity/quest UI for preview and local development.
  • Include a standalone preview page to test game logic without full app hosting and to surface interactions with the Telegram WebApp API via a lightweight mock.

Description

  • Add src/static/App.jsx implementing the full React UI with mining sessions, timers, session yield accounting, upgrade/power-up purchases, daily quests, achievements, an activity feed, and a 20s "Stellar Tap" mini-game, plus a small mock of the Telegram WebApp API for local preview.
  • Add src/static/App.css with themed styles and animations for the starfield, drill orb, panels, badges, buttons and achievement states.
  • Add src/static/preview.html as a minimal standalone preview that mirrors core gameplay logic in plain JS/HTML to facilitate quick local checks of timers, events and the mini-game without bundling.
  • Use existing UI building blocks (Button, Card, Progress, Tabs) in the React component and wire up stateful effects (useEffect) for intervals, cosmic events, and game timers.

Testing

  • No automated tests were executed for this PR.

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b2a045513

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +2 to +5
import { Button } from './components/ui/button';
import { Card, CardContent, CardHeader, CardTitle } from './components/ui/card';
import { Progress } from './components/ui/progress';
import { Tabs, TabsContent, TabsList, TabsTrigger } from './components/ui/tabs';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add missing UI component modules before shipping App.jsx

App.jsx imports ./components/ui/button, card, progress, and tabs, but this commit does not add those modules anywhere under starmine_backend/src/static, so a normal React build will fail to resolve these imports and the new UI cannot compile. Please include these component files (or switch to existing local components) in the same change.

Useful? React with 👍 / 👎.

Comment on lines +102 to +104
setGameTimer((prev) => {
if (prev <= 1) {
finishMiniGame();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Use current tap score when mini-game timer expires

The mini-game interval effect only depends on gameLive, so the finishMiniGame callback captured by this interval is the one from round start (when tapScore is reset). When the timer reaches zero, rewards, quest progress, and best-score updates are computed from that stale score instead of the actual final score. This causes incorrect payouts for every round.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant