Skip to content

feat: Make research log accessible from UI #464

Description

@pmilano1

Problem

The research log (search_attempts table) captures valuable information about what sources have been searched for each person, but this data is nearly invisible in the UI:

  1. Research Queue page - Only shows a count (searchedCount) which isn't actionable
  2. Sources column is noise - Showing recommended sources per row is redundant and clutters the view
  3. No way to see search history - Users can't easily see what's already been tried
  4. Person page - No research history visible at all

Current State

| Priority | Gap Type | Person | Location | Target | Sources (useless) | Searched (just a number) |

The previous_searches data exists in GraphQL but isn't surfaced meaningfully.

Proposed Solutions

1. Expandable Row Detail (Research Queue)

Click a row → expands to show search history inline

| ▶ | 85 | End of Line | John Smith (1850-1920) | Italy | Parents 1820-1850 |

↓ clicks ↓

| ▼ | 85 | End of Line | John Smith (1850-1920) | Italy | Parents 1820-1850 |
|   └─ Search History                                                        |
|      ✗ Antenati - NO_MATCH - "Searched Genoa 1820-1850" - Dec 25           |
|      ✗ FamilySearch - NO_MATCH - "No results for surname" - Dec 24         |
|      ⏳ WikiTree - not searched                                             |
|      ⏳ Geneanet - not searched                                             |
|      [+ Log Search Attempt]                                                 |

Benefits:

  • See exactly what's been tried at a glance
  • Know which sources remain to search
  • Log new attempts without leaving the page

2. Replace Sources Column with Search Progress

Instead of listing source names, show actionable status:

Before (useless) After (useful)
Antenati, FS, WT 2/5 searched with color indicator
or empty 🔴 Not started / 🟡 In progress / 🟢 Exhausted

3. Person Page: Research History Section

Add a collapsible section on the person page (maybe in ResearchPanel sidebar or main content):

📋 Research History
─────────────────────────────
Gap: Missing Parents
  • Antenati - No match (Dec 25, 2024)
    "Searched Genoa births 1820-1850, no records for Milanese"
  • FamilySearch - No match (Dec 24, 2024)  
    "Checked Italy collection, surname not found"

Gap: Missing Birth Date
  • (no searches yet)

[View All] [+ Log Search]

4. Quick Filters by Search Status

Add filter options to Research Queue:

  • Never searched - prioritize untouched tasks
  • Partially searched - some sources tried
  • All searched, no match - might need different approach
  • Has possible matches - needs human review

5. Source-Aware Progress (Advanced)

Cross-reference previous_searches with sources to show:

Sources for this task:
  ✓ Antenati (searched Dec 25 - no match)
  ✓ FamilySearch (searched Dec 24 - no match)  
  ○ WikiTree (not searched - API available)
  ○ Geneanet (not searched - requires login)

Implementation Notes

  • previous_searches already exists on ResearchTask type
  • Data is fetched but only length is used currently
  • Could add search_status computed field: NOT_STARTED | IN_PROGRESS | EXHAUSTED | HAS_LEADS
  • Consider caching/batching if expanding all rows

Priority

Medium - improves research workflow efficiency significantly, especially for AI agent collaboration where knowing what's been tried is critical.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions