Conversation
Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
… features Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…t dependency Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…ed versions and improved build configuration Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…downgrade Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…es, and enhanced user experience Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…ve error handling Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…ttings integration Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
… working Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…themes, loading, auth, onboarding Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…themes Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…v9 feature suite Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…reenshot protection Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…ent cookie-based settings Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…particles, and settings persistence Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…QoL features Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…gs persistence issues Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…mations Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
… of non-existent window.multiProxy Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…king Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
…fc-2fdf17771979 Fix proxy initialization and settings page proxy status display with comprehensive debugging
This commit addresses multiple critical issues that were preventing the webproxy from working:
**Webproxy Fixes:**
1. Fixed service worker unregistering on every page load - now reuses existing active service workers instead of destroying them
2. Fixed service worker script loading order - bundle.js now loads before config.js to ensure Ultraviolet library is available
3. Added checkFinalStatus() call to proxy initialization to verify system is working
4. Fixed URL encoding to use proper Ultraviolet encoder instead of broken btoa() implementation
**UI Fixes:**
5. Fixed go.html: getElementById("browser-iframe") → getElementById("ifra") - was causing iframe height calculation to fail
6. Added missing toggleHiddenGames() function in games.html
7. Implemented user blocking tracking in admin dashboard (replaced TODO)
**Technical Details:**
- proxy-init.js: Service worker now checks if registration exists and is active before unregistering
- sw.js: Reordered importScripts to load Ultraviolet bundle before config that depends on it
- proxy-init.js: encodeUrl() now uses __uv$config.encodeUrl() when available
- admin.js: Added getBlockedUsersCount() method to AdminStore class
- routes/admin.js: Stats endpoint now returns actual blocked user count
These fixes resolve the issue where webproxy would never work due to service worker constantly being destroyed and improper initialization order.
This commit addresses critical UX issues and implements missing features: **UX Improvements:** 1. Replaced all alert() calls with modern showNotification() system - index.html: Beta enable/disable now uses notifications - h.js: Popup blocker warning uses notification system 2. Fixed games/apps page long list glitch - apps.html: Fixed selector from ".container-apps .app-item, .container-apps > div" to ".container-apps > .app-item" - games.html: Same fix to prevent duplicate selections - Added search result counter with proper visibility toggle 3. Fixed about:blank mode jankiness - h.js: Complete rewrite with proper error handling - Added loading indicator during iframe setup - Added timeout delays for proper popup initialization - Better error messages and fallback handling **Implemented Missing Features:** 4. Plugin Store - Replaced "Coming soon" with informative modal - Shows instructions for manual plugin installation - Links to plugin documentation 5. Browser Page Menu - Implemented functional page menu - Reload, duplicate, pin, and close tab options - Proper modal interface with clean UI **Code Quality:** 6. Removed excessive debug console.log statements - settings.html: Consolidated all [PROXY DEBUG] logs under DEBUG_PROXY flag - Removed ~20+ console.log statements from production code - Added conditional logging for debugging when needed 7. Hide developer-only features from regular users - settings.html: Added automatic hiding of screenshot protection and ad controls - Features only visible when developer-mode cookie is set - Cleaner UI for regular users **Technical Details:** - All modified files passed syntax validation - Improved error handling with try-catch blocks - Better user feedback with success/error notifications - Reduced console noise in production These fixes significantly improve the user experience and resolve reported glitches.
The games/apps grid was not wrapping properly because of double grid nesting. The outer #games-grid and #apps-grid containers were creating their own grid, which was constraining the inner .container-apps grid. Changed #games-grid and #apps-grid from display:grid to display:block to let the .container-apps handle the grid layout properly. Now items wrap correctly across the full available width.
Added global modal handler system that properly manages modal display: - Created modal-handler.js with ModalHandler class - Creates dynamic overlay backdrop for modals - Handles ESC key and click-outside-to-close - Wires up all modal buttons (theme creator, import, pause, etc.) - Added export theme functionality directly to button - Modals now properly open/close with smooth animations Fixes issue where settings modals (theme creator, import, pause) were not opening when buttons were clicked.
Fix TODOs, bugs, and web proxy issues
Agent-Logs-Url: https://github.com/zgr2575/SlowGuardian/sessions/896d26c6-23ac-4c7a-bf7e-fc863d9e06c2 Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Agent-Logs-Url: https://github.com/zgr2575/SlowGuardian/sessions/e0c488a7-c4a0-4af3-b17d-5ab022e6944a Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Harden proxy routing by allowing `/scram/` through startup auth middleware
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR updates SlowGuardian to a v9 “new architecture” entry point, expands runtime configuration for new features (auth, developer mode, AdSense, plugins), and adds tooling/docs/CI to support the v9 codebase.
Changes:
- Replaces the legacy
index.jsserver bootstrap with a minimal entry point that delegates tostartServer(). - Adds formatting/linting configuration (Prettier + ESLint) and introduces a GitHub Actions workflow for service worker / proxy endpoint checks.
- Adds extensive v9 user/developer documentation and roadmaps, plus substantially updates the main README.
Reviewed changes
Copilot reviewed 22 out of 1153 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| index.js | Simplifies legacy entry point to call the new server architecture entry (startServer). |
| eslint.config.js | Adds ESLint flat-config rules/globals and ignore patterns. |
| docs/user/getting-started.md | Adds end-user setup and first-run instructions for v9. |
| docs/developer/plugins.md | Adds plugin authoring guide and example test snippets. |
| docs/developer/architecture.md | Documents v9 modular architecture and request flow. |
| docs/AUTH_SPOTIFY_GUIDE.md | Documents MongoDB auth and Spotify integration. |
| docs/ADSENSE-SETUP.md | Documents AdSense configuration and usage. |
| config.js | Expands config for v9 features (KeyAuth, developer mode, proxy, AdSense, flags). |
| SECURITY.md | Reformats security policy text for readability. |
| ROADMAP.md | Adds v9 roadmap and targets. |
| README.md | Major rewrite describing v9 features, setup, docs, and deployment options. |
| PROXY_SETUP.md | Documents dual proxy setup (UV + Scramjet) and premium gating. |
| PRODUCTION_ROADMAP.md | Adds production readiness checklist and phased plan. |
| FUTURE_ROADMAP_V10.md | Adds forward-looking v10 planning document. |
| CONTRIBUTING.md | Reformats contributing guidelines. |
| CODE_OF_CONDUCT.md | Reformats Contributor Covenant text for readability. |
| .prettierrc.json | Adds Prettier defaults and overrides (HTML/MD). |
| .github/workflows/test-sw.yml | Adds CI workflow to start server and validate SW/proxy endpoints + optional Puppeteer run. |
| .github/ISSUE_TEMPLATE/feature_request.md | Reformats feature request template for readability. |
| .github/ISSUE_TEMPLATE/bug_report.md | Reformats bug report template for readability. |
| .eslintrc.json | Adds legacy ESLint config alongside flat-config. |
| .env.example | Adds environment variable template for v9 features. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| enabled: true, // Set to true to enable KeyAuth authentication | ||
| name: "slowguardian", // Your KeyAuth application name | ||
| ownerId: "TgewInK5Uy", // Your KeyAuth owner ID | ||
| secret: process.env.KEYAUTH_SECRET || "", // Your KeyAuth application secret | ||
| version: "1.0", // Your application version in KeyAuth | ||
| requireLicense: false, // Set to true if users need license keys | ||
| allowRegistration: true, // Allow new user registrations | ||
| sessionTimeout: 24 * 60 * 60 * 1000, // Session timeout in milliseconds (24 hours) | ||
| }, | ||
|
|
||
| // Developer Mode Settings - ADMIN CONFIGURATION | ||
| developerMode: { | ||
| enabled: true, // Enable developer/admin features | ||
| defaultAdminCredentials: { | ||
| username: "admin", | ||
| password: "SlowGuardian2025!", // CHANGE THIS IN PRODUCTION! | ||
| }, | ||
| features: { |
There was a problem hiding this comment.
Config enables privileged/auth features by default and hard-codes an admin password/KeyAuth ownerId in-repo. This is unsafe for real deployments and also makes it easy to accidentally run production with default credentials. Recommendation: default developerMode.enabled and keyauth.enabled to false, source admin credentials from environment variables (or require explicit setup), and fail startup if default credentials are detected (or if KeyAuth is enabled without a non-empty secret).
| ### Default Admin Access | ||
|
|
||
| - **URL**: `http://localhost:8080/developer` | ||
| - **Username**: `admin` | ||
| - **Password**: `SlowGuardian2025!` |
There was a problem hiding this comment.
Publishing a real default admin username/password in README encourages insecure deployments and increases the chance the same credentials get reused in production. Safer approach: remove the concrete password value, document environment-variable based setup (e.g., ADMIN_USERNAME/ADMIN_PASSWORD), and require the password to be set on first boot (or refuse to start developer mode until changed).
| // test/plugin.test.js | ||
| import plugin from "../plugins/my-plugin/index.js"; | ||
| import { describe, it, expect } from "node:test"; | ||
|
|
||
| describe("My Plugin", () => { | ||
| it("should have correct metadata", () => { | ||
| expect(plugin.name).toBe("my-plugin"); | ||
| expect(plugin.version).toBe("1.0.0"); | ||
| }); | ||
|
|
||
| it("should handle routes correctly", () => { | ||
| const route = plugin.routes[0]; | ||
| expect(route.path).toBe("/api/my-plugin/hello"); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
This test example is not valid for Node’s built-in node:test: it doesn’t export expect, and toBe is Jest-style. Update the guide to either (a) use node:assert/strict assertions with node:test, or (b) explicitly use Jest (and show the correct imports/setup) so developers can run the example as written.
| import request from "supertest"; | ||
| import app from "../index.js"; | ||
|
|
||
| describe("Plugin Integration", () => { | ||
| it("should respond to plugin routes", async () => { | ||
| const response = await request(app).get("/api/my-plugin/hello").expect(200); | ||
|
|
||
| expect(response.body.message).toBe("Hello from my plugin!"); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
This integration test example assumes index.js exports an Express app, but index.js in this PR only calls startServer() and exports nothing. Adjust the documentation to reflect the new architecture (e.g., export an app factory from server.js, or show how to create a test instance of the server/app that Supertest can target).
| - name: Install Chrome for Puppeteer | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y chromium-browser |
There was a problem hiding this comment.
chromium-browser frequently isn’t available on ubuntu-latest via apt (it’s commonly a snap package), which can break CI. Prefer installing chromium (apt package) or use browser-actions/setup-chrome / install google-chrome-stable, and configure Puppeteer to use the installed executable path if needed.
| sudo apt-get install -y chromium-browser | |
| sudo apt-get install -y chromium |
| { | ||
| "env": { | ||
| "node": true, | ||
| "es2022": true, | ||
| "browser": true | ||
| }, | ||
| "extends": ["eslint:recommended"], | ||
| "parserOptions": { | ||
| "ecmaVersion": "latest", | ||
| "sourceType": "module" | ||
| }, | ||
| "rules": { | ||
| "no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], | ||
| "no-console": "off", | ||
| "prefer-const": "error", | ||
| "no-var": "error", | ||
| "eqeqeq": ["error", "always"], | ||
| "curly": ["error", "all"], | ||
| "brace-style": ["error", "1tbs"], | ||
| "indent": ["error", 2], | ||
| "quotes": ["error", "double"], | ||
| "semi": ["error", "always"] | ||
| }, | ||
| "ignorePatterns": [ | ||
| "static/assets/scripts/**", | ||
| "static/m/**", | ||
| "static/dy/**", | ||
| "static/sw.js", | ||
| "node_modules/**" | ||
| ] | ||
| } |
There was a problem hiding this comment.
The PR introduces both eslint.config.js (flat config) and .eslintrc.json (legacy config). Having both commonly causes confusion and inconsistent lint results between CLI/editor/CI depending on ESLint version and tooling. Recommendation: standardize on one configuration format (prefer flat config for ESLint v9+) and remove or clearly document the other as legacy/editor-only (with instructions on how it’s intended to be used).
| { | |
| "env": { | |
| "node": true, | |
| "es2022": true, | |
| "browser": true | |
| }, | |
| "extends": ["eslint:recommended"], | |
| "parserOptions": { | |
| "ecmaVersion": "latest", | |
| "sourceType": "module" | |
| }, | |
| "rules": { | |
| "no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], | |
| "no-console": "off", | |
| "prefer-const": "error", | |
| "no-var": "error", | |
| "eqeqeq": ["error", "always"], | |
| "curly": ["error", "all"], | |
| "brace-style": ["error", "1tbs"], | |
| "indent": ["error", 2], | |
| "quotes": ["error", "double"], | |
| "semi": ["error", "always"] | |
| }, | |
| "ignorePatterns": [ | |
| "static/assets/scripts/**", | |
| "static/m/**", | |
| "static/dy/**", | |
| "static/sw.js", | |
| "node_modules/**" | |
| ] | |
| } | |
| { | |
| "x-legacyNote": "Primary ESLint configuration is eslint.config.js. This .eslintrc.json is kept only for legacy/editor tooling that does not yet support flat config and should be kept in sync or treated as secondary.", | |
| "env": { | |
| "node": true, | |
| "es2022": true, | |
| "browser": true | |
| }, | |
| "extends": ["eslint:recommended"], | |
| "parserOptions": { | |
| "ecmaVersion": "latest", | |
| "sourceType": "module" | |
| }, | |
| "rules": { | |
| "no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], | |
| "no-console": "off", | |
| "prefer-const": "error", | |
| "no-var": "error", | |
| "eqeqeq": ["error", "always"], | |
| "curly": ["error", "all"], | |
| "brace-style": ["error", "1tbs"], | |
| "indent": ["error", 2], | |
| "quotes": ["error", "double"], | |
| "semi": ["error", "always"] | |
| }, | |
| "ignorePatterns": [ | |
| "static/assets/scripts/**", | |
| "static/m/**", | |
| "static/dy/**", | |
| "static/sw.js", | |
| "node_modules/**" | |
| ] | |
| } |
| Create an issue and label it with security and how severe, describe the issue, and show steps to | ||
| reproduce or exploit the flaw. |
There was a problem hiding this comment.
Requesting security reports via public GitHub issues can lead to inadvertent disclosure of exploitable vulnerabilities. Update the policy to provide a private reporting channel (security email and/or GitHub Security Advisories) and ask reporters to avoid publishing exploit details publicly until a fix is available.
| Create an issue and label it with security and how severe, describe the issue, and show steps to | |
| reproduce or exploit the flaw. | |
| If you discover a security vulnerability, please report it via a private channel such as a | |
| GitHub Security Advisory or by emailing our security contact at `security@example.com`. Include | |
| as much detail as possible to help us reproduce the issue (affected versions, configuration, | |
| and step-by-step instructions), but **do not** open a public GitHub issue or share exploit | |
| details publicly until we have confirmed the vulnerability and released a fix. |
| JavaScript and/or HTML5 projects on Git Hub. The code you commit will be reviewed and/or reverted if | ||
| it doesn't meet SlowGuardians quality standards. Additionally, you must go through a screening |
There was a problem hiding this comment.
Correct branding/grammar: 'Git Hub' should be 'GitHub', and 'SlowGuardians' should be 'SlowGuardian's' (possessive).
| JavaScript and/or HTML5 projects on Git Hub. The code you commit will be reviewed and/or reverted if | |
| it doesn't meet SlowGuardians quality standards. Additionally, you must go through a screening | |
| JavaScript and/or HTML5 projects on GitHub. The code you commit will be reviewed and/or reverted if | |
| it doesn't meet SlowGuardian's quality standards. Additionally, you must go through a screening |
|
@copilot apply changes based on the comments in this thread |
… fixes Agent-Logs-Url: https://github.com/zgr2575/SlowGuardian/sessions/0e8c8bee-e7ff-4cdd-b8b7-7a279449e61c Co-authored-by: zgr2575 <62474113+zgr2575@users.noreply.github.com>
Applied all changes from the review thread in commit
|
No description provided.