From d3e3755d6d77e78908ac78125cc80e227df90c91 Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Wed, 8 Jul 2026 20:55:49 -0400 Subject: [PATCH] chore: cleanup uneeded ai messages (#3363) --- AGENTS.md | 2 + src/gui/src/UI/UIWindowSignup.js | 731 ++++++++++-------- src/gui/src/initgui.js | 1237 ++++++++++++++++++------------ src/puter-js/src/index.js | 12 - 4 files changed, 1190 insertions(+), 792 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 847f9a0a4..7a8f33b27 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -64,6 +64,8 @@ Keep comments light. Prefer self-documenting code — clear names, small functio - The _why_ is non-obvious (a hidden constraint, a workaround, a subtle invariant). - A non-trivial usage detail would otherwise trip the next reader. +If comments need to be more than a line, its probably too long, and when it does need multiline comments, use multiline `/** ... */` JSDoc style for consistency. Use `//` for single-line comments. + Don't restate what the code already says. Don't write comments that reference the current task or PR or version of something — those rot. **No ticket references in code or test comments.** Don't write `PUT-1234`, `AUTH-3`, `GUI-2`, `// fix for FOO-99`, `// per ROLLOUT-1`, or section headers like `// -- PUT-1020: ... --`. The ticket exists in git history and the issue tracker; the code should describe the _why_ in domain terms ("logout cascade transparently invalidates...") not project-management terms ("the cascade from AUTH-3..."). Same rule for test-block names and section dividers — describe what's being tested, not which ticket asked for it. diff --git a/src/gui/src/UI/UIWindowSignup.js b/src/gui/src/UI/UIWindowSignup.js index cd588567b..4b847b77b 100644 --- a/src/gui/src/UI/UIWindowSignup.js +++ b/src/gui/src/UI/UIWindowSignup.js @@ -24,7 +24,7 @@ import UIWindowPhoneVerificationRequired from './UIWindowPhoneVerificationRequir import UIWindowCardVerificationRequired from './UIWindowCardVerificationRequired.js'; import UIWindowLogin from './UIWindowLogin.js'; -function UIWindowSignup (options) { +function UIWindowSignup(options) { options = options ?? {}; options.reload_on_success = options.reload_on_success ?? true; options.has_head = options.has_head ?? true; @@ -34,15 +34,16 @@ function UIWindowSignup (options) { return new Promise(async (resolve) => { const internal_id = window.uuidv4(); - const logo_clickable = !!options.window_options?.cover_page && !window.embedded_in_popup; + const logo_clickable = + !!options.window_options?.cover_page && !window.embedded_in_popup; let h = ''; - h += '
'; + h += + '
'; // logo h += ``; // close button - if ( !options.has_head && options.show_close_button !== false ) - { + if (!options.has_head && options.show_close_button !== false) { h += '
×
'; } @@ -66,7 +67,8 @@ function UIWindowSignup (options) { h += ``; h += '
'; // password - h += '
'; + h += + '
'; h += ``; h += ``; // show/hide icon @@ -75,7 +77,8 @@ function UIWindowSignup (options) { `; h += '
'; // confirm password - h += '
'; + h += + '
'; h += ``; h += ``; // show/hide icon @@ -84,11 +87,13 @@ function UIWindowSignup (options) { `; h += '
'; // bot trap - if this value is submitted server will ignore the request - h += ''; + h += + ''; // Turnstile widget (only when enabled) - if ( window.gui_params?.turnstileSiteKey ) { - h += '
'; + if (window.gui_params?.turnstileSiteKey) { + h += + '
'; // appearance: always/execute/interaction-only // docs: https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/widget-configurations/?utm_source=chatgpt.com#appearance-modes h += `
`; @@ -98,7 +103,8 @@ function UIWindowSignup (options) { // Create Account h += ``; h += ''; - h += '