Skip to content

Run button: play icon beside the copy button; always clear the load-state indicator#453

Open
nelsonlove wants to merge 3 commits into
twibiral:masterfrom
nelsonlove:run-button-ui
Open

Run button: play icon beside the copy button; always clear the load-state indicator#453
nelsonlove wants to merge 3 commits into
twibiral:masterfrom
nelsonlove:run-button-ui

Conversation

@nelsonlove

Copy link
Copy Markdown

Summary

Two UI fixes:

  1. Run button placement. The run button was a text button absolutely positioned at the bottom-right of the block, where it can collide with theme/plugin copy buttons. It's now a play icon (lucide, via setIcon) at the top right — matching Obsidian's own code-block affordances — with the built-in copy button shifted left to make room. aria-label preserves the "Run" name for accessibility.

  2. Stuck load-state indicator. runCode only called finishBlock() when useShell was false, but interactive (REPL) executors call startBlock() themselves regardless of that flag. Any shell-invoked language backed by an interactive executor therefore left a permanently spinning load-state indicator (with its inset shadow) after every run. finishBlock() is now called unconditionally when the executor resolves; it's idempotent for the non-interactive path.

Testing

  • npm run build passes
  • Verified in a live vault: play icon renders top-right with no overlap against the copy button (including with the Code Styler plugin active); after a session-mode block finishes, the indicator's visible class is removed

🤖 Generated with Claude Code

nelsonlove and others added 3 commits July 11, 2026 14:51
…tate indicator

The run button was a text button at the bottom right that could overlap
the theme's copy button. It is now a play icon at the top right, with the
copy button shifted left to make room.

runCode also always calls finishBlock() now: interactive (REPL) executors
call startBlock() themselves regardless of the useShell flag, so a
shell-invoked language with an interactive executor left a permanently
spinning load-state indicator (and its inset shadow) after every run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant