Skip to content

edits for demo and parsing presevation#12

Merged
bensonwong merged 1 commit intomainfrom
patch/parsing-preservation
Jan 13, 2026
Merged

edits for demo and parsing presevation#12
bensonwong merged 1 commit intomainfrom
patch/parsing-preservation

Conversation

@bensonwong
Copy link
Collaborator

No description provided.

@bensonwong bensonwong merged commit 6faae25 into main Jan 13, 2026
@bensonwong bensonwong deleted the patch/parsing-preservation branch January 13, 2026 02:18
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>
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