PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Supio

Debug and extend a streaming chat app

Last updated: Mar 29, 2026

Quick Overview

This question evaluates debugging and implementation skills across frontend-backend interaction, including authentication/configuration, client-side state management, streamed response handling, request cancellation, and reasoning about API payload contracts.

  • easy
  • Supio
  • Software Engineering Fundamentals
  • Software Engineer

Debug and extend a streaming chat app

Company: Supio

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: easy

Interview Round: Technical Screen

## Scenario You are given a small codebase for a web chat UI that calls an LLM API (similar to a ChatGPT-style interface). You can run it locally. During a 60-minute interview, you must **debug issues and implement small features**. Assume a typical setup: - Frontend chat UI (e.g., React/Vue) with a client-side store/state management layer. - A backend (or direct client call) that invokes an LLM API. - Responses may be **streamed** token-by-token. ## Tasks ### Bug 1: API key invalid When starting the app and sending a message, the browser console (or network response) shows an error like **`api key invalid`**. - Find the root cause. - Fix the configuration so requests authenticate correctly. ### Bug 2: Message renders as empty After submitting a message, the UI receives a response but renders **empty content**. - Inspect the response payload. - Fix the parsing/rendering logic so the assistant text displays correctly. ### Feature 1: Add a **Clear** button Add a button that clears: - the visible message history - any stored conversation context - and resets the chat state to an initial empty state You are told the store already has an action/helper that can reset/initialize state—use it rather than re-implementing. ### Feature 2: Add a **Stop** button for streaming Add a button (like the “stop generating” square icon) that, while an assistant response is streaming, **immediately stops/cancels** the in-flight stream and leaves the partially-generated text as-is (or per your chosen UX, but be consistent). Consider: - state management changes (e.g., `isStreaming`, `currentRequestId`) - request cancellation (e.g., `AbortController`) - cleanup so future messages still work ## What we are evaluating - Your debugging workflow (repro, isolate, verify) - Correctness of fixes - Practical state management and cancellation handling - Ability to reason about API contract mismatches (payload shape vs. assumptions)

Quick Answer: This question evaluates debugging and implementation skills across frontend-backend interaction, including authentication/configuration, client-side state management, streamed response handling, request cancellation, and reasoning about API payload contracts.

Supio logo
Supio
Feb 11, 2026, 12:00 AM
Software Engineer
Technical Screen
Software Engineering Fundamentals
2
0

Scenario

You are given a small codebase for a web chat UI that calls an LLM API (similar to a ChatGPT-style interface). You can run it locally. During a 60-minute interview, you must debug issues and implement small features.

Assume a typical setup:

  • Frontend chat UI (e.g., React/Vue) with a client-side store/state management layer.
  • A backend (or direct client call) that invokes an LLM API.
  • Responses may be streamed token-by-token.

Tasks

Bug 1: API key invalid

When starting the app and sending a message, the browser console (or network response) shows an error like api key invalid.

  • Find the root cause.
  • Fix the configuration so requests authenticate correctly.

Bug 2: Message renders as empty

After submitting a message, the UI receives a response but renders empty content.

  • Inspect the response payload.
  • Fix the parsing/rendering logic so the assistant text displays correctly.

Feature 1: Add a Clear button

Add a button that clears:

  • the visible message history
  • any stored conversation context
  • and resets the chat state to an initial empty state

You are told the store already has an action/helper that can reset/initialize state—use it rather than re-implementing.

Feature 2: Add a Stop button for streaming

Add a button (like the “stop generating” square icon) that, while an assistant response is streaming, immediately stops/cancels the in-flight stream and leaves the partially-generated text as-is (or per your chosen UX, but be consistent).

Consider:

  • state management changes (e.g., isStreaming , currentRequestId )
  • request cancellation (e.g., AbortController )
  • cleanup so future messages still work

What we are evaluating

  • Your debugging workflow (repro, isolate, verify)
  • Correctness of fixes
  • Practical state management and cancellation handling
  • Ability to reason about API contract mismatches (payload shape vs. assumptions)

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Supio•More Software Engineer•Supio Software Engineer•Supio Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.