Commit Graph

58 Commits

Author SHA1 Message Date
f4bc25b3b1 feat: click expected value + contribution display
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 21s
CockpitHeader: /clic shows expected value (double+crit included), amber.
ClickPanel: full breakdown with expected value, contribution estimate
(~5 clics/s → X/s + auto → Y% of total), formula visible.
Passif/clic distinction clear in the cockpit.
2026-03-28 21:01:17 +01:00
25768e3665 feat: click panel breakdown + guide updated
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 20s
ClickPanel in Production tab — full click breakdown:
- Gain per click with formula (base × prestige × tree)
- Double Ponte chance (+ how to unlock if not)
- Crit Ponte chance (+ how to unlock if not)
- Auto-Ponte rate + effective prod/s
- Hint to invest in Ponte branch when no tree bonuses

Guide updated with 11 sections:
- Ponte (clic) section — breakdown, double/crit/auto explained
- Generateurs section — effective prod, multi-buy, share bars
- Prestige section — quadratic scaling formula explained
- Arbre section — 3 branches + convergence detailed
- Capstones section — all 3 + convergence alpha/omega
2026-03-28 20:58:18 +01:00
120f4bedca feat: buy x1/x5/x10/xMax + production preview per generator
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 21s
- buyGenerator() supports quantity param (multi-buy loop)
- maxAffordable() / bulkCost() — compute max purchasable + total cost
- GeneratorShop: mode selector (x1/x5/x10/MAX)
- Each generator shows +X/s in amber — what the next purchase adds
- Button shows total cost + quantity (e.g. "1.5k (x5)")
2026-03-28 20:52:30 +01:00
38e63fdf22 feat: prestige threshold scales quadratically with prestige count
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 21s
threshold = 1M × (1 + 0.1 × prestigeCount)² × (1 - treeReduction)

P0=1M, P5=2.25M, P10=4M, P20=9M, P50=36M
Tree reduction still applies on top. Forces strategic prestige timing
and gives the idle loop longevity.
2026-03-28 20:50:34 +01:00
9d27cb6648 feat: show effective production per generator with all bonuses
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 21s
New generatorEffectiveProduction() — applies prestige mult, tree mult,
nid boost, synergy, and convergence to per-generator production.

GeneratorShop now shows:
- Effective prod/s (green, with all bonuses)
- % share of total production
- Mini progress bar per generator
- When owned=0: shows effective prod per unit (so you see upgrade impact)
2026-03-28 20:47:24 +01:00
39921aa8fc fix: always merge evolutionTree/generators with defaults on load
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 21s
Server saves don't store all node fields (branch, cost, effect, etc.).
migrateSave now always rebuilds tree from DEFAULT_EVOLUTION_TREE,
preserving unlocked state from the save. Fixes empty evolution tree.
2026-03-28 20:44:26 +01:00
1488962537 debug: log evolutionTree state to diagnose empty nodes
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 22s
2026-03-28 20:42:31 +01:00
67931eeadb fix: refactor store to singleton class pattern (s.subscribe fix)
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 21s
Exported $state proxies were confused with Svelte stores by SvelteKit
runtime, causing "s.subscribe is not a function" on /jeu.

Fix: encapsulate all $state fields in a Game class, export singleton.
Components import { game } and access game.state, game.click(), etc.
Class fields are proper $state — no raw proxy exported.
2026-03-28 20:39:21 +01:00
cce7fa3190 fix: rename save-sync.ts → save-sync.svelte.ts for $state compat
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 23s
Plain .ts files can't read $state proxies from .svelte.ts modules.
The s.subscribe error was caused by SvelteKit treating the raw signal
as a legacy store. Renaming to .svelte.ts fixes the compilation.
2026-03-28 20:30:52 +01:00
10ff2d32f5 fix: refactor store to direct $state exports + Object.assign mutation
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 22s
Svelte 5 can't export reassigned $state — use const $state + Object.assign.
All components now import state/actions directly (no gameStore wrapper).
Deep reactivity works: evolutionTree nodes, generators, cosmetics all tracked.
2026-03-28 20:23:57 +01:00
ce38975c10 fix: store reactivity — version counter pattern for deep state changes
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 21s
$state<GameState> caused Svelte 5 to lose track of deep property changes
(evolutionTree[i].branch, generators[i].owned, etc.).

Fix: _stateVersion counter + getState() creates explicit reactive deps.
canPrestige/productionPerSecond are now live getters, no manual updateDerived().
2026-03-28 20:10:21 +01:00
f6bff6e389 feat: migrate frontend React 18 → Svelte 5 + SvelteKit
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 22s
Core logic portable (economy, balance, cosmetics, migrateSave) — zero rewrite.
136 tests green, identiques. Backend inchangé.

- Svelte 5 runes stores (game, auth, toast) remplacent Zustand
- SvelteKit adapter-static SPA (dist/ output, fallback index.html)
- Tailwind v4 conservé, design system .gp-* porté
- Transitions natives : slide, fly, scale, fade sur toute l'UI
- Sidebar tabbée (Production/Evolution/Collection) + CollapsiblePanel
- Mobile bottom sheet avec FAB toggle + backdrop blur
- Click particles réactifs Svelte (plus de DOM impératif)
- TadpoleSprite bounce + glow ring au clic
- Guide refait en accordéon, Achievements avec filtres
- a11y : focus-visible, Escape modals, aria-current, aria-labels
- CI/CD adapté (tests + build + rsync)
- Build 504K (vs ~1.2MB React)
2026-03-28 20:03:21 +01:00
3de0492631 fix: evolution tree tabs — one branch at a time instead of 3 cramped columns
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 18s
2026-03-28 18:52:14 +01:00
a665fdf2f4 feat: toast notifications + guide du gardien
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 19s
- Toast system: store Zustand + ToastContainer (slide-in, auto-dismiss)
- Toasts on: prestige, milestone claim, capstone unlock, cosmetic unlock
- Guide in-game: /guide route, toutes les mecaniques expliquees
- Lien navbar + sidebar
2026-03-28 18:47:41 +01:00
450d559216 fix: guard claimedMilestones in MilestonesPanel component
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 18s
2026-03-28 18:39:27 +01:00
4df6451dac fix: guard claimedMilestones undefined on v1 saves
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 19s
Saves loaded before migrateSave runs (or stale localStorage) can have
claimedMilestones undefined — guard with ?? [] in all accessors.
2026-03-28 18:33:19 +01:00
ed8cf87d4e feat: Sprint 3 — Prestige Loop endless
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 35s
- Migration saves: saveVersion pattern + migrateSave lazy (v1→v2)
- Formule ADN rebalancée: log10 + clamp min 1 + cap bonus ×4
- Prestige Experience: modal fullscreen, preview ADN, stats run, best run
- Arbre V2: 25 nœuds, 3 capstones, post-capstones repeatables (scaling par tranche)
- Convergence évolutif Alpha→Omega (tier system)
- Reset arbre: 1 gratuit/prestige, payant linéaire au-delà
- Milestones prestige: 8 paliers (1→100), cosmétiques exclusifs, bonus gameplay
- balance.ts: constantes centralisées pour playtest
- 136 tests green, 0 regression
2026-03-28 18:24:24 +01:00
f80f071c24 feat: 9 SVG placeholders cosmétiques (32x32, 1 couleur/slot)
crown, cap-swamp, glasses-savant, mask-frog, cape-algae,
armor-scales, flame-tail, ribbon, particles-gold.
Placeholders à remplacer par l'art final plus tard.
2026-03-28 12:43:07 +01:00
2c924c1e4a fix: câbler tous les effets arbre + cleanup dette Sprint 2
- double_click_chance + crit_click_chance câblés dans applyClick (RNG)
- auto_click câblé dans le tick (auto-pontes/s)
- unlock_generator (Résilience) → 1 Lac Mystique gratuit au prestige
- ponte_critique requires double_ponte (fix branche morte)
- achievement_scaling retiré (nœud absent), full_tree + symbiose fixés
- Particule feedback coloré (crit=ambre, double=violet)
- 99 tests (tous passent)
2026-03-28 12:41:12 +01:00
2a242e97cc feat: cosmétiques V1 — 5 slots SVG, récompenses achievements + prestige
10 cosmétiques (2/slot), unlock auto sur achievements et prestige tiers.
TadpoleSprite composant SVG stack (base + overlays équipés).
CosmeticsPanel dans la sidebar — inventaire, équiper/retirer par slot.
GameState étendu (cosmeticInventory + cosmeticEquipped), backfill saves.
17 nouveaux tests cosmétiques (92 total, tous passent).
2026-03-28 12:09:26 +01:00
ae50908bc9 feat: arbre d'évolution 3 voies — ponte/marais/adaptation
18 nœuds (6/branche), nœuds exclusifs (pick one), reset gratuit.
Nouveaux effets : double_click, auto_click, crit, generator_boost,
cost_reduction, prestige_dna_bonus, offline_boost, threshold_reduction.
UI 3 colonnes colorées, seuil prestige dynamique, coût réduit.
75 tests (tous passent).
2026-03-28 11:52:51 +01:00
3ba10dad5f feat: offline gains — courbe inversée 2h, cap 25%, écran résumé
offlineEfficiency() : 100% (0-15min) → 25% (1h) → 0% (2h).
computeOfflineGains() intègre la courbe par tranches de 1min.
GameState.lastOnline ajouté, store hydrate avec offline report.
OfflineReport.tsx affiché au retour si absence > 60s.
13 nouveaux tests (66 total, tous passent).
2026-03-28 11:44:59 +01:00
b58d39e707 feat: migrate SCSS → Tailwind CSS + remove sass dependency
12 SCSS files (1167 lines) replaced by centralized index.css with
Tailwind v4 @theme tokens, @layer components, and utility classes.
Game panel design system (gp-*) preserved as CSS components.
Inline styles in Settings/Login/MilestoneBar converted to Tailwind utilities.
sass removed from dependencies. Build clean, 53 tests pass.
2026-03-28 11:19:45 +01:00
8cc9fdaa62 fix: 500ms delay on focus reload — wait for other tab's blur save
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 17s
2026-03-24 14:51:38 +01:00
3145758747 fix: guard ALL saves behind ready — never save DEFAULT_STATE to server
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 17s
Root cause: on refresh, store starts with DEFAULT_STATE (resources: 0).
Blur/interval/unload handlers saved this zero state before server load.
Fix: every save path checks useGameStore.getState().ready before writing.
2026-03-24 14:47:23 +01:00
79ac1b0659 feat: multi-tab sync — save on blur, reload from server on focus
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 19s
- On blur: immediate save to server (no 30s wait)
- On focus: fetch server save, load if newer than local
- Handles multi-browser scenario (laptop → desktop)
2026-03-24 14:43:58 +01:00
e175844d87 fix: move hooks before ready guard — React rules of hooks
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 17s
2026-03-24 14:40:32 +01:00
8ce54bfb03 feat: server-authoritative save — wait for server before game starts
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 18s
- Store starts in ready:false — no game actions until authority loaded
- useSaveSync signals serverLoaded (success, empty, or unreachable)
- GameSync orchestrates: logged in → wait server, guest → localStorage
- Home shows loading screen until ready
- localStorage = cache only, server = authority for logged-in users
2026-03-24 14:30:53 +01:00
3fc5e98069 feat: Settings page — profile + link/unlink providers via SuperOAuth API
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 18s
- Store SuperOAuth access_token in localStorage for profile API calls
- Settings page: profile info, linked providers, link/unlink buttons
- Navbar: settings icon replaces logout button
2026-03-24 14:00:44 +01:00
17a848bbb0 feat: 4 OAuth providers (Discord/GitHub/Google/Twitch) — standardized login
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 16s
2026-03-24 13:26:51 +01:00
b6d68374d3 fix: use localStorage for PKCE verifier — survives cross-site redirects
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 21s
2026-03-24 13:18:56 +01:00
91d1616dd7 feat: PKCE auth + CI/CD deploy
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 25s
- Frontend: PKCE flow (oauth.js, api.js centralized, cookie-based AuthContext)
- Backend: token introspection, cookies httpOnly, refresh endpoint
- Replaced localStorage JWT with httpOnly session cookies
- useSaveSync migrated to cookie auth
- cookie-parser added
- Gitea CI workflow (vps-runner pattern)
2026-03-24 13:01:15 +01:00
39f683a31e feat: système de zones visuelles — fondation layout 3 couches
- zones.scss : système data-zone avec biomes (swamp, landing, page)
- Home.jsx migré de .game-cover → zone[data-zone="swamp"]
- Landing.jsx migré → zone[data-zone="landing"]
- Background sorti de home.scss → zones.scss (un seul endroit)
- Prêt pour ajouter des biomes (cave, volcano, ocean) en une ligne
2026-03-20 16:33:47 +01:00
3839a1e6a2 feat: suppression HUD (redondant avec cockpit), compteur stylé, navbar nettoyée
- Suppression Hud.jsx + HUDON/HUDOFF.svg (cockpit header fait le même job)
- Retrait toggle HUD de la navbar + props isVisible
- Compteur click-zone : glow vert, plus gros, lisible sur fond sombre
- Tooltip sur le bouton bulles navbar
2026-03-20 16:28:47 +01:00
c673ae0da5 feat: tooltips explicatifs sur le cockpit, générateurs et prestige
Chaque stat du header, le titre Générateurs et Prestige ont un tooltip
natif (title) qui explique à quoi sert la valeur — aide le nouveau joueur
sans alourdir l'interface pour les habitués.
2026-03-20 16:24:41 +01:00
2db3c12fc6 fix: particule clic plus visible (plus grosse, glow, durée 1.2s) + label /clic explicite 2026-03-20 16:22:29 +01:00
b475fb8953 fix: particule clic affiche le vrai gain (clickMult × prestigeMult × treeMult)
Ajout getClickGain() dans economy.ts — utilisé par la particule de feedback
et le cockpit header "Ponte". Avant : affichait toujours +1.
2026-03-20 16:18:45 +01:00
4ad60c9423 fix: suppression resource-counter navbar — redondant avec cockpit header 2026-03-20 16:16:57 +01:00
de7f6c366e feat: nouveau background marais — remplace le paysage Noël
Image carrée 1024x1024, background-position center 70% pour garder
les nénuphars et l'eau visible en bas (zone du têtard cliquable).
2026-03-20 16:14:08 +01:00
ed0f7b614a fix: cockpit header — grille 5 colonnes compacte au lieu d'empilement vertical 2026-03-20 16:07:08 +01:00
9065b1c593 feat: cockpit sidebar — design tokens, panels harmonisés, header stats fixe
- Design tokens game dans root.scss (--gp-*) — un seul endroit pour thémiser
- game-panels.scss : classes partagées (gp, gp-row, gp-btn, gp-progress, etc.)
- CockpitHeader : dashboard résumé (prod/s, ponte, mult, ADN, génération)
- Tous les panels refactorisés sur le système gp-* (tailles, couleurs, spacing)
- Sidebar structurée en zones : header → progression → générateurs → prestige → évolution
2026-03-20 16:03:59 +01:00
03b41649ee feat: nouveaux assets design — tadpole pixel art V5, icônes bulles, aura swamp
- tadpole.svg : pixel art kawaii 32x32 avec système de slots cosmétiques
  (slot-hat, slot-eyes, slot-body, slot-tail, slot-accessory)
- SnowOn/SnowOff.svg : icônes bulles (remplace flocons de neige)
- aura-swamp.svg : premier overlay cosmétique (algues, ripple, bulles)
2026-03-20 15:55:37 +01:00
b38bb4b4c7 feat: UX game — stats live, production détaillée, prestige visible, badge achievements
- Click-zone : production/s, puissance ponte, multiplicateur toujours visibles
- GeneratorShop : production totale en header, prod individuelle par générateur
- PrestigePanel : toujours affiché (hint "Atteins 1M" si pas encore dispo)
- Badge achievements X/27 dans la sidebar avec lien vers /achievements
- Landing : tadpole sprite animé en accroche visuelle
2026-03-20 15:26:55 +01:00
3d69899dbf fix: backend dead code + bug destroy + nettoyage legacy
- Suppression forgottenPassword/resetPassword (dead code, routes jamais câblées)
- Suppression nodemailer (plus utilisé)
- Fix destroy() : getById() → read() (bug — méthode inexistante)
- Ajout getByNickname() dans UserManager (appelé mais manquant)
- README rebrandé Clickerz/Tetardtek
- Commentaire legacy WildCoinContext supprimé
- SPRINT1.md : ref Xmass nettoyée
2026-03-20 15:11:26 +01:00
924e919a65 fix: effet ambiance tildes → bulles (° au lieu de ~) 2026-03-20 14:54:33 +01:00
8c9c4bfdc5 chore: purge assets legacy — 12 SVG/webp, bretzel logo, CardContact dead code
- Suppression 11 SVG non référencés (Beer, Bonhome, Bonnet, Canne, Cookie,
  Courone, Hand, PainDep, Tasse, bg-homepage, logo bretzel)
- Suppression share-cover.webp non référencé
- Favicon bretzel → tadpole.svg
- Footer : CardContact inliné, suppression composant + scss
- Suppression .gitkeep inutile (pages/ a des fichiers)
2026-03-20 14:42:44 +01:00
0c9170af65 feat: suppression boutique legacy + refonte achievements milestones Clickerz
- Suppression route /boutique + Boutique.jsx, BoutiqueCard.jsx, shop.json, scss associés
  (le GeneratorShop sidebar fait déjà le job)
- Refonte complète achievements : 27 milestones basés sur le GameState réel
  (paliers ressources, générateurs, prestige, évolution, easter eggs humour)
- Suppression ancien système JSON statique + AchievementsCard legacy
- Page achievements : unlocked/locked state-aware, compteur progression
2026-03-20 14:34:48 +01:00
0374602047 chore: rebrand navbar + footer — tadpole logo, retrait Boutique nav, copyright Tetardtek
- Logo bretzel → tadpole.svg (navbar + footer)
- Retrait lien Boutique de la navigation (page conservée, masquée)
- Footer : texte Clickerz, GitHub Kevin T seul, © 2026 Tetardtek · Powered by Brain
2026-03-20 14:24:26 +01:00
5323ad056e chore: suppression artefacts Xmass — portraits PNG, WildCoin, entries formation
- Suppression dossier png/ (13 fichiers portraits formation + w-coin + bg-cover legacy)
- Suppression entries Achievements 48-58 (portraits promo Wild Code School)
- Remplacement icône monnaie w-coin.png → tadpole.svg dans boutiquecard
2026-03-20 14:07:59 +01:00
8bb0fa4a8e chore: suppression artefacts Xmass — SVG SantaClause, WildCoin, Mouffle, Bretzel
Plus aucun code ne référence ces assets. Le seul SVG legacy
encore utilisé (SantaClause-bag) a déjà été copié en tadpole.svg.
2026-03-20 14:03:35 +01:00