← Back to Pull requests

Quote what a reply answers instead of a bold link #409

Open
unknown opened this pull request with 360 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 26, 2026 03:23 UTC
Author

Why

A reply's context looked different depending on how the reply was made:

  • Answers to a question showed a quiet "↩ question" quote above the bubble.

  • Replies made with the Reply action showed a bold accent Open original message link under the bubble. It appeared even when the original was the message directly above, so every answer and follow-up carried a loud link that repeated what the layout already shows.
  • There was also a crash. The answer-quote code inserted the quote with row.insertBefore(quote, meta.nextSibling), but neither row nor meta exists in eventCard. When an answer wasn't directly under its question, rendering threw and the whole conversation stayed blank. The new test reproduces this on main: it fails with "The conversation did not render every message".

    What changed

  • Same quote for replies. A reply now gets the same quote above its bubble as an answer, showing the original's text (or "Earlier message" if it isn't loaded).

  • - The quote is a button that jumps to the original, using the existing in-timeline jump.
    - Hovering it darkens the text.
    - Its accessible name is "Show the message this replies to: …".
  • No quote when adjacent. The quote is left out when the original is the message just before, including a result whose report is folded into the completed row.

  • Crash fixed. Quotes are now placed when the row is assembled, so the answer path no longer throws.
  • Screenshots

    Same steps in both:
    1. answer the question
    2. reply to the latest result
    3. reply to the first result

    | Before | After |
    | --- | --- |
    | <img alt="Before: every reply has a bold Open original message link, including ones directly under their original" src="https://github.com/user-attachments/assets/b5bacf95-bddd-42a6-8016-775569f0dedf" width="480"> | <img alt="After: the answer and the reply to the latest result have no link; the reply to an earlier result shows a quiet quote above the bubble" src="https://github.com/user-attachments/assets/0a76d26a-34b9-4262-8e0c-130b5fb3093d" width="480"> |

    Verification

  • New web/tests/reply-quote.mjs, registered in CTest, checks:

  • - no quote under an adjacent original
    - the quoted text sits above the bubble
    - the answer keeps its question
    - clicking the quote highlights the original
  • It fails on main because of the render crash and passes here.

  • All 20 Web .mjs tests pass with Chrome.
  • 🤖 Generated with Claude Code

    <!-- devin-review-badge-begin -->

    ---

    <a href="https://app.devin.ai/review/my-name-is-yu/flock/pull/409" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4" alt="Devin Review"></picture></a>
    <!-- devin-review-badge-end -->

    Diff: 360 lines (+270 / -90) across 4 files Reviewer: devin-ai-integration[bot] Review duration: 4m
    All Vouch review confidence checks passed
    Residual risk 0.32 = Change Risk (0.43) × (1 − Review Confidence (0.25)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 360 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 47% · Reviewer familiarity: 35%
    25%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.352
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #409"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 25.4% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.6% (MEDIUM) · Higher = larger blast radius
    42.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 25.4% · Lower = rushed or shallow review
    25.4%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 31.8% · Safe to merge
    31.8%