Repository navigation
Unfold research and investigation previews with a shared disclosure - #481
Merged
Merged
Conversation
MaggieAppleton
enabled auto-merge (rebase)
October 11, 2026 11:05
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Keep the editor caret when pressing the toggle or a source link, let the unfold crossfade survive the editor's reduced-motion reset, clamp the question, and key duplicate source URLs uniquely. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Render the investigation card toggle only once its panel has loaded. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
packages/visuals/src/ui/unfold.tsx: UnfoldToggle and UnfoldPanel forward typed DOM props (the controlled attributes are omitted from the type and set after the spread); the useUnfold trigger holds only ARIA state, a handler, a ref and type=button. Class merges join a caller string to a fixed cv-unfold base; every caller passes a static literal that is scanned at its call site. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… clip Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaggieAppleton
force-pushed
the
unfold-previews
branch
from
October 11, 2026 11:11
7e78838 to
b552f0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
This adds a shared, accessible Unfold disclosure to
@chopin/visualsand puts it to use across research and investigation cards.How the disclosure works
<button>witharia-expandedandaria-controls. The panel stays mounted and folds open through its grid row while the content fades and tips down.--duration-linger). Plain accordions take about 250 ms.inert,aria-hiddenand visibility-hidden, and focus returns to the toggle if it was inside.Where it's used
http(s)sources become links. Clicking the card itself still opens the child fully, and preview controls keep the editor's caret where it was.Slice 2 of the nested-documents work.
Screenshots
Research card, folded
Research preview, unfolded
Investigation card, folded and unfolded
Propose investigation, open with focus
Research child Brief
Notable fixes found by the tests
.plan * { transition: none !important }) also removed the unfold's crossfade. It now exempts.cv-unfold-content, so only a 200 ms opacity fade remains under reduced motion.Testing
e2e/unfold-previews.e2e.tscovers:experiments.e2e.tsandconnector.e2e.tsare updated off the<details>/summaryselectors and onto role selectors, with accordion timing and focus checks.research-child-recoveryBrief checks are updated.safeSourceHref, the preview and the investigation card.bun run types, unit tests (804 in the touched packages) and the design-contract check pass on the rebased head.connection,editingandgithub-pills. This is the known macOS Chromium End-key difference (editing.e2e.tsalready works around it), and CI runs on Linux.Design-contract review
Three exact exception groups were added for
unfold.tsx, with the maintainer's approval. They cover the caller button props, with ARIA, ref and type omitted, and the trigger object, which holds only ARIA state, a handler, a ref and the type. Each follows the wording of its sibling entries.🤖 Generated with Claude Code