Skip to content

Fixed shimmer animation on permission deny - #3952

Closed
opencode-agent[bot] wants to merge 2 commits into
devfrom
opencode/issue3951-20251105223325
Closed

opencode-agent[bot] wants to merge 2 commits into
devfrom
opencode/issue3951-20251105223325

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

Summary

I've successfully located and fixed the bug where the progress animation doesn't stop when denying a command. Here's what I found and fixed:

Bug Location: /home/runner/work/opencode/opencode/packages/opencode/src/session/prompt.ts in the process function around lines 1182-1187

Root Cause: When a permission was rejected:

  1. The blocked = true flag was set correctly
  2. But the processing loop continued instead of breaking out immediately
  3. The message completion (time.completed) was only set at the very end of processing
  4. This caused the shimmer animation condition !props.message.time.completed to remain true

Fix Applied: Added a check after the switch statement (lines 1294-1296) to break out of the processing loop immediately when blocked = true:

// If permission was rejected and blocked, break out of processing loop
if (blocked) {
  break
}

How it works now:

  1. Permission rejected → blocked = true
  2. New check breaks out of processing loop immediately
  3. Message completion time is set at the end: assistantMsg.time.completed = Date.now()
  4. TUI updates and shimmer animation stops correctly

The fix ensures that when a user denies a permission request, the progress animation stops immediately instead of continuing indefinitely.

Closes #3951

New%20session%20-%202025-11-05T22%3A33%3A25.035Z
opencode session  |  github run

@rekram1-node

Copy link
Copy Markdown
Collaborator

/oc so this does work, but shouldn't the model name still display at teh bottom just not in simmering mode?

@opencode-agent

opencode-agent Bot commented Nov 5, 2025 •

Copy link
Copy Markdown
Contributor Author

Now the model name will display whenever the message is completed, regardless of whether there were tool calls or not. The shimmering version will only show during active processing, and the static version will show once completed.

New%20session%20-%202025-11-05T22%3A42%3A50.827Z
opencode session  |  github run

@rekram1-node

Copy link
Copy Markdown
Collaborator

/oc it looks like that was actually intentional, undo your last commit

@opencode-agent

opencode-agent Bot commented Nov 5, 2025 •

Copy link
Copy Markdown
Contributor Author

Last commit undone successfully.

New%20session%20-%202025-11-05T22%3A47%3A31.555Z
opencode session  |  github run

@thdxr
thdxr deleted the opencode/issue3951-20251105223325 branch February 7, 2026 06:24
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.

Progress animation doesn't stop when you "deny" a command

1 participant