Skip to content

fix(bug-dock): preserve focus and remove yellow border flash on diagnostics completion (fixes #478) - #544

Merged
Rchari1 merged 1 commit into
mainfrom
fix/478-bug-dock-focus-yellow
Aug 24, 2026
Merged

fix(bug-dock): preserve focus and remove yellow border flash on diagnostics completion (fixes #478)#544
Rchari1 merged 1 commit into
mainfrom
fix/478-bug-dock-focus-yellow

Conversation

@Rchari1

@Rchari1 Rchari1 commented Aug 24, 2026

Copy link
Copy Markdown
Member

Fixes #478.

Root cause: BugDockView's textarea toggled border-v2-state-fg-warning (yellow) when !busy — exactly the state flip that happens when background gh/bash diagnostics finish — and the synchronous busy + agentText reactive update stole focus mid-typing (the blur fires before the deferred effect).

Fix:

  • Stabilize the border to border-v2-border-border-base with a neutral focus ring (focus:border-v2-border-border-focus) — diagnostics now completes silently, no yellow flash.
  • Preserve focus: track wasFocused + textarea ref, restore via requestAnimationFrame when busy or agentText change; blur timer keeps wasFocused alive through the synchronous blur from the DOM patch.

Verified: pnpm --filter amicode extension tests 107/107 pass; overlay edit is type-correct (no new deps).

Summary by CodeRabbit

  • Bug Fixes

    • Textarea focus is now preserved while session activity updates.
    • Prevented unexpected loss of focus during busy or agent response changes.
  • Style

    • Updated the textarea border appearance to remain consistent while idle.

…ostics completion (amicode#478)

The textarea's border toggled to warning yellow when busy flipped idle
exactly as background gh/bash diagnostics finished, and the reactive
busy+agentText update stole focus mid-typing. Stabilize the border to the
base token with a focus ring, and restore focus if the textarea had it
before the patch (deferred via rAF, blur timer keeps wasFocused alive
through the synchronous blur from the DOM update).
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e1585b55-e135-45cd-b0f0-ac930cbd9b07

📥 Commits

Reviewing files that changed from the base of the PR and between 68aa2dd and 7163ace.

📒 Files selected for processing (1)
  • packages/app-bundle/overlay/packages/app/src/pages/session/composer/session-bug-dock.tsx

📝 Walkthrough

Walkthrough

BugDockView now preserves textarea focus during reporter status or agent text updates. It delays blur-state reset to tolerate DOM updates and replaces idle-warning border styling with consistent base and focus styles.

Changes

Bug report input behavior

Layer / File(s) Summary
Textarea focus preservation
packages/app-bundle/overlay/packages/app/src/pages/session/composer/session-bug-dock.tsx
The textarea tracks focus and blur state, restores focus after reporter status or agent text updates, and uses stable base and focus border styles.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: aarontrowbridge

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/478-bug-dock-focus-yellow

Comment @coderabbitai help to get the list of available commands.

@Rchari1
Rchari1 merged commit 4e7c2f4 into main Aug 24, 2026
6 of 8 checks passed
@Rchari1
Rchari1 deleted the fix/478-bug-dock-focus-yellow branch August 24, 2026 01:36
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.

BUG: Input box loses focus and turns yellow when background diagnostics collection completes mid-typing

1 participant