Skip to content

feat: F050 evidence clipper#3

Merged
kahboom merged 1 commit intomainfrom
f050
Feb 28, 2026
Merged

feat: F050 evidence clipper#3
kahboom merged 1 commit intomainfrom
f050

Conversation

@kahboom
Copy link
Copy Markdown
Contributor

@kahboom kahboom commented Feb 28, 2026

Summary

  • Add evidence clipper module for capturing selected text as structured EvidenceClip objects with surrounding context, URL, timestamp, and optional field/claim associations
  • Pure function architecture (clipper.ts) with immutable list operations: createClip, addClip, removeClip, getClipsForField, getClipsForClaim
  • Content script handles CLIP_EVIDENCE message to capture window.getSelection() and return structured clip to popup
  • 21 new unit tests (100 total passing), all checks green

Test plan

  • 21 unit tests cover: context extraction with ellipsis, clip creation, empty/whitespace rejection, deduplication, field/claim filtering, immutable operations
  • TypeScript typecheck passes
  • Prettier + ESLint clean
  • Vite build succeeds

🤖 Generated with Claude Code

…evidence (F050)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kahboom kahboom merged commit 064b010 into main Feb 28, 2026
5 checks passed
@kahboom kahboom deleted the f050 branch February 28, 2026 21:14
kahboom added a commit that referenced this pull request Feb 28, 2026
Extract inline types ScanMetadata and RiskSummary from ThreadmarkBundle
for better reusability across future export formats. Make timestamp
injectable in buildThreadmarkBundle() to eliminate non-determinism
and enable cleaner unit tests without bundle mutation.

Changes:
- Add ScanMetadata interface for scan metadata shape
- Add RiskSummary interface for risk summary shape
- Accept optional exportedAt parameter in buildThreadmarkBundle()
- Update tests to inject timestamps instead of mutating bundles
- Add test for custom timestamp injection
- Export new types from types/index.ts

All 115 tests pass. Addresses feedback items #2, #3, #5, #6.

Co-Authored-By: Claude Sonnet 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