Skip to content

feat(pr-review): collapse answered open questions - #96

Merged
Troublor merged 1 commit into
mainfrom
williamaaroncheung/feat/collapse-answered-questions
Jul 28, 2026
Merged

feat(pr-review): collapse answered open questions#96
Troublor merged 1 commit into
mainfrom
williamaaroncheung/feat/collapse-answered-questions

Conversation

@Troublor

Copy link
Copy Markdown
Collaborator

Summary

Answered questions kept their full rationale expanded forever. Once a question is closed, the why it matters and how to verify bullets are only history — but deleting them loses the record of what was asked, which is exactly what someone reading the thread later wants.

So: collapse, do not discard.

  • Each open question is now published inside a <details open> block.
  • When a later round dispositions it answered or withdrawn, the in-place rewrite swaps the two-line <details>/<summary> header, dropping the open attribute. The question reads as one ✅ **Answered** — <reason> line that expands to the original question, why it mattered, and how to verify it.
  • The replacement still reproduces the marker, so re-applying remains a no-op and the retry-on-failure path is unchanged.
  • A question published before this shape existed (for example the one currently live on megaeth-labs/mega-agents#236) falls back to the previous single-line rewrite rather than injecting an unbalanced <details> into a body with no closing tag.

Follow-up to #94.

Test plan

  • python3 -m unittest discover -s .github/actions/claude-pr-review -p 'test_*.py' — 70 pass, 4 new: open questions render expanded, answering collapses the block while keeping the bullets, the collapse rewrite is idempotent, and a legacy single-line question still annotates.
  • mise run lint — clean.
  • Verified against real output on megaeth-labs/mega-agents#236, where the pre-collapse format is live: round 1 asked a question, round 2 answered and rewrote it in place.

Publish each open question inside a <details> block that starts expanded, and
collapse it when a later round marks it answered or withdrawn. Once a question
is closed its why-it-matters and how-to-verify bullets are only history, so it
reads as a single green summary line that still expands to the original
question rather than losing it.

The in-place rewrite now swaps the two-line details/summary header instead of a
single line. It still reproduces the marker, so re-applying stays a no-op, and
a question published before this shape existed falls back to the old
single-line rewrite.
@mega-maxwell

mega-maxwell Bot commented Jul 28, 2026

Copy link
Copy Markdown

Claude review status

Living comment — rewritten in place. The review workflow keeps this single comment up to date instead of posting a new one each round, so it always describes the latest reviewed commit and the earlier text is intentionally gone. No reply is needed here; answer findings and questions in the review threads it links to.

✅ Review clean

Last reviewed: head b9c82372 · updated 2026-07-28T08:24:53+00:00

New this round: 0 finding(s), 0 question(s) · Resolved this round: 0 · Open questions: 0

@Troublor
Troublor merged commit 015fdd9 into main Jul 28, 2026
5 checks passed
@Troublor
Troublor deleted the williamaaroncheung/feat/collapse-answered-questions branch July 28, 2026 08:29
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