From 2cf993dab68fbefd1e5a774390b135a325e77573 Mon Sep 17 00:00:00 2001 From: iswat Date: Thu, 11 Jun 2026 07:22:21 +0100 Subject: [PATCH 1/2] docs: expand .gitignore with Python, database, and environment patterns Add comprehensive ignore rules for the project: - Python virtual environments (.venv/, venv/, ENV/) - Python cache files (__pycache__/, *.pyc) - Database data directory (db/pg_data/) - Environment configuration files (.env) - IDE and OS-specific files (.vscode/, .DS_Store) --- .gitignore | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.gitignore b/.gitignore index e43b0f98..4c2d0008 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,18 @@ +# Python virtual environments +.venv/ +venv/ +ENV/ + +# Python cache +__pycache__/ +*.pyc + +# Database data (CRITICAL: Do not commit the database itself) +db/pg_data/ + +# Environment secrets (Security risk!) +.env + +# OS/IDEs .DS_Store +.vscode/ \ No newline at end of file From 2078ba23dfdf47ad472dc27879f981c64cc66886 Mon Sep 17 00:00:00 2001 From: iswat Date: Thu, 11 Jun 2026 07:23:53 +0100 Subject: [PATCH 2/2] fix: bind login form submit event in profile view Prevent login form from falling back to native POST by binding the submit handler to the form element instead of a link click. This ensures preventDefault() is called on form submission. - Profile view now listens to [data-form='login'] submit event - Previously incorrectly bound to [data-action='login'] click --- front-end/views/profile.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front-end/views/profile.mjs b/front-end/views/profile.mjs index dd2b92af..31139a9f 100644 --- a/front-end/views/profile.mjs +++ b/front-end/views/profile.mjs @@ -39,8 +39,8 @@ function profileView(username) { createLogin ); document - .querySelector("[data-action='login']") - ?.addEventListener("click", handleLogin); + .querySelector("[data-form='login']") + ?.addEventListener("submit", handleLogin); const profileData = state.profiles.find((p) => p.username === username); if (profileData) {