Merged
Conversation
This was referenced Jan 27, 2026
Merged
bensonwong
pushed a commit
that referenced
this pull request
Feb 10, 2026
…ervability, and component architecture ## Summary Phase A-C implementation of DX audit recommendations: **Phase A - README & Hooks** (#0-2, #4, #9) - Rewrite README.md with pain-point-first messaging, teaser code, component showcase, requirements tables, troubleshooting tips - Add deprecation JSDoc to legacy APIs (getAllCitationsFromDeferredResponse, etc.) - Soft-document compound components as experimental **Phase B - Documentation** (#4, #5, #6, #8, #13) - Create docs/error-handling.md with copy-paste retry patterns - Create docs/MIGRATION.md for tracking breaking changes - Cross-link docs with Related footers (getting-started, components, styling, index) **Phase C - CSS Theming** (#5) - Expose 12 CSS custom properties for full citation color customization - Replace hardcoded Tailwind classes with inline CSS var() styles - Add data-dc-indicator attributes for semantic test targeting - Update all tests to use data attributes instead of Tailwind selectors **Phase D - Observability** (#7, #8, #9) - Implement structured error hierarchy (DeepCitationError with 5 subclasses) - Map HTTP status codes to appropriate error types (401→Auth, 429→RateLimit, etc.) - Add optional DeepCitationLogger for structured observability - Add logging to all client methods: uploads, verification, caching, cache cleanup **Phase E - Component Architecture** (#10) - Extract useCitationEvents() hook to eliminate duplicate event handlers (30+ lines per variant) - Extract StatusIndicators component for shared verified/partial/miss/pending rendering - Reduce CitationVariants.tsx from 690→609 lines (81 lines removed, ~20-30 per variant) **Phase F - Accessibility** (#12) - Add aria-live regions for verification status change announcements - Add aria-describedby linking citations to their status descriptions ## Test Coverage - All 718 tests pass (624 main + 94 rendering) - TypeScript compiles cleanly - No breaking changes to public APIs (error classes are new exports, logging is optional) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This was referenced Feb 17, 2026
bensonwong
pushed a commit
that referenced
this pull request
Feb 24, 2026
- React Compiler: change panicThreshold from "none" to "critical_errors" so the compiler surfaces real issues (e.g. sync ref updates) instead of silently producing potentially incorrect memoization - esbuild plugin: add try-catch that gracefully falls back to uncompiled source when the compiler bails out, with a console.warn for visibility - Extract resolveEvidenceSrc() shared utility in EvidenceTray.tsx to deduplicate evidence image resolution between EvidenceTray and CitationDrawer (review finding #5) - Update CLAUDE.md canonical locations table Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bensonwong
added a commit
that referenced
this pull request
Feb 24, 2026
) * fix(react): drawer page pill, evidence expand, and miss thumbnail bugs - Deactivate page pill on Escape from inline image (track hasInlineOpen state mirroring inlineKeysRef so pill reactivity works) - Keyhole click now expands evidence image instead of full page by resolving evidenceSrc separately and routing onImageClick to it - Use object-center instead of object-top for miss thumbnails so white-header pages show useful content * docs: update npm package name from @deepcitation/deepcitation-js to deepcitation * feat(build): adopt React Compiler for pre-optimized library output Add babel-plugin-react-compiler to the tsup/esbuild build pipeline via a custom esbuild plugin, so consumers get automatic memoization out of the box without manual useMemo/useCallback/React.memo. The compiler only targets src/react/ files; non-React entry points are unaffected. - New esbuild-plugin-react-compiler.ts with panicThreshold: "none" - Wire plugin into tsup.config.ts esbuildPlugins - Add compiler to playwright-ct.config.ts Vite React plugin - Bump react/react-dom peer deps from >=17 to >=19 (compiler-runtime) - Bump react bundle size limit from 40 KB to 55 KB (memoization cache) * remove external page proof link (not ready) * fix(react): address review findings — compiler fallback, evidence dedup - React Compiler: change panicThreshold from "none" to "critical_errors" so the compiler surfaces real issues (e.g. sync ref updates) instead of silently producing potentially incorrect memoization - esbuild plugin: add try-catch that gracefully falls back to uncompiled source when the compiler bails out, with a console.warn for visibility - Extract resolveEvidenceSrc() shared utility in EvidenceTray.tsx to deduplicate evidence image resolution between EvidenceTray and CitationDrawer (review finding #5) - Update CLAUDE.md canonical locations table * fix(react): remove unused ExternalLinkIcon import and comment out proof link Removes unused ExternalLinkIcon import and temporarily disables the proof URL link in SourceContextHeader (not ready for production). * fix(ci): resolve lint, test, and Playwright failures from review round - VerificationLog: remove unused validatedProofUrl variable and isValidProofUrl import (proof link is temporarily disabled) - VerificationLog: prefix unused proofUrl prop with underscore - VerificationLog: fix biome formatting - Playwright CT: remove React Compiler from Vite config (Vite's babel integration doesn't support graceful fallback; compiler is only needed in production tsup builds which have the esbuild fallback) - Skip proof link test (feature temporarily disabled) * fix(test): skip Playwright proof link tests (feature temporarily disabled) Skip 2 Playwright CT tests that expect the proof link in SourceContextHeader — the feature is not ready for production.
This was referenced Feb 25, 2026
7 tasks
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.
No description provided.