[Artifacts] Artifact version browser UI: timeline, diff view, provenance graph done

← Artifacts
Build UI components for browsing artifact versions. Version timeline sidebar showing all versions with tags and timestamps. Diff view highlighting metadata changes between versions. Provenance graph visualization showing how artifacts derive from each other (reuse subgraph_widget_html pattern). Add to artifact detail pages and analysis detail pages. Depends on: a17-20-VAPI0001, a17-24-REPR0001. ## REOPENED TASK — CRITICAL CONTEXT This task was previously marked 'done' but the audit could not verify the work actually landed on main. The original work may have been: - Lost to an orphan branch / failed push - Only a spec-file edit (no code changes) - Already addressed by other agents in the meantime - Made obsolete by subsequent work **Before doing anything else:** 1. **Re-evaluate the task in light of CURRENT main state.** Read the spec and the relevant files on origin/main NOW. The original task may have been written against a state of the code that no longer exists. 2. **Verify the task still advances SciDEX's aims.** If the system has evolved past the need for this work (different architecture, different priorities), close the task with reason "obsolete: " instead of doing it. 3. **Check if it's already done.** Run `git log --grep=''` and read the related commits. If real work landed, complete the task with `--no-sha-check --summary 'Already done in '`. 4. **Make sure your changes don't regress recent functionality.** Many agents have been working on this codebase. Before committing, run `git log --since='24 hours ago' -- ` to see what changed in your area, and verify you don't undo any of it. 5. **Stay scoped.** Only do what this specific task asks for. Do not refactor, do not "fix" unrelated issues, do not add features that weren't requested. Scope creep at this point is regression risk. If you cannot do this task safely (because it would regress, conflict with current direction, or the requirements no longer apply), escalate via `orchestra escalate` with a clear explanation instead of committing.

Completion Notes

Auto-completed by supervisor after successful deploy to main

Git Commits (1)

[Atlas] Artifact version browser UI: timeline, diff, provenance graph [task:a17-25-AVUI0001]2026-04-16
Spec File

[Artifacts] Artifact version browser UI: timeline, diff view, provenance graph

Goal

Make artifact versioning visible and navigable in the web UI. Users should be able to see the full history of any artifact, compare versions, and trace provenance chains visually.

Components

1. Version Timeline Sidebar

A vertical timeline showing all versions of an artifact:

v3 (latest) ● 2026-04-05  [stable]
             "Binding-affinity tuned"
v2          ● 2026-04-04
             "Stability-optimized mutations"  
v1          ● 2026-04-03
             "Initial AlphaFold prediction"

  • Each entry shows: version_number, version_tag (if set), created_at, changelog excerpt
  • Click any version to view its detail
  • Current version highlighted
  • Compact by default, expandable

2. Version Diff View

Side-by-side comparison of two versions:
  • Metadata field diffs highlighted (added=green, removed=red, changed=yellow)
  • For protein designs: show mutation differences
  • For models: show metric improvements/regressions
  • For datasets: show schema changes, row count changes
  • Use the /api/artifact/{id}/diff/{other_id} endpoint

3. Provenance Graph

Interactive DAG visualization showing how artifacts relate:
  • Reuse the subgraph_widget_html() pattern from the KG viewer
  • Nodes = artifacts (colored by type: paper=blue, dataset=green, model=purple, etc.)
  • Edges = artifact_links (derives_from, supports, cites, etc.)
  • Version numbers shown on nodes
  • Click a node to navigate to its artifact page
  • Use the /api/analysis/{id}/provenance endpoint for analysis-centric views

4. Integration Points

  • Artifact detail page: Add version timeline sidebar + provenance graph tab
  • Analysis detail page: Add provenance DAG showing inputs → analysis → outputs
  • Hypothesis page: Show linked artifacts with their versions
  • Dataset page: Show derived tabular datasets and their versions

Technical Approach

  • Server-side rendered HTML (matching existing SciDEX patterns — no React/Vue)
  • JavaScript for interactive provenance graph (vis.js or d3.js, matching existing graph page)
  • CSS consistent with existing scidex-dark theme
  • Endpoints already defined in a17-20 and a17-24

Acceptance Criteria

☑ Version timeline sidebar renders on artifact detail pages
☑ Timeline shows version_number, tag, date, and changelog
☑ Clicking a version navigates to that version's detail
☑ Diff view shows metadata differences between two versions
☑ Provenance graph renders as interactive DAG
☑ Provenance graph nodes are colored by artifact type
☑ Provenance graph is navigable (click to follow links)
☑ Components work on analysis detail pages
☑ Consistent with existing SciDEX dark theme
☑ Work log updated with timestamped entry

Dependencies

  • a17-20-VAPI0001 (version API endpoints)
  • a17-24-REPR0001 (provenance DAG endpoint)

Dependents

  • d16-20-AVER0001 (demo: versioned protein design showcase)
  • d16-24-PROV0001 (demo: end-to-end provenance)

Work Log

2026-04-16 11:30 PT — Slot 0 (minimax:74)

  • Implemented artifact_provenance_graph_html function (api.py:2339-2470): New D3 force-directed graph visualization for artifact provenance, reusing subgraph_widget_html pattern but adapted for artifact nodes (colored by artifact_type, links to /artifact/ pages)
  • Enhanced artifact_detail page (api.py ~22181):
- Replaced simple provenance chain text list with interactive provenance DAG graph using artifact_provenance_graph_html
- Enhanced version timeline to show vertical timeline with clickable version nodes, version badges, and current version highlight
- Added version diff view with dropdown selectors to compare any two versions, showing metadata differences (added=green, removed=red, changed=yellow)
  • Added provenance graph to analysis_detail_main (api.py ~34047):
- Fetches analysis provenance via artifact_registry.get_analysis_provenance()
- Displays interactive provenance DAG with workflow steps and reproducibility status
- Graph shows inputs → analysis → outputs lineage
  • Modified page_template (api.py:3539) to accept optional extra_scripts parameter for injecting page-specific JavaScript
  • Tested: python3 -m py_compile api.py → Syntax OK
  • Commits: [Atlas] Artifact version browser UI: timeline, diff, provenance graph [task:a17-25-AVUI0001]

Sibling Tasks in Quest (Artifacts) ↗