Skip to content

feat(landing): add guest landing page - #95

Merged
DIvanCode merged 6 commits into
masterfrom
codex/landing-issue-94
Aug 11, 2026
Merged

feat(landing): add guest landing page#95
DIvanCode merged 6 commits into
masterfrom
codex/landing-issue-94

Conversation

@DIvanCode

@DIvanCode DIvanCode commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • add the public guest landing at / while preserving the existing authenticated HomePage
  • present the duel as optimized light/dark preview images, with a compact layout sized close to the previous 75% browser-zoom appearance
  • allow the landing content to scroll vertically on short screens and keep the mobile layout free of horizontal overflow
  • route the CTA to reload-safe /auth?tab=register, hide the redundant Header Войти action on /auth, and keep a logout recovery action when a saved-session check fails
  • update routing documentation and focused route, landing, auth-tab, and Header tests

Why

Unauthenticated visitors were redirected straight to the auth form, so the product had no public introduction or registration-first entry point. The persisted user snapshot also cannot be treated as proof that a restored token is still valid.

User impact

Guests now get a compact CoDuels introduction with theme-matched duel imagery and direct login/registration paths. Authenticated users retain the current HomePage and profile menu after server validation. A transient non-401 session-check failure no longer leaves the Header without a way to log out.

Verification

  • pnpm lint — passed (4 pre-existing warnings, no errors)
  • pnpm test — passed, 30 files / 96 tests
  • pnpm build with VITE_BASE_URL=__VITE_BASE_URL__ — passed
  • pnpm fsd:lint — repository baseline remains 13 errors / 11 warnings; no findings point to changed files
  • exact production bundle smoke-tested in installed headless Chrome:
    • non-empty application root and no uncaught/runtime errors
    • 1536 px desktop: 48 px hero heading and 984 px duel preview
    • light/dark theme-specific preview assets load and switch correctly
    • CTA has both a compatible solid background and the intended gradient
    • 600 px-tall viewport scrolls vertically (530 client / 826 scroll height)
    • 390×844 mobile layout has zero horizontal overflow
    • CTA opens registration and reload preserves it; /auth has no Header login action
    • mocked saved-token 503 exposes logout and returns to the landing
    • authenticated cold startup reaches the existing HomePage and profile menu

What to test manually

Prerequisites: a logged-out browser and one valid CoDuels account.

  1. Open / at 100% browser zoom and confirm the compact scale, duel image, and three steps look balanced; reduce the window height and confirm the page scrolls.
  2. Switch between light and dark themes and confirm the matching duel image appears.
  3. Select Header Войти and confirm /auth opens without another Войти action in the Header.
  4. Return to /, select Хочу участвовать!, confirm /auth?tab=register opens registration, then reload and confirm registration remains selected.
  5. Repeat at a narrow/mobile width and confirm there is no horizontal scrolling.
  6. Sign in and reload /; confirm the landing does not flash, the existing HomePage appears, Начать still opens the duel mode selection, and the profile menu remains available.

Closes #94

@DIvanCode
DIvanCode marked this pull request as ready for review August 11, 2026 18:42

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c4b61d2d7b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/widgets/header/ui/Header.tsx Outdated
@DIvanCode
DIvanCode marked this pull request as draft August 11, 2026 19:13
@DIvanCode
DIvanCode marked this pull request as ready for review August 11, 2026 19:29
@DIvanCode
DIvanCode marked this pull request as draft August 11, 2026 19:55
@DIvanCode
DIvanCode marked this pull request as ready for review August 11, 2026 19:57
@DIvanCode
DIvanCode merged commit 59e0cfa into master Aug 11, 2026
3 checks passed
@DIvanCode
DIvanCode deleted the codex/landing-issue-94 branch August 11, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[landing] Создать страничку лендинга

1 participant