Skip to content

feat(screens): implement all app screens and navigation flows#51

Merged
jbdevprimary merged 2 commits into
mainfrom
feat/issue-14-app-screens
Jan 18, 2026
Merged

feat(screens): implement all app screens and navigation flows#51
jbdevprimary merged 2 commits into
mainfrom
feat/issue-14-app-screens

Conversation

@jbdevprimary
Copy link
Copy Markdown
Contributor

@jbdevprimary jbdevprimary commented Jan 18, 2026

Summary

Closes #14

This PR implements all app screens and navigation flows for ThumbCode, completing the UI layer of the mobile application.

Onboarding Flow (5 screens)

  • Welcome - Introduction with feature highlights
  • GitHub Auth - Device flow authentication with user code display
  • API Keys - Anthropic and OpenAI key collection with validation
  • Create Project - Repository selection and project creation
  • Complete - Celebration screen with confetti animation

Main App Tabs (5 tabs)

  • Dashboard - Overview with stats, active agents, progress, activity feed
  • Projects - Project list with search and FAB for creating new projects
  • Agents - Agent team overview with role filters and metrics
  • Chat - Human-agent communication with message bubbles and approval cards
  • Settings - Credentials, preferences, and agent configuration

Detail Screens

  • Project Detail - Tabs for files (FileTree), commits, tasks, agents
  • Agent Detail - Metrics, task history, capabilities, controls

Settings Sub-screens

  • Credentials - API keys and GitHub connection management
  • Editor - Code editor preferences (theme, font size, formatting)
  • Agent Behavior - Approval settings and automation preferences

Error Handling

  • Not Found - 404 page for invalid routes

Design System Compliance

All screens use:

  • P3 "Warm Technical" color palette (Coral, Teal, Gold on Charcoal)
  • Organic "daube" border-radius styling
  • Fraunces/Cabin/JetBrains Mono typography
  • NativeWind (Tailwind CSS) styling

Test plan

  • Verify onboarding flow navigation works correctly
  • Verify tab navigation works correctly
  • Verify project detail navigation from projects list
  • Verify agent detail navigation from agents list
  • Verify settings sub-screen navigation
  • Verify not found page displays for invalid routes
  • Verify all screens render without errors

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added comprehensive onboarding flow with GitHub authentication, API key setup, and project creation
    • Introduced main tabbed interface with Home, Projects, Agents, Chat, and Settings sections
    • Added Home dashboard displaying active projects, running agents, and recent activity
    • Added Projects screen with search and status tracking
    • Added Agents dashboard and detailed agent profile pages
    • Added Chat interface with message history and approval workflow
    • Added Settings screens for credentials, agent automation, and editor preferences
    • Added Project detail view with file browser, commit history, and task tracking
    • Added 404 error page with navigation options
  • Refactor

    • Enhanced root layout with onboarding state management and conditional routing logic

✏️ Tip: You can customize this high-level summary in your review settings.

Issue #14 - Complete UI implementation:

- Onboarding flow: Welcome, GitHub auth, API keys, Project creation, Completion
- Main app tabs: Dashboard, Projects, Agents, Chat, Settings
- Project detail screen with tabs for files, commits, tasks, and agents
- Agent detail screen with metrics, task history, and controls
- Settings sub-screens: Credentials, Editor, Agent behavior
- Not found screen for handling invalid routes

All screens use the P3 "Warm Technical" design system with organic
border-radius styling and ThumbCode brand colors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 18, 2026

Warning

Rate limit exceeded

@jbdevprimary has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 21 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between fd2b0d0 and a01295c.

📒 Files selected for processing (9)
  • app/(onboarding)/api-keys.tsx
  • app/(onboarding)/complete.tsx
  • app/(onboarding)/create-project.tsx
  • app/(tabs)/index.tsx
  • app/_layout.tsx
  • app/project/[id].tsx
  • app/settings/credentials.tsx
  • app/settings/editor.tsx
  • src/contexts/onboarding.tsx
📝 Walkthrough

Walkthrough

This PR implements the complete navigation structure and all application screens, including a five-step onboarding flow (welcome, GitHub auth, API keys, project creation, completion), five main tab screens (home, projects, agents, chat, settings), detail screens for projects and agents, and three settings sub-screens. Navigation uses Expo Router with mock data throughout.

Changes

Cohort / File(s) Summary
Onboarding Layout & Screens
app/(onboarding)/_layout.tsx, app/(onboarding)/welcome.tsx, app/(onboarding)/github-auth.tsx, app/(onboarding)/api-keys.tsx, app/(onboarding)/create-project.tsx, app/(onboarding)/complete.tsx
Five-screen onboarding flow with Stack layout (no header, slide animation). Includes welcome hero, GitHub Device Flow auth with simulated polling, API key input for Anthropic/OpenAI with validation, repository selection and project creation, and completion screen. Validation and state management per screen.
Main App Tabs Layout & Screens
app/(tabs)/_layout.tsx, app/(tabs)/index.tsx, app/(tabs)/projects.tsx, app/(tabs)/agents.tsx, app/(tabs)/chat.tsx, app/(tabs)/settings.tsx
Tab-based layout with five screens: Home dashboard (stats, agent team, activity), Projects list (search, status badges, empty state), Agents dashboard (role filter, agent cards with metrics), Chat interface (message bubbles, approval flow, mock messages), and Settings (multi-section layout with profile, credentials, preferences).
Detail & Dynamic Screens
app/project/[id].tsx, app/agent/[id].tsx
Dynamic route screens for project detail (tabs: files, commits, tasks, agents; progress indicator) and agent detail (tabs: overview, history; metrics; capabilities per role; recent activity).
Settings Sub-Screens
app/settings/agents.tsx, app/settings/credentials.tsx, app/settings/editor.tsx
Agent settings (automation toggles, approval-level selectors), Credentials management (GitHub connect/disconnect, API key editing for Anthropic/OpenAI), and Editor settings (font size, theme, formatting, preview pane).
Root & Error Handling
app/_layout.tsx, app/+not-found.tsx
Root layout adds onboarding state hook and conditional redirect logic based on completion status; includes Stack with all routes and modal presentation for settings. Not-found screen with navigation actions.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Welcome
    participant GitHubAuth
    participant ApiKeys
    participant CreateProject
    participant Complete
    participant MainApp as MainApp/(tabs)

    User->>Welcome: Opens app
    Welcome->>User: Display hero & features
    User->>Welcome: Tap "Get Started"
    Welcome->>GitHubAuth: Navigate to GitHub auth

    GitHubAuth->>GitHubAuth: Start Device Flow
    GitHubAuth->>User: Display user code
    User->>GitHubAuth: Tap "Open GitHub"
    GitHubAuth->>GitHubAuth: Poll for authorization
    GitHubAuth->>User: Display "Connected!"
    User->>GitHubAuth: Tap "Continue"
    GitHubAuth->>ApiKeys: Navigate to API keys

    ApiKeys->>ApiKeys: User enters API keys
    ApiKeys->>ApiKeys: Validate key format (async)
    ApiKeys->>User: Display validation status
    User->>ApiKeys: Tap "Continue"
    ApiKeys->>CreateProject: Navigate to project creation

    CreateProject->>CreateProject: Display repo list
    User->>CreateProject: Select repo & enter name
    CreateProject->>CreateProject: Simulate project creation
    User->>CreateProject: Tap "Create Project"
    CreateProject->>Complete: Navigate to completion

    Complete->>User: Display success badge & summary
    User->>Complete: Tap CTA
    Complete->>MainApp: Navigate to main app
    MainApp->>User: Display home dashboard
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

  • PR #50: Onboarding screens use StepsProgress and other UI primitives directly exported from the component-library changes.
  • PR #1: Root layout modifications build upon and extend the routing structure initially introduced in this PR.

Poem

🐰 Hops through screens with native cheer,
Onboarding flows from far and near,
Tabs and routes and agents bright,
A navigation dream so right! ✨🎯

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.44% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and concisely summarizes the main change: implementing all app screens and navigation flows, which aligns with the entire changeset.
Linked Issues check ✅ Passed The PR successfully implements all coding requirements from issue #14: onboarding flow (5 screens), main app tabs (5 screens), detail screens, settings sub-screens, and error handling with proper navigation structure.
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #14 requirements; no extraneous modifications or unrelated features were introduced outside the screen and navigation implementation objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

🤖 Fix all issues with AI agents
In `@app/_layout.tsx`:
- Around line 16-52: The onboarding flag is hard-coded to false in
useOnboardingState, so users are always redirected back to onboarding; update
useOnboardingState to read/write a persisted flag (e.g., AsyncStorage or
SecureStore) and initialize setHasCompletedOnboarding from that persisted value,
expose setHasCompletedOnboarding to the onboarding flow, and ensure the
onboarding completion handler calls setHasCompletedOnboarding(true) and persists
the value so RootLayout's redirect logic (segments check + router.replace) can
allow access to the (tabs) route; alternatively add a temporary dev toggle that
flips the persisted flag for testing.

In `@app/`(onboarding)/api-keys.tsx:
- Around line 92-95: The button handler handleContinue currently only routes to
create-project and contains a TODO for persisting keys; implement an async save
flow (e.g., add an exported async function saveApiKeys or saveKeysToSecureStore
and call it from handleContinue) that writes the API keys to a hardware-backed
secure store API (SecureStore/Keychain/Platform-specific secure storage) and
only navigate after successful save, removing the TODO; if you can’t implement
secure persistence now, instead update the UI copy (the text block around lines
123-143 that claims “hardware-backed secure storage”) to remove any promise of
hardware-backed persistence so it accurately reflects current behavior.

In `@app/`(onboarding)/complete.tsx:
- Around line 44-47: The handleGetStarted function currently navigates to
'/(tabs)' without persisting completion; before calling
router.replace('/(tabs)') call the same persistence API used by the root layout
(e.g., the function or method named like markOnboardingComplete,
setOnboardingCompleted, or persistOnboardingState) to record onboarding as
finished; if that API is async await it and handle errors (log or surface) so
navigation only occurs after successful persistence, and then call
router.replace; update handleGetStarted to perform this persistence step using
the exact symbol found in the root layout.

In `@app/`(onboarding)/create-project.tsx:
- Around line 71-79: handleCreate can run twice on rapid taps; add an early
guard that returns immediately if isLoading is true, and ensure you
setIsLoading(true) as the first state change after validating selectedRepo and
projectName so subsequent invocations see the flag; update the handleCreate
function (referencing handleCreate, isLoading, setIsLoading, selectedRepo,
projectName, router) to check if (isLoading) return before proceeding, then
continue with the existing flow and finally setIsLoading(false) after completion
or error.
- Around line 164-177: The "+ Create new repository" Pressable in
create-project.tsx is a dead tap target; either wire it up or render it as
non-pressable until the flow exists—implement an onPress handler (e.g.,
handleCreateRepository or navigateToCreateRepo) on the Pressable that performs
the intended action, or replace the Pressable element that contains the Text "+
Create new repository" with a non-interactive View (keeping the same
styling/className and border radii) until the create-repository flow is
implemented.

In `@app/`(tabs)/index.tsx:
- Around line 221-225: The ProgressBar value calculation using
MOCK_STATS.completedToday and MOCK_STATS.pendingTasks can produce NaN when both
are 0; update the value expression (where ProgressBar is rendered) to compute a
denominator = MOCK_STATS.completedToday + MOCK_STATS.pendingTasks and use a
conditional (e.g., ternary) to return 0 when denominator is 0, otherwise
(MOCK_STATS.completedToday / denominator) * 100 so the component receives 0%
instead of NaN.

In `@app/project/`[id].tsx:
- Around line 93-102: The computation of progress in ProjectDetailScreen can
produce NaN when MOCK_PROJECT.completedTasks and MOCK_PROJECT.pendingTasks are
both 0; change the calculation to guard the denominator by computing a total
(e.g., total = MOCK_PROJECT.completedTasks + MOCK_PROJECT.pendingTasks) and set
progress to (total ? (MOCK_PROJECT.completedTasks / total) * 100 : 0) so
progress falls back to 0 when total is zero.

In `@app/settings/credentials.tsx`:
- Around line 278-294: The current ApiKeyInput onSave handlers unconditionally
call setAnthropicSet(true) / setOpenaiSet(true) even when the key value is
blank; update the handlers so they only mark the key as set when the trimmed
value is non-empty (e.g., onSave={() => { if (anthropicKey.trim())
setAnthropicSet(true) }}) or alternately change ApiKeyInput to pass the current
value into the onSave callback and perform the same trimmed-value guard there;
apply the same fix for anthropicKey/ setAnthropicSet and openaiKey/ setOpenaiSet
to prevent empty keys from being marked as set.

In `@app/settings/editor.tsx`:
- Around line 269-290: The preview is ignoring the theme setting (variable/theme
state named theme) — update the rendering in the component that uses fontSize
and lineNumbers to also derive background and text color class names from theme
(e.g., map "dark" -> bg-charcoal + existing text color tokens, "light" -> a
light bg and darker text classes, "highContrast" -> high-contrast bg/text);
apply those computed classes to the outer View and the inline Text elements
instead of hard-coded classes (where fontSize and lineNumbers are used) and
provide a sensible fallback if theme is undefined.
🧹 Nitpick comments (4)
app/settings/editor.tsx (2)

25-57: Consider adding accessibility labels to interactive elements.

The SettingRow component lacks accessibility attributes. Screen readers won't convey the purpose of the toggle or the navigation chevron. Consider adding accessibilityLabel to the Pressable and accessibilityLabel/accessibilityRole to the Switch.

♿ Suggested accessibility improvements
 function SettingRow({ title, subtitle, value, onPress, toggle }: SettingRowProps) {
   return (
     <Pressable
       onPress={onPress}
       disabled={!onPress && !toggle}
       className={`py-4 ${onPress ? 'active:bg-neutral-800' : ''}`}
+      accessibilityRole={toggle ? 'none' : 'button'}
+      accessibilityLabel={toggle ? undefined : title}
     >
       <HStack justify="between" align="center">
         <VStack spacing="xs" className="flex-1">
           <Text className="text-white">{title}</Text>
           {subtitle && (
             <Text size="sm" className="text-neutral-500">
               {subtitle}
             </Text>
           )}
         </VStack>

         {value && <Text className="text-neutral-400">{value}</Text>}

         {toggle && (
           <Switch
             value={toggle.value}
             onValueChange={toggle.onValueChange}
             trackColor={{ false: '#374151', true: '#0D9488' }}
             thumbColor={toggle.value ? '#fff' : '#9CA3AF'}
+            accessibilityLabel={title}
           />
         )}

         {onPress && !toggle && <Text className="text-neutral-600">›</Text>}
       </HStack>
     </Pressable>
   );
 }

126-132: Extract repeated section card styles to a constant.

The same border-radius style object is duplicated across all four sections. Consider extracting it to reduce repetition.

♻️ Suggested refactor
 export default function EditorSettingsScreen() {
   const insets = useSafeAreaInsets();
+
+  const sectionCardStyle = {
+    borderTopLeftRadius: 14,
+    borderTopRightRadius: 12,
+    borderBottomRightRadius: 16,
+    borderBottomLeftRadius: 10,
+    overflow: 'hidden' as const,
+  };

   // Editor settings state
   // ...

   return (
     // ...
           <VStack
             spacing="none"
             className="bg-surface mb-6"
-            style={{
-              borderTopLeftRadius: 14,
-              borderTopRightRadius: 12,
-              borderBottomRightRadius: 16,
-              borderBottomLeftRadius: 10,
-              overflow: 'hidden',
-            }}
+            style={sectionCardStyle}
           >

Also applies to: 181-187, 230-236, 256-262

app/(tabs)/chat.tsx (1)

277-341: Consider deterministic auto-scroll without a fixed timeout.

Using a magic delay can be flaky across devices. You can scroll to end when content size changes instead.

♻️ Suggested refactor
-    // Scroll to bottom
-    setTimeout(() => {
-      flatListRef.current?.scrollToEnd({ animated: true });
-    }, 100);
+    // Scroll to bottom when list content updates
       <FlatList
         ref={flatListRef}
         data={messages}
         renderItem={({ item }) => <MockMessageBubble message={item} />}
         keyExtractor={(item) => item.id}
+        onContentSizeChange={() => flatListRef.current?.scrollToEnd({ animated: true })}
         contentContainerStyle={{
           paddingTop: 16,
           paddingBottom: showApproval ? 200 : 100,
         }}
         showsVerticalScrollIndicator={false}
       />
app/settings/credentials.tsx (1)

195-197: TODO: GitHub OAuth flow still unimplemented.

Want me to scaffold the device-flow OAuth wiring or open a tracking issue?

Comment thread app/_layout.tsx Outdated
Comment thread app/(onboarding)/api-keys.tsx
Comment thread app/(onboarding)/complete.tsx Outdated
Comment thread app/(onboarding)/create-project.tsx
Comment thread app/(onboarding)/create-project.tsx Outdated
Comment thread app/(tabs)/index.tsx
Comment thread app/project/[id].tsx
Comment thread app/settings/credentials.tsx
Comment thread app/settings/editor.tsx Outdated
- Add OnboardingContext for persistent onboarding state using AsyncStorage
- Fix security copy in api-keys.tsx to not over-promise storage behavior
- Add double-submit guard in create-project.tsx
- Make "Create new repository" a non-pressable element (coming soon)
- Add zero-division guards in index.tsx and project/[id].tsx
- Add empty key validation in credentials.tsx
- Add theme-aware preview in editor settings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
3.1% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

[UI] Implement all app screens and navigation flows

1 participant