# JEV-005 — Open Jev diagnostics explicitly from code icons Status: Ready for Maggie’s review. PR: [#243](https://github.com/githubnext/chopin/pull/243). Reported as “Issue 4” by Maggie; JEV-004 already tracks the separate baseline CI timeouts. Stable ID: JEV-005. ## Problem and concrete reproduction Hovering or scrolling across chat messages opens Jev analysis popovers. Hovering an open decision opens its evidence/developer-information popover. These surfaces interrupt ordinary reading. Code inspection confirms message mouseenter listeners in `apps/web/src/conversation-plan/markers.tsx`; card evidence uses the shared editor hover layer. This issue concerns interaction, not analysis correctness. 1. Open a document with analysed chat messages and an open Jev decision. 2. Move across messages, scroll the transcript, and hover the decision body. 3. Observe debug popovers opening without deliberate activation. ## Approved behavior and scope Maggie requested small code/dev icon buttons. Chat gets one at the top-right of each message with available diagnostics. Decisions get one immediately left of “Show source in chat”. Clicking or keyboard-activating the code icon opens the existing popover content. Hover, focus alone, message-body clicks and ordinary scrolling do not open debugging popovers. Escape, close and outside click dismiss an open panel; appropriate focus returns to the trigger. Explicit Review actions continue to work. Source navigation, evidence contents and normal decision readers retain their behavior. Icons use the existing shared button style and icon set. Two approaches considered: reuse current popovers and replace triggers (chosen: small change, preserves content), or introduce a separate diagnostics inspector (more state and a new UI surface). The existing source icon is the visual reference; Maggie described the end state directly and preapproved specs/plans. Scope excludes anchor precedence (JEV-001), prose rationale (JEV-002), extraction and recovery policy (JEV-003), and CI reliability (JEV-004). Keep the main design system and shared decision renderer; do not restore the legacy Jev renderer. ## Implementation plan - [x] Implementer owns message diagnostics (`markers.tsx`, message layout/source CSS as needed), shared decision evidence triggers/header slots, and relevant regression tests. Identify the actual evidence layer owner before changing it. - [x] Remove automatic hover/focus/body activation, retain one explicit code-icon trigger per surface, and preserve popover dismissal and source navigation. - [x] Add meaningful real-browser checks: no hover/scroll activation; pointer, Enter/Space activation; Escape/outside dismissal and focus; decision icon order; normal Review/source actions; mobile/desktop placement and overflow. - [x] Run formatting and appropriate checks. A separate tester and reviewer verify the final diff; repair findings and retest before PR handoff. - [x] Orchestrator owns this record/index, git and PR publication, and a real UI image captured and verified with the PR visual preview skill. Fix PR targets `Maggie/jev-chat-product`; no merge or direct prototype push. ## Acceptance and verification Both requested icon placements are visible, accessible and independently usable. No Jev debug/evidence panel opens from incidental hovering or scrolling. Existing contents and explicit recovery/source actions remain available. Verify real browser geometry at 390×844, 893×850 and 1440×900. Independent testing and review, types and repository CI must pass before handoff. Implementer (Sol/high) confirmed the decision owner is `packages/editor/src/widgets/evidence-hover.tsx`, used by the shared `QuestionnaireCard`. Chromium tests of the actual Transcript and QuestionnaireCard reproduced both unwanted hover openings before implementation; both targeted regressions passed afterward. Production removes hover timers/listeners and focus/body auto-opening, reserves space for the visible chat control, and places the decision control immediately before the existing source button. Independent browser checks pass at all three viewport sizes, including keyboard activation, dismissal, decision icon order, source navigation and Review actions. Review found and repaired three interaction gaps: decision panels receive keyboard focus when opened; message panels close when diagnostics disappear during reconnect; in-view decision panels reposition after late scroll events rather than immediately closing, while offscreen cards dismiss their panels. Final verification: - Independent tester (Sol/medium): 24 native Chromium checks, 29 targeted unit checks, `bun run types`, `bun run ci`, and `git diff --check` pass. - Implementer (Sol/high): rebuilt application decision-evidence suite 10/10 passes; relevant jobs/stress checks 3/3 pass; chat UI suite 13/14 passes. - The remaining chat test, “mounted parent and child transcripts keep their own source ranges”, times out waiting for its seeded child workspace. The exact test fails at the same assertion on an untouched archive of prototype commit `27eb3724a6e7ba3020552e7a1fa17f234811941b`, with a separately built client and disposable test database. This is a baseline fixture limitation; no child navigation change is included in this issue. - Independent reviewer (Sol/high): approved, no remaining actionable findings. - Real component screenshots show both code controls and opened popovers. Both screenshots are attached to PR #243 as GitHub assets; the published description renders exactly two inline images with useful alt text, each verified HTTP 200 and `image/png`. No local image references remain. The existing signed-in prototype at port 8787 must stay running and its document unchanged; use disposable fixtures for mutations. Never read or publish .env contents, credentials or API keys.