← OpenAI Interview Insights

OpenAI·Mobile Engineer·Technical Phone Screen·Senior

Senior
Jun 2026

Summary

Round 2 for a Mobile Engineer role at OpenAI was an Android coding round. The task was building a rating card in Kotlin with Jetpack Compose, and it had a few gotchas that made it more interesting than a typical form implementation.

Questions Asked (1)

Q1

Build a rating card component in Kotlin with Jetpack Compose. The card requires both a star rating and a written comment before the submit button becomes active. On successful submission, display a confirmation message. Note: Compose has no built-in rating bar, so you need to implement one from scratch.

Technical Trade-offsSystem DesignAPI & Integrations
Author's notes

The form validation part was fine, pretty standard state management stuff.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and edge cases, then outline the component architecture with state hoisting and a custom star rating composable. Walk through the implementation focusing on state management, validation, and submission handling, and discuss trade-offs and testing considerations.

Pro tip: Emphasize accessibility and testability from the start—use semantics for the star rating and ensure the submit button's enabled state is driven by a single source of truth. This shows you think beyond basic functionality and consider real-world usage.

1. Clarify Requirements and Edge Cases

Ask about rating scale (e.g., 1-5 stars), whether half-stars are needed, comment length limits, and submission behavior (e.g., loading, error handling). Confirm if the confirmation message should be inline or a separate screen.

2. Design Component Architecture

Plan a stateless RatingCard composable that receives state and callbacks, and a stateful wrapper that manages local state. Define a custom StarRating composable that takes a rating value and onRatingChange callback.

3. Implement State Management and Validation

Use rememberSaveable for rating and comment to survive configuration changes. Derive the submit button's enabled state from rating > 0 && comment.isNotBlank().

4. Build the Custom Star Rating

Implement StarRating using Row of clickable icons, with filled/unfilled stars based on rating. Add semantics for accessibility and consider touch target size.

5. Handle Submission and Confirmation

On submit, trigger a callback that simulates an API call, then update UI to show a confirmation message (e.g., a Snackbar or replacing the card content). Discuss error handling and loading states.

Key Points to Mention

  • State hoisting and unidirectional data flow for testability and reusability
  • Custom star rating implementation with clickable icons and accessibility semantics
  • Derived state for enabling the submit button based on rating and comment validity
  • Using rememberSaveable to preserve state across configuration changes
  • Handling submission asynchronously with loading and error states
  • Testing strategy: unit tests for validation logic and UI tests for interaction

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.