From ca8177c07acd338abdbcb79f56c39a437eb0050f Mon Sep 17 00:00:00 2001 From: Hasnae Date: Sun, 15 Mar 2026 09:05:28 +1100 Subject: [PATCH 1/4] no github pages for now --- .github/workflows/deploy.yml | 44 ------------------------------------ 1 file changed, 44 deletions(-) delete mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 7db0fea..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Deploy to GitHub Pages - -on: - push: - branches: [main] - -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: pages - cancel-in-progress: false - -jobs: - build: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - node-version: 24 - cache: npm - - - run: npm ci - - - name: Build - run: npm run build - - - uses: actions/upload-pages-artifact@v3 - with: - path: web/dist - - deploy: - needs: build - runs-on: ubuntu-24.04 - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - - id: deployment - uses: actions/deploy-pages@v4 From 171236bcd398e828e24e7cd947e602471c41a043 Mon Sep 17 00:00:00 2001 From: Hasnae Date: Sun, 15 Mar 2026 09:09:52 +1100 Subject: [PATCH 2/4] Fix react-refresh lint warnings Remove unused variant exports from badge/button, extract ThemeContext and useTheme hook into separate files, and disable react-refresh rule for TanStack Router route files. Co-Authored-By: Claude Opus 4.6 (1M context) --- web/eslint.config.js | 6 ++++++ web/src/components/theme-context.ts | 11 +++++++++++ web/src/components/theme-provider.tsx | 24 ++---------------------- web/src/components/theme-switcher.tsx | 7 ++----- web/src/components/ui/badge.tsx | 2 +- web/src/components/ui/button.tsx | 2 +- web/src/components/use-theme.ts | 8 ++++++++ 7 files changed, 31 insertions(+), 29 deletions(-) create mode 100644 web/src/components/theme-context.ts create mode 100644 web/src/components/use-theme.ts diff --git a/web/eslint.config.js b/web/eslint.config.js index c4c538c..f8a7a90 100644 --- a/web/eslint.config.js +++ b/web/eslint.config.js @@ -26,4 +26,10 @@ export default defineConfig([ ], }, }, + { + files: ["src/routes/**/*.{ts,tsx}"], + rules: { + "react-refresh/only-export-components": "off", + }, + }, ]); diff --git a/web/src/components/theme-context.ts b/web/src/components/theme-context.ts new file mode 100644 index 0000000..09d2271 --- /dev/null +++ b/web/src/components/theme-context.ts @@ -0,0 +1,11 @@ +import { createContext } from "react"; +import type { ColorTheme, Mode } from "./theme-provider"; + +interface ThemeContextValue { + colorTheme: ColorTheme; + mode: Mode; + setColorTheme: (theme: ColorTheme) => void; + setMode: (mode: Mode) => void; +} + +export const ThemeContext = createContext(null); diff --git a/web/src/components/theme-provider.tsx b/web/src/components/theme-provider.tsx index 67deccb..b074092 100644 --- a/web/src/components/theme-provider.tsx +++ b/web/src/components/theme-provider.tsx @@ -1,23 +1,9 @@ -import { - createContext, - useCallback, - useContext, - useEffect, - useState, -} from "react"; +import { useCallback, useEffect, useState } from "react"; +import { ThemeContext } from "./theme-context"; export type ColorTheme = "burgundy" | "sage" | "ocean" | "amethyst"; export type Mode = "light" | "dark" | "system"; -interface ThemeContextValue { - colorTheme: ColorTheme; - mode: Mode; - setColorTheme: (theme: ColorTheme) => void; - setMode: (mode: Mode) => void; -} - -const ThemeContext = createContext(null); - const THEME_KEY = "game-gallery-theme"; const MODE_KEY = "game-gallery-mode"; @@ -64,9 +50,3 @@ export function ThemeProvider({ children }: { children: React.ReactNode }) { ); } - -export function useTheme() { - const ctx = useContext(ThemeContext); - if (!ctx) throw new Error("useTheme must be used within ThemeProvider"); - return ctx; -} diff --git a/web/src/components/theme-switcher.tsx b/web/src/components/theme-switcher.tsx index 8910c00..5098259 100644 --- a/web/src/components/theme-switcher.tsx +++ b/web/src/components/theme-switcher.tsx @@ -1,10 +1,7 @@ import { Sun, Moon, Monitor } from "lucide-react"; import { Button } from "@/components/ui/button"; -import { - useTheme, - type ColorTheme, - type Mode, -} from "@/components/theme-provider"; +import { useTheme } from "@/components/use-theme"; +import type { ColorTheme, Mode } from "@/components/theme-provider"; const colorThemes: { value: ColorTheme; label: string; swatch: string }[] = [ { value: "burgundy", label: "Burgundy", swatch: "oklch(.37 .14 15)" }, diff --git a/web/src/components/ui/badge.tsx b/web/src/components/ui/badge.tsx index a8cbbac..a6e893c 100644 --- a/web/src/components/ui/badge.tsx +++ b/web/src/components/ui/badge.tsx @@ -49,4 +49,4 @@ function Badge({ }); } -export { Badge, badgeVariants }; +export { Badge }; diff --git a/web/src/components/ui/button.tsx b/web/src/components/ui/button.tsx index 5ca5e0c..bb07685 100644 --- a/web/src/components/ui/button.tsx +++ b/web/src/components/ui/button.tsx @@ -55,4 +55,4 @@ function Button({ ); } -export { Button, buttonVariants }; +export { Button }; diff --git a/web/src/components/use-theme.ts b/web/src/components/use-theme.ts new file mode 100644 index 0000000..596ace8 --- /dev/null +++ b/web/src/components/use-theme.ts @@ -0,0 +1,8 @@ +import { useContext } from "react"; +import { ThemeContext } from "./theme-context"; + +export function useTheme() { + const ctx = useContext(ThemeContext); + if (!ctx) throw new Error("useTheme must be used within ThemeProvider"); + return ctx; +} From 8291f081f3fc3f1d40e31d899cf07e476d638d3b Mon Sep 17 00:00:00 2001 From: Hasnae Date: Sun, 15 Mar 2026 09:12:41 +1100 Subject: [PATCH 3/4] Remove /vibe-coded base path Serve the app from root instead of the /vibe-coded subpath, since GitHub Pages deployment is no longer used. Co-Authored-By: Claude Opus 4.6 (1M context) --- web/src/main.tsx | 2 +- web/vite.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/main.tsx b/web/src/main.tsx index e3215fc..2d05ee9 100644 --- a/web/src/main.tsx +++ b/web/src/main.tsx @@ -5,7 +5,7 @@ import { ThemeProvider } from "@/components/theme-provider"; import { routeTree } from "./routeTree.gen"; import "./index.css"; -const router = createRouter({ routeTree, basepath: "/vibe-coded" }); +const router = createRouter({ routeTree }); declare module "@tanstack/react-router" { interface Register { diff --git a/web/vite.config.ts b/web/vite.config.ts index 6370867..8594c1b 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -20,7 +20,7 @@ function spaFallback(): Plugin { // https://vite.dev/config/ export default defineConfig({ - base: "/vibe-coded/", + base: "/", plugins: [ TanStackRouterVite({ target: "react" }), react(), From 2acc5e4d3b7e292af239bcd638468ec1132d5f47 Mon Sep 17 00:00:00 2001 From: Hasnae Date: Sun, 15 Mar 2026 09:15:50 +1100 Subject: [PATCH 4/4] Switch license to MIT and acknowledge 2048 original author Add LICENSE file with MIT license and credit Gabriele Cirulli as the creator of the original 2048 game that inspired 2048 Time Rush. Co-Authored-By: Claude Opus 4.6 (1M context) --- LICENSE | 29 +++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a3ab825 --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +MIT License + +Copyright (c) 2025 Hasnae R. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +## Acknowledgements + +The "2048 Time Rush" game included in this project is inspired by the original +2048 game created by Gabriele Cirulli (https://github.com/gabrielecirulli/2048), +which is licensed under the MIT License. diff --git a/package.json b/package.json index 3aaa16d..bc20a51 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@labset/vibe-coded", "version": "1.0.0", "description": "", - "license": "Apache-2.0", + "license": "MIT", "author": "Hasnae R.", "workspaces": [ "web/"