Skip to content

Fix spinner bugs: use vector and fix line deletion#29

Open
pbaille wants to merge 5 commits intosteveyegge:mainfrom
pbaille:fix-spinner-bugs
Open

Fix spinner bugs: use vector and fix line deletion#29
pbaille wants to merge 5 commits intosteveyegge:mainfrom
pbaille:fix-spinner-bugs

Conversation

@pbaille
Copy link

@pbaille pbaille commented Jan 10, 2026

Summary

  • Fixed efrit-spinner-frames to use a vector instead of a list (required by aref)
  • Fixed efrit-spinner-stop to properly delete the "Thinking..." line using line-based deletion instead of hardcoded character count

Problem

Two bugs in efrit-spinner.el prevented the chat from working:

  1. aref on line 51 requires an array/vector, but efrit-spinner-frames was defined as a list, causing Wrong type argument: arrayp error

  2. The spinner stop function used (length "System: Thinking X\n") (19 chars) to delete the line, but Unicode spinner characters (⠋⠙⠹ etc.) are multi-byte, causing Args out of range buffer errors

Test plan

  • Verified make compile passes
  • Tested in Doom Emacs - chat now works correctly with spinner animation

🤖 Generated with Claude Code

pbaille and others added 5 commits January 10, 2026 12:41
Two bugs in efrit-spinner.el:

1. `efrit-spinner-frames` was defined as a list but `aref` on line 51
   requires a vector. Changed to vector type.

2. `efrit-spinner-stop` used hardcoded length to delete the "Thinking..."
   line, but Unicode spinner chars are multi-byte causing "Args out of
   range" errors. Now uses forward-line to find actual line end.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
efrit-executor--handle-error was passing a raw error string to callbacks,
but efrit-do-async--api-call expects a hash-table response. This caused
efrit-response-error to return nil (strings aren't hash-tables), making
the error fall through as a "valid" response with nil content/stop_reason.

Now creates a proper error response hash-table with "error" field containing
type and message, so the standard efrit-response-error accessor works.

Fixes: ef-959

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

tzz commented Feb 28, 2026

Do you need to modify the beads database? I don't think the changes there are in sync with the code changes in the PR.

@tzz
Copy link
Collaborator

tzz commented Feb 28, 2026

also #27 has the same fixes so I think it's better to merge that one for the spinner and line deletion

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.

2 participants