Skip to content

Fix/npm build#3

Merged
bensonwong merged 2 commits intomainfrom
fix/npm-build
Jan 10, 2026
Merged

Fix/npm build#3
bensonwong merged 2 commits intomainfrom
fix/npm-build

Conversation

@bensonwong
Copy link
Collaborator

No description provided.

@bensonwong bensonwong merged commit 9987b9c into main Jan 10, 2026
@bensonwong bensonwong deleted the fix/npm-build branch January 10, 2026 04:24
bensonwong added a commit that referenced this pull request Jan 31, 2026
…ges addressing all 33 feedback items:

## Changes Made

**Structure & Progressive Disclosure (Feedback #1-5, #29-30):**
- Added "Agent Behavior Guidelines" at the very top
- Added "Is DeepCitation Right for You?" quick check
- Moved Critical Warnings to prominent position with visual examples
- Moved Quick Start complete example to near-top
- Added Core Workflow ASCII diagram with "Why" explanations
- Reorganized by user journey (basics → advanced)

**Preventing Fabrication (Feedback #6-7, #18-19):**
- Added explicit DO/DON'T list for agents
- Created Appendix A: Real URLs (complete list of all legitimate URLs)
- Created Appendix B: What DeepCitation Doesn't Do

**Critical Warnings (Feedback #11-13):**
- Made `<<<CITATION_DATA>>>` warning extremely prominent with visual before/after
- Added streaming guidance about when the block arrives
- Added security notes throughout (API key handling, unsafe URL mode)

**Technical Completeness (Feedback #8, #14-17, #24-28):**
- Added error handling patterns with try/catch
- Explained async nature of verification
- Added `prepareUrl()` method with 30s processing time warning
- Added `unsafeFastUrlOutput` security warning
- Expanded multiple documents pattern with explicit `fileDataParts` mapping
- Added UI guidance to verification status table

**Troubleshooting (Feedback #10, #32):**
- Expanded each issue with: Symptoms, Causes, Solutions, DON'T sections
- Separated from Agent Guidelines

**Collapsible Sections (Feedback #3, #31):**
- Used `<details>` for LLM provider alternatives
- Used `<details>` for React component variants
- Used `<details>` for unsafe URL mode

**Reference Sections (Feedback #20-23, #25):**
- Added descriptions to Key Imports Reference
- Added Production Checklist in prominent location
- Moved Next.js API routes under Framework Integration
bensonwong added a commit that referenced this pull request Jan 31, 2026
… disclosure (#123)

* AGENTS.md has been completely rewritten. Here's a summary of the changes addressing all 33 feedback items:

## Changes Made

**Structure & Progressive Disclosure (Feedback #1-5, #29-30):**
- Added "Agent Behavior Guidelines" at the very top
- Added "Is DeepCitation Right for You?" quick check
- Moved Critical Warnings to prominent position with visual examples
- Moved Quick Start complete example to near-top
- Added Core Workflow ASCII diagram with "Why" explanations
- Reorganized by user journey (basics → advanced)

**Preventing Fabrication (Feedback #6-7, #18-19):**
- Added explicit DO/DON'T list for agents
- Created Appendix A: Real URLs (complete list of all legitimate URLs)
- Created Appendix B: What DeepCitation Doesn't Do

**Critical Warnings (Feedback #11-13):**
- Made `<<<CITATION_DATA>>>` warning extremely prominent with visual before/after
- Added streaming guidance about when the block arrives
- Added security notes throughout (API key handling, unsafe URL mode)

**Technical Completeness (Feedback #8, #14-17, #24-28):**
- Added error handling patterns with try/catch
- Explained async nature of verification
- Added `prepareUrl()` method with 30s processing time warning
- Added `unsafeFastUrlOutput` security warning
- Expanded multiple documents pattern with explicit `fileDataParts` mapping
- Added UI guidance to verification status table

**Troubleshooting (Feedback #10, #32):**
- Expanded each issue with: Symptoms, Causes, Solutions, DON'T sections
- Separated from Agent Guidelines

**Collapsible Sections (Feedback #3, #31):**
- Used `<details>` for LLM provider alternatives
- Used `<details>` for React component variants
- Used `<details>` for unsafe URL mode

**Reference Sections (Feedback #20-23, #25):**
- Added descriptions to Key Imports Reference
- Added Production Checklist in prominent location
- Moved Next.js API routes under Framework Integration

* fix: Address PR review feedback for AGENTS.md

- Fix streaming example: clarify that raw content should NOT be streamed
  to users; add comments explaining buffering strategy
- Add model name clarification comment (use your preferred model)
- Add Rate Limiting & Caching section with attachmentId caching example
- Add input validation example in verify API route
- Add SSRF security warning for user-provided URLs
- Update production checklist with validation and caching items

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
bensonwong added a commit that referenced this pull request Feb 13, 2026
- Add clarifying comment to _buildSearchSummary utility (ready for task #4)
- Document touch device detection media query trade-offs and safe degradation
- Add z-index layering hierarchy documentation for overlay stacking

Addresses medium-priority items from code review:
- Issue #3: Clarify unused buildSearchSummary function purpose
- Issue #6: Document touch detection limitations and safe fallback behavior
- Issue #7: Document z-index layering for better maintainability

Co-Authored-By: Claude Code <noreply@anthropic.com>
bensonwong added a commit that referenced this pull request Feb 13, 2026
…xes (#221)

* docs: add actionable UX feedback for citation popover, drawer, and trigger components

Comprehensive design review covering source identity gaps, popover information
hierarchy, drawer redundancy, proof image interaction, trigger bar affordance,
chip hover polish, and dark mode contrast. 19 prioritized items with
implementation notes and file references.

* fix: bug fixes and UX improvements for citation components (WIP batch 1)

- Fix popover closing when dismissing image overlay (stopPropagation +
  delayed unregisterOverlay so click-outside still sees overlay as open)
- Fix superscript/footnote dot indicator centering (items-baseline → items-center)
- Add status-colored borders to chip variant for differentiation without indicator
- Add sourceLabelMap prop types to CitationDrawer and CitationDrawerTrigger
- Add hover affordance to trigger bar (cursor-pointer, bg transition)

More changes from parallel agents incoming.

* Committed as `200c521`. The agents are still working on the remaining changes (popover info hierarchy, drawer content, verification log, chip hover). I'll commit those as they complete.

* fix: replace chip hover:brightness-95 with status-colored hover backgrounds

The previous brightness-95 hover effect was barely perceptible. Now each
status gets an explicit hover background (green-200 for verified, amber-200
for partial, red-200 for miss, gray-200 for pending) for clear visual
feedback on interaction.

* Committed chip hover as `7f7c7cf`. Three agents still running:
- **ad2bfd3**: Popover — removing "Expand" link, adding HighlightedPhrase/fullPhrase display
- **acb1d72**: VerificationLog — source name in header, status row rewrite, humanizing message fix
- **a655a0e**: Drawer — hiding 1-citation count, collapsing single groups, fixing trigger plural

Waiting for them to complete.

* fix: popover info hierarchy, source name in header, drawer citation count

Popover changes:
- Add HighlightedPhrase component showing fullPhrase with anchorText
  highlighted using shared amber highlight style (matches proof images)
- Show fullPhrase in verified, partial, and not-found popover states
- Remove "Expand" text link (image is already clickable with hover overlay)
- Fix not-found message to stop repeating anchor text

VerificationLog changes:
- Always show source name in SourceContextHeader (fall back to "Document")
- StatusHeader now shows status text ("Verified", "Not found", "Partial
  match") instead of echoing the anchor text back to the user
- Remove copy button from status header row (anchor text echo removed)

Drawer changes:
- Hide "1 citation" count badge on single-item groups (self-evident)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add remaining UX tasks for delegation

5 lower-priority P2 items scoped but not completed in this PR:
drawer source name dedup, single-group collapse, trigger badge
cleanup, fullPhrase copy button, drawer phrase merge.

* chore: Auto-update Playwright visual snapshots [skip ci]

* fix: drawer polish — hide repeated source names, merge phrases, compact single-citation groups

- Wire up hideSourceName prop to suppress source name in grouped citation rows (#8)
- Merge anchorText + fullPhrase with highlighted bold when anchor is substring (#10)
- Add CompactSingleCitationRow for single-citation groups instead of header+item (#11)
- Move REMAINING_TASKS.md to plans/drawer-trigger-copy-polish.md

* chore: Auto-update Playwright visual snapshots [skip ci]

* chore: archive implemented design feedback to plans/

* fix: address code review issues — source label map threading, word count edge case

- Add sourceLabelMap prop to CitationDrawer and thread through SourceGroupHeader
- Fix word count edge case in HighlightedPhrase for empty/whitespace-only strings
- Note: buildSearchSummary utility defined for future use but not yet integrated

Addresses critical issues from Claude code review:
- Missing sourceLabelMap in multi-citation group rendering
- Word count returning 1 for empty strings instead of 0

* chore: apply biome linter fixes

- Prefix unused handleCopy with underscore
- Prefix unused buildSearchSummary with underscore (ready for future task #4)
- Remove unnecessary variable initialization
- Format single-line conditional returns

* test: fix tests to match new drawer and popover behavior

- StatusHeader now shows 'Verified'/'Not found' text instead of echoing anchor text
- SourceContextHeader now always shows source name (fallback to 'Document')
- Single-citation groups render as CompactSingleCitationRow (one line, no title display)
- Multi-citation groups still have expanded items with titles

Fixes:
- Update StatusHeader test expectations
- Update SourceContextHeader test expectations
- Fix CitationDrawer test to click on button role instead of title text
- Update citation items test to account for CompactSingleCitationRow behavior

* docs: enhance code review feedback and edge case documentation

- Add clarifying comment to _buildSearchSummary utility (ready for task #4)
- Document touch device detection media query trade-offs and safe degradation
- Add z-index layering hierarchy documentation for overlay stacking

Addresses medium-priority items from code review:
- Issue #3: Clarify unused buildSearchSummary function purpose
- Issue #6: Document touch detection limitations and safe fallback behavior
- Issue #7: Document z-index layering for better maintainability
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