Skip to content

feat(tui): support configurable cursor style, blink, and color#16939

Closed
fanyu wants to merge 5 commits intoanomalyco:devfrom
fanyu:feat/tui-cursor-style-color
Closed

feat(tui): support configurable cursor style, blink, and color#16939
fanyu wants to merge 5 commits intoanomalyco:devfrom
fanyu:feat/tui-cursor-style-color

Conversation

@fanyu
Copy link

@fanyu fanyu commented Mar 10, 2026

What does this PR do?

Fixes #11305.

It adds configurable TUI cursor settings in opencode.json:

  • tui.cursor_style (block | line | underline)
  • tui.cursor_blink (boolean)
  • tui.cursor_color (hex like #FF5733 or theme key like primary)

It applies these settings to all TUI textareas I found in opencode:

  • main prompt
  • question custom answer
  • permission reject
  • dialog prompt
  • export options filename

I also added a small shared helper (resolveTextareaCursor) to keep behavior consistent and updated config.mdx + tui.mdx docs.

How did you verify your code works?

  • Verified schema changes in src/config/config.ts for all three new fields.
  • Verified all target textarea call sites now pass both cursorStyle and resolved cursorColor.
  • Checked default fallbacks stay the same where they previously differed (theme.primary vs theme.text).
  • I could not run local typecheck/tests here because bun is not available in this environment.

@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 10, 2026
@github-actions
Copy link
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@fanyu
Copy link
Author

fanyu commented Mar 10, 2026

Updated ✅ I have revised the PR description to match the required template sections:\n\n- ### What does this PR do?\n- ### How did you verify your code works?\n\nPlease re-check compliance.

@fanyu
Copy link
Author

fanyu commented Mar 10, 2026

I shortened and rewrote the PR description using the exact template headings. It now includes only:\n\n- ### What does this PR do?\n- ### How did you verify your code works?\n\nCould the compliance check please rerun? If this still fails, I may need maintainer help to confirm the checker rules.

@fanyu fanyu force-pushed the feat/tui-cursor-style-color branch from 5324ed1 to 89a7e47 Compare March 10, 2026 23:07
@fanyu
Copy link
Author

fanyu commented Mar 11, 2026

Update: typecheck is now passing after the cursor config type fixes.\n\nCurrent failures are e2e on both linux/windows:\n- e2e/prompt/prompt-slash-terminal.spec.ts › /terminal toggles the terminal panel\n- e2e/settings/settings-keybinds.spec.ts › changing terminal toggle keybind works\n\nThese failures are in app terminal-toggle behavior; this PR only touches TUI cursor config + docs in and config schema/docs.\n\nIf needed, I can rebase again and/or help bisect, but this looks unrelated to the cursor-style change scope.

@fanyu fanyu requested a review from adamdotdevin as a code owner March 11, 2026 00:49
@github-actions
Copy link
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Mar 11, 2026
@github-actions github-actions bot closed this Mar 11, 2026
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.

feat: add configurable cursor style for TUI textareas

1 participant