Skip to content

implements signIn page - #9

Merged
OumB2021 merged 2 commits into
mainfrom
signin_page
Jul 3, 2026
Merged

implements signIn page#9
OumB2021 merged 2 commits into
mainfrom
signin_page

Conversation

@OumB2021

@OumB2021 OumB2021 commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added a sign-in screen with email/password inputs, keyboard dismissal, and routing into the main app after signing in.
    • Introduced a dedicated authentication stack layout with headers hidden for auth screens.
    • Added an AuthInput component for consistent labeled form fields.
    • Included a quick navigation entry point from the Home screen to reach the sign-in flow.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds an auth route group with a hidden-header stack, a themed sign-in screen with reusable inputs and local form state, and a home-screen pressable that navigates to the sign-in route.

Changes

Sign-in screen and navigation

Layer / File(s) Summary
Auth layout and input field
apps/mobile/app/(auth)/_layout.tsx, apps/mobile/components/auth/AuthInput.tsx
Adds AuthLayout with headerShown: false and a reusable themed AuthInput component that renders a labeled TextInput and forwards input props.
Sign-in screen
apps/mobile/app/(auth)/sign-in.tsx
Adds SignInScreen with keyboard-aware layout, email/password state, AuthInput fields, a sign-in button, and static “Forgot Password?” and “Sign Up” text.
Home navigation entry point
apps/mobile/app/(tabs)/home.tsx
Adds useRouter and a Pressable in the home header that routes to /(auth)/sign-in with accessibility metadata.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SignInScreen
  participant Router

  User->>SignInScreen: Enter email and password
  SignInScreen->>SignInScreen: Update local state
  User->>SignInScreen: Press Sign In
  SignInScreen->>Router: router.push("/(tabs)/home")
Loading
sequenceDiagram
  participant User
  participant HomeScreen
  participant Router
  participant SignInScreen

  User->>HomeScreen: Press "Temp: Go to Sign In"
  HomeScreen->>Router: router.push("/(auth)/sign-in")
  Router->>SignInScreen: Open sign-in route
Loading

Possibly related PRs

  • OumB2021/Journal#4: Both PRs modify apps/mobile/app/(tabs)/home.tsx, and this PR adds a sign-in navigation action to the same home header area.
  • OumB2021/Journal#5: Both PRs use the app theme hooks and color tokens, including the new AuthInput component’s themed placeholder and styling.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: adding the sign-in page and related auth UI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch signin_page

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
apps/mobile/app/(auth)/sign-in.tsx (1)

83-94: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

"Forgot Password?" and "Sign Up" are non-interactive Text elements.

Both visually imply navigation/actions but aren't wrapped in Pressable/Link, so they're currently dead UI and not reachable via touch or accessibility tools.

Example fix for "Sign Up" (repeat pattern for "Forgot Password?")
-          <View className="flex-row items-center justify-center gap-1">
-            <Text className="text-[13px] font-sans text-icon-strong">
-              Don&apos;t have an account?
-            </Text>
-            <Text className="text-[13px] font-sans-semibold text-text-primary">
-              Sign Up
-            </Text>
-          </View>
+          <View className="flex-row items-center justify-center gap-1">
+            <Text className="text-[13px] font-sans text-icon-strong">
+              Don&apos;t have an account?
+            </Text>
+            <Pressable onPress={() => router.push("/(auth)/sign-up")}>
+              <Text className="text-[13px] font-sans-semibold text-text-primary">
+                Sign Up
+              </Text>
+            </Pressable>
+          </View>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/mobile/app/`(auth)/sign-in.tsx around lines 83 - 94, The “Forgot
Password?” and “Sign Up” labels in the sign-in screen are plain Text elements
but should behave like navigation actions. Update the sign-in UI to wrap these
labels with interactive controls such as Pressable or Link, and wire them to the
appropriate handlers/navigation so they are touchable and accessible; use the
existing sign-in screen component structure to locate and replace the
non-interactive Text nodes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/mobile/app/`(auth)/sign-in.tsx:
- Around line 15-99: The SignInScreen route currently contains the full sign-in
UI inline instead of staying focused on screen composition. Extract the
repeated/large UI sections (header/logo, email/password fields, primary action,
footer links) into reusable components under a shared components area, then keep
SignInScreen limited to composing those components and wiring state/handlers.
- Around line 72-81: The Sign In CTA in the sign-in screen is missing its action
handler, so pressing it does nothing. Add an onPress to the Pressable in the
sign-in component so it triggers the existing sign-in flow, using the current
email and password state and any validation/submission logic already present in
the screen.

---

Nitpick comments:
In `@apps/mobile/app/`(auth)/sign-in.tsx:
- Around line 83-94: The “Forgot Password?” and “Sign Up” labels in the sign-in
screen are plain Text elements but should behave like navigation actions. Update
the sign-in UI to wrap these labels with interactive controls such as Pressable
or Link, and wire them to the appropriate handlers/navigation so they are
touchable and accessible; use the existing sign-in screen component structure to
locate and replace the non-interactive Text nodes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 93c21bff-4f78-4a75-a47b-eeab0ee379ee

📥 Commits

Reviewing files that changed from the base of the PR and between fefe93f and f740dad.

📒 Files selected for processing (3)
  • apps/mobile/app/(auth)/_layout.tsx
  • apps/mobile/app/(auth)/sign-in.tsx
  • apps/mobile/app/(tabs)/home.tsx

Comment thread apps/mobile/app/(auth)/sign-in.tsx
Comment thread apps/mobile/app/(auth)/sign-in.tsx

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/mobile/app/(auth)/sign-in.tsx (1)

79-90: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

"Forgot Password?" and "Sign Up" are non-interactive text.

Both are styled to look like tappable links but have no Pressable/onPress or accessibilityRole="link", so they currently do nothing when tapped.

💡 Example fix for "Sign Up"
-            <Text className="text-[13px] font-sans-semibold text-text-primary">
-              Sign Up
-            </Text>
+            <Pressable accessibilityRole="link" onPress={() => router.push("/(auth)/sign-up")}>
+              <Text className="text-[13px] font-sans-semibold text-text-primary">
+                Sign Up
+              </Text>
+            </Pressable>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/mobile/app/`(auth)/sign-in.tsx around lines 79 - 90, “Forgot Password?”
and “Sign Up” are currently plain Text, so they look clickable but do not
respond to taps. Update the sign-in screen to make these elements interactive by
wrapping them in Pressable (or equivalent touchable) and wiring the appropriate
onPress handlers for the password reset and sign-up navigation actions. While
doing so, add accessibilityRole="link" to the tappable elements and keep the
existing Text styling inside the interactive wrappers.
🧹 Nitpick comments (1)
apps/mobile/components/auth/AuthInput.tsx (1)

17-21: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider autoComplete/textContentType passthrough for credential fields.

Since this component wraps email/password inputs, forwarding platform autofill hints (autoComplete, textContentType) via inputProps already works structurally, but no defaults are set here — worth ensuring callers (sign-in screen) pass them for password manager support.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/mobile/components/auth/AuthInput.tsx` around lines 17 - 21, The
AuthInput wrapper already forwards inputProps into TextInput, but credential
autofill hints are not being set by default, so update the sign-in usage to pass
the appropriate autoComplete and textContentType values for email/password
fields. Make sure the callers of AuthInput on the credential screens provide
these props through inputProps so the underlying TextInput can use platform
password manager support.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/mobile/app/`(auth)/sign-in.tsx:
- Around line 22-25: The handleSignIn callback in sign-in.tsx is still acting as
a stub by only dismissing the keyboard and routing directly to /(tabs)/home.
Update handleSignIn to perform real authentication through the Clerk sign-in
flow or, if this is temporary scaffolding, make that placeholder explicit in the
code. Keep the existing Keyboard.dismiss behavior if needed, but do not navigate
to the home route until sign-in succeeds.

---

Outside diff comments:
In `@apps/mobile/app/`(auth)/sign-in.tsx:
- Around line 79-90: “Forgot Password?” and “Sign Up” are currently plain Text,
so they look clickable but do not respond to taps. Update the sign-in screen to
make these elements interactive by wrapping them in Pressable (or equivalent
touchable) and wiring the appropriate onPress handlers for the password reset
and sign-up navigation actions. While doing so, add accessibilityRole="link" to
the tappable elements and keep the existing Text styling inside the interactive
wrappers.

---

Nitpick comments:
In `@apps/mobile/components/auth/AuthInput.tsx`:
- Around line 17-21: The AuthInput wrapper already forwards inputProps into
TextInput, but credential autofill hints are not being set by default, so update
the sign-in usage to pass the appropriate autoComplete and textContentType
values for email/password fields. Make sure the callers of AuthInput on the
credential screens provide these props through inputProps so the underlying
TextInput can use platform password manager support.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5b5874e9-5b50-4982-8f71-dc272cd768e8

📥 Commits

Reviewing files that changed from the base of the PR and between f740dad and 00d0c10.

📒 Files selected for processing (2)
  • apps/mobile/app/(auth)/sign-in.tsx
  • apps/mobile/components/auth/AuthInput.tsx

Comment on lines +22 to +25
const handleSignIn = useCallback(() => {
Keyboard.dismiss();
router.push("/(tabs)/home");
}, [router]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== sign-in screen ==\n'
sed -n '1,220p' 'apps/mobile/app/(auth)/sign-in.tsx'

printf '\n== auth-related files ==\n'
git ls-files 'apps/mobile/**' | rg 'auth|sign-in|home|tabs|session|login|signin|signup|zustand|store'

printf '\n== search for auth flow references ==\n'
rg -n 'router\.push\("/\(tabs\)/home"|handleSignIn|sign in|sign-in|login|auth|session|password|email' apps/mobile -g '!**/node_modules/**'

Repository: OumB2021/Journal

Length of output: 8347


Sign-in still bypasses authentication
handleSignIn only dismisses the keyboard and routes to /(tabs)/home, so any input (or no input) reaches the home screen without credential validation or a Clerk sign-in flow. If this is just temporary scaffolding, track it explicitly; otherwise this is a functional gap before merge.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/mobile/app/`(auth)/sign-in.tsx around lines 22 - 25, The handleSignIn
callback in sign-in.tsx is still acting as a stub by only dismissing the
keyboard and routing directly to /(tabs)/home. Update handleSignIn to perform
real authentication through the Clerk sign-in flow or, if this is temporary
scaffolding, make that placeholder explicit in the code. Keep the existing
Keyboard.dismiss behavior if needed, but do not navigate to the home route until
sign-in succeeds.

@OumB2021
OumB2021 merged commit d0ee4bb into main Jul 3, 2026
4 checks passed
This was referenced Jul 4, 2026
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.

1 participant