SVG icons, custom logo, EN i18n cleanup, Windows desktop build - #1
Merged
Conversation
… packaging - Replace all emoji with lucide-react icons across the panel UI; add a custom pixel-art "bot head" SVG logo (BotLogo.tsx) used in the sidebar, favicon, and empty states, replacing the wolf emoji placeholder - Add an About footer to Settings with cayadev.com / GitHub links and MIT copyright - Audit and translate hardcoded Turkish strings so the English locale is actually English, including server-emitted log messages shown in the Log panel and printed to the terminal (server/src/**) - Package the app as a Windows desktop build via Electron: electron/main.cjs forks the existing Express/mineflayer server as a child process and points a BrowserWindow at it; data now writes to the OS per-user data dir instead of the install folder (CAYA_DATA_DIR override) - electron-builder config produces both an NSIS installer and a portable exe (npm run dist:win), using a generated app icon (build/icon.png, scripts/make-icon.mjs) matching the new logo - Add build-release.bat / release.bat for a one-click local release build - Add scripts/check-i18n-keys.mjs and scripts/extract-tr-strings.mjs as ongoing lint helpers for i18n key parity and leftover Turkish text Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR modernizes the panel UI and prepares the project for Windows desktop distribution by standardizing iconography/logos, improving English i18n coverage (including server-emitted messages), and adding an Electron packaging + release workflow.
Changes:
- Replaced emoji-based UI affordances with
lucide-reacticons and introduced a sharedBotLogoSVG used across the app (sidebar, empty states, favicon). - Expanded i18n usage across web UI and server messages; updated several formatting helpers to be locale-aware.
- Added Electron Windows build support (child-process server +
electron-builder), plus release/lint helper scripts and updated ignore rules.
Reviewed changes
Copilot reviewed 85 out of 95 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| web/src/pages/Settings.tsx | Adds icon header for language section + About footer with links and logo. |
| web/src/pages/Servers.tsx | Replaces hardcoded TR strings with i18n keys. |
| web/src/pages/Schematics.tsx | Replaces hardcoded TR strings, adds icon-based file picker UI, improves subtitle rendering. |
| web/src/pages/Placeholders.tsx | Removes dead placeholder pages. |
| web/src/pages/Dashboard.tsx | Uses BotLogo in empty state instead of emoji. |
| web/src/pages/BotDetail.tsx | Replaces emojis with lucide icons; passes locale into dimension labeling. |
| web/src/pages/Automations.tsx | Adds new action fields (count/drop/match modes) and replaces emoji glyphs with lucide icons. |
| web/src/lib/format.ts | Makes time/dimension formatting locale-aware via i18n translate. |
| web/src/lib/api.ts | Improves fallback error message to English when server error is absent. |
| web/src/components/TasksPanel.tsx | Replaces hardcoded TR UI/toasts with i18n and uses lucide icon. |
| web/src/components/NearbyPlayers.tsx | Adds i18n and replaces hardcoded TR UI/toasts; renames interval var to avoid shadowing. |
| web/src/components/LogPanel.tsx | Localizes log level chips and timestamps via i18n/locale. |
| web/src/components/Layout.tsx | Replaces emoji nav icons with lucide icons and uses BotLogo. |
| web/src/components/ItemPicker.tsx | Localizes placeholder and minor UI text. |
| web/src/components/GatherCraftPanel.tsx | Localizes panel strings and prompts via i18n. |
| web/src/components/ErrorBoundary.tsx | Uses lucide icon + translated strings; reads locale from store. |
| web/src/components/ChatPanel.tsx | Localizes placeholders/tags; timestamps now locale-aware. |
| web/src/components/BuildPanel.tsx | Localizes UI strings and replaces hardcoded TR text with i18n keys. |
| web/src/components/BuildAnim.tsx | Localizes status labels/counters via i18n. |
| web/src/components/BotLogo.tsx | Introduces shared pixel-art SVG logo component. |
| web/src/components/BotCard.tsx | Replaces emojis with icons and localizes strings; dimension label now locale-aware. |
| web/src/components/Bars.tsx | Changes StatBar.icon from string to ReactNode to support SVG icons. |
| web/src/components/automation/AdvancedFlowBuilder.tsx | Replaces arrow/close glyphs with lucide icons in the advanced flow editor. |
| web/src/components/AllChatPanel.tsx | Localizes empty state/tags and makes timestamps locale-aware. |
| web/src/components/AddBotModal.tsx | Localizes modal strings and improves pluralized success toast. |
| web/package.json | Adds lucide-react dependency. |
| web/index.html | Replaces emoji favicon with SVG logo and updates document title. |
| server/src/utils/chatText.ts | Converts friendly error/translate map strings to English. |
| server/src/types.ts | Updates various docs/strings; keeps shared types aligned with new UI behavior. |
| server/src/persistence/store.ts | Converts persistence read/write log messages to English. |
| server/src/modules/world/memory.ts | Updates module description text. |
| server/src/modules/survival/waterGuard.ts | Converts many log/status strings to English. |
| server/src/modules/survival/index.ts | Updates module header text and some log strings to English. |
| server/src/modules/survival/hazardGuard.ts | Converts hazard guard logs/status strings to English. |
| server/src/modules/survival/bucketScoop.ts | Updates internal comments/strings for English consistency. |
| server/src/modules/movement/water.ts | Updates comments to English (partial). |
| server/src/modules/movement/look.ts | Updates comments to English (partial). |
| server/src/modules/inventory/index.ts | Converts inventory errors/messages to English. |
| server/src/modules/gather/smartGather.ts | Adds count-mode support and converts many labels/messages to English. |
| server/src/modules/gather/ringSearch.ts | Adds surface-travel option and movement options; converts labels to English. |
| server/src/modules/craft/smartCraft.ts | Converts craft/gather errors/labels to English. |
| server/src/modules/craft/index.ts | Converts task labels/logs/errors to English. |
| server/src/modules/combat/weapons.ts | Updates comments to English (partial). |
| server/src/modules/combat/realism.ts | Converts a cancellation message and LoS detail to English. |
| server/src/modules/chat/parse.ts | Adjusts chat parsing docs/regex patterns (system/whisper/player). |
| server/src/modules/build/types.ts | Updates build type docs (partial). |
| server/src/modules/build/storage.ts | Converts storage/shulker messages and errors to English (partial). |
| server/src/modules/build/scaffold.ts | Converts scaffold comment to English. |
| server/src/modules/build/place.ts | Converts build placement comments/errors to English (partial). |
| server/src/modules/build/pathSafe.ts | Converts schematic path validation errors to English. |
| server/src/modules/build/litematic.ts | Converts litematic parse errors to English. |
| server/src/modules/build/library.ts | Converts schematic library defaults/errors to English (partial). |
| server/src/modules/build/blocks.ts | Converts “skip reason” strings to English. |
| server/src/modules/automation/flow.ts | Updates doc comment text (minor). |
| server/src/modules/automation/blueprints.ts | Updates doc comment text (minor). |
| server/src/index.ts | Converts startup/shutdown logs and comments to English. |
| server/src/core/Waypoints.ts | Converts waypoint errors/messages to English. |
| server/src/core/TaskQueue.ts | Converts preempt/pause/cancel strings to English (partial). |
| server/src/core/errors.ts | Minor doc comment tweak. |
| server/src/core/BotManager.ts | Adds “cancel all work” support and updates many logs/messages; adjusts chatParsed handling. |
| server/src/config/paths.ts | Adds CAYA_DATA_DIR override for writable desktop builds. |
| server/src/api/socket.ts | Converts socket connect/disconnect/log messages to English. |
| server/src/api/rest.ts | Converts REST errors/messages to English; adds “reset-all work” action alias; updates waypoint action label. |
| scripts/make-icon.mjs | Generates build/icon.png from the same pixel-art logo (no external deps). |
| scripts/extract-tr-strings.mjs | Adds Turkish-character scan helper for residual TR strings in server code. |
| scripts/create-github-release.mjs | Automates GitHub release creation/upload via gh CLI. |
| scripts/check-i18n-keys.mjs | Adds EN/TR i18n key parity + untranslated Turkish-value checks. |
| release.bat | Thin wrapper to run build-release script. |
| package.json | Adds Electron entrypoint, electron-builder config, and Windows dist script. |
| electron/main.cjs | Electron main process: forks server, waits for it, and loads the UI. |
| build-release.bat | One-click Windows release build script (version bump + dist + optional GitHub release). |
| .gitignore | Ignores electron dist output and local release folders. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+317
to
+321
| inst.on("chatParsed", (entry: { botId: string; username?: string; text: string; kind: string }) => { | ||
| if (entry.kind === "player" || entry.kind === "whisper") { | ||
| this.rules.onChat(entry.botId, entry.username, entry.text); | ||
| } | ||
| ); | ||
| }); |
| /başarıyla\s+giriş|basariyla\s+giris|successfully\s+logged|logged\s+in\s+successfully/i.test(p) || | ||
| /giriş\s+yaptınız|giris\s+yaptiniz|wrong\s+password|yanlış\s+şifre|yanlis\s+sifre/i.test(p) || | ||
| /kayıt\s+ol|kayit\s+ol|not\s+registered|unregister/i.test(p) | ||
| /entries\s+ol|kayit\s+ol|not\s+registered|unregister/i.test(p) |
| { kind: "whisper", re: new RegExp(`^(${MC_NAME}) whispers(?: to you)?:\\s*(.*)$`, "s") }, | ||
| { kind: "whisper", re: new RegExp(`^\\[(${MC_NAME})\\s*->\\s*(?:me|ben|you|sen)\\]\\s*(.*)$`, "is") }, | ||
| { kind: "whisper", re: new RegExp(`^(${MC_NAME})\\s*(?:fısıldıyor|fisildiyor|whispers).*?:\\s*(.*)$`, "is") }, | ||
| { kind: "whisper", re: new RegExp(`^(${MC_NAME})\\s*(?:whispers|whispers|whispers).*?:\\s*(.*)$`, "is") }, |
| /** | ||
| * AuthMe / join-leave / hoş geldin / sunucu duyurusu — oyuncu sohbeti DEĞİL. | ||
| * Bunlar isim içerse bile (tıklanabilir prefix) sunucu mesajı kalmalı. | ||
| * Bunlar isim içerse bile (tıklmainbilir prefix) sunucu mesajı kalmalı. |
| /** mesaj gövdesi (rütbesiz) */ | ||
| text: string; | ||
| /** isimden önce: "[Admin] [VIP] " rütbe/kanal prefix */ | ||
| /** isimden önce: "[Admin] [VIP] " rütbe/kmainl prefix */ |
| } | ||
|
|
||
| cancel(id: string, reason = "iptal edildi"): boolean { | ||
| cancel(id: string, reason = "cancelled edildi"): boolean { |
| if (token.cancelled) { | ||
| this.setPhase("cancelled", "iptal edildi"); | ||
| throw new Error(token.reason ?? "iptal"); | ||
| this.setPhase("cancelled", "cancelled edildi"); |
| } else { | ||
| this.setPhase("failed", label, `${failed} blok yerleştirilemedi`); | ||
| this.log().warn(`İnşaat kısmi/hatalı: ${parsed.meta.name}`, label); | ||
| this.setPhase("failed", label, `${failed} blok placeilemedi`); |
Comment on lines
+61
to
+72
| app.whenReady().then(async () => { | ||
| try { | ||
| await startServer(); | ||
| } catch (err) { | ||
| console.error("Failed to start Minecraft CaYa Bot Panel server:", err); | ||
| } | ||
| createWindow(); | ||
|
|
||
| app.on("activate", () => { | ||
| if (BrowserWindow.getAllWindows().length === 0) createWindow(); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lucide-reacticons, and swapped the wolf-emoji placeholder logo for a custom pixel-art "bot head" SVG (BotLogo.tsx) used in the sidebar, favicon, and empty states — colors match the existing zinc/emerald/red palette.cayadev.com/ GitHub links and MIT copyright.server/src/**).electron/main.cjsforks the existing Express/mineflayer server as a child process and points aBrowserWindowat it. Bot/rule/data storage now writes to the OS per-user data directory instead of the install folder (newCAYA_DATA_DIRoverride inserver/src/config/paths.ts), since Program Files installs aren't writable.electron-builderconfig (package.jsonbuildfield) produces both an NSIS installer and a portable.exevianpm run dist:win, using a generated app icon (build/icon.png, built byscripts/make-icon.mjsfrom the same logo design) instead of the Electron default.build-release.bat/release.batfor a one-click local release build (bumps versions, runsdist:win, optionally tags + pushes + creates a GitHub release viagh).scripts/check-i18n-keys.mjs(EN/TR key-parity + untranslated-value check) andscripts/extract-tr-strings.mjs(residual Turkish-character scan ofserver/src) as ongoing lint helpers — both currently pass clean on the EN/TR key set, with a small number (~26) of Turkish substrings left inserver/src, mostly inside comments.web/src/pages/Placeholders.tsx— dead code superseded by the realAutomations/Settingspages.Test plan
npm run typecheck(server + web) passesnpm run build(server + web) succeedsnpm run dist:winproduces bothCaYa Bot Panel.exe(portable) andCaYa Bot Panel Setup.exe(NSIS installer); both launch, fork the server correctly (CAYA_DATA_DIRwrites toapp.getPath('userData')), and serve the built web app on127.0.0.1:3001