Skip to content

[Bug] oclite: 10-15s delay before spinner appears after /start command #78

Description

@randomm

Bug

After typing /start, there is a 10-15 second delay where nothing happens on screen. Then the spinner and seconds countdown finally appear.

Expected Behavior

Spinner should appear immediately (within 100ms) after user presses Enter, even if the backend is still initializing.

Root Cause (likely)

The spinner only starts when the streaming generator begins yielding chunks. If the backend takes time to initialize the session, create the prompt, or make the first API call, nothing is visible to the user.

Fix

Start the spinner synchronously BEFORE entering the streaming loop — not inside it.

Acceptance Criteria

  • Spinner appears within 100ms of pressing Enter
  • Spinner shows "Thinking" with elapsed time counter
  • Works for both /start custom commands and regular messages
  • bun run typecheck passes
  • bun test passes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions