feat: Login/Auth/i18n: TDD implementation with post-login UX fixes#42
Draft
feat: Login/Auth/i18n: TDD implementation with post-login UX fixes#42
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: Icar0S <39846852+Icar0S@users.noreply.github.com>
Co-authored-by: Icar0S <39846852+Icar0S@users.noreply.github.com>
…green Co-authored-by: Icar0S <39846852+Icar0S@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add tests for login page and authentication components
Add Login Page, Auth system, and i18n (PT-BR/EN-US) via TDD
Mar 5, 2026
🧪 PR Test Summary
|
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
…% new-files coverage gate
Co-authored-by: Icar0S <39846852+Icar0S@users.noreply.github.com>
Copilot
AI
changed the title
feat: add Login Page, Auth system, and i18n (PT-BR/EN-US) using TDD
Login/Auth/i18n: TDD implementation with post-login UX fixes
Mar 5, 2026
… and useStats hook
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.
Adds full authentication flow, bilingual support (PT-BR/EN-US), and post-login UX improvements to DataForgeTest following strict TDD (Red → Green → Refactor).
Auth & Session (Backend + Frontend)
POST /api/auth/validateFlask blueprint —200/401/400;password_hashnever leaves the serverauthStorage.js—localStoragesession with 8h/7d (rememberMe) expiry;passwordHashnever persisteddata/users.js— in-memory user store (3 demo accounts); migration path to API documented inlineuseAuth.js—handleLoginwith 1200ms simulated latency + bilingual error objects{ 'pt-BR': '...', 'en-US': '...' }Routing & Protection
ProtectedRoute— three states: loading spinner →/login + state.from(unauthenticated) →/login + state.step(no profile) → childrenApp.js—/loginpublic; all other routes wrapped in<ProtectedRoute>;SupportButtonhidden on/loginindex.js—<LanguageProvider><AuthProvider><App />i18n
LanguageContext—useLanguage()hook, persists tolocalStorage('dataforgetest_language')LanguageToggle— PT-BR/EN-US toggle withdata-testid="language-toggle";size='sm'|'md'MethodologyPagemigrated from localuseState('pt-BR')to globaluseLanguage()commonTranslations.js— shared keys (backToHome,loading, etc.) for internal pagesLoginPage
Full-page component:
AnimatedBackground(25 floating tech-label nodes), two-step machine (login → profile), 8 role cards, right panel with pipeline + stats. Live detection feed removed — thesetIntervalAnimatePresence feed caused page-jump artifacts on every 3s update with no real data value.HomePage Additions
HomeHeader— sticky top bar with logo, translated nav links,LanguageToggle, user avatar/name, logoutHomeFooter— copyright, tech stack, version; translations shared withLoginPagefootertranslations[language]Tests
7 new test files (TDD commit 1), then implementation (commit 2). Updated
App.test.jsandMethodologyPage.test.jsfor new context providers. 502 frontend tests passing.🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.