feat(citations): wire CitationBrowser into the editor (P4.8) - #61
Merged
Conversation
Assisted-by: Claude Code (Sonnet) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…utton) (#60) Assisted-by: Claude Code (Sonnet) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Closes #60
Summary
Activates the citation feature that was fully built but never mounted —
CitationBrowser(699 lines, data/service/fixtures all present and tested) had no UI entry point, so the live demo lacked citations despite the README advertising them.Wired it in by mirroring the working
ClauseBrowserintegration:uiSlice:showCitationBrowser+setShowCitationBrowser.Editor.tsx: a "Citations" toolbar button (next to "Clauses").App.tsx: mountsCitationBrowserin a modal shell; insert flows throughsetPendingInsertion→ TipTapinsertContent(identical path to clauses; verified).Citation content comes from the same
getDataClient()demo layer as clauses (DEMO_CITATIONSfixtures), so it works in the live demo immediately.Review-driven fix
The cold-review gate caught a UX trap: the modal could only be closed by inserting a citation. Fixed — backdrop-click-to-close, an explicit X button (
aria-label="Close citation browser"), and Escape-to-close, with a red-first test covering close-without-insert.README
CitationManager"capture" view remains unmounted — noted as a follow-up).Red-first / tests
b3a88f3(red: not wired) →1db486c(green: wired) →694c5cd(dismissability fix, red→green). Frontend 541 passed, server 240,npm run buildclean.Gates
/simplify+/security-review+/code-reviewvia fresh cold reviewer — one HIGH finding (dismissability) fixed before this PR; re-verified clean.Follow-up (not this PR): mount the standalone
CitationManagerCRUD view for citation "capture"; optionally recapture demo slot 5 with the now-live citation browser.Assisted-by: Claude Code (Fable orchestrator + Sonnet implementer/reviewer)