Skip to content

Fix checkpoint panel visibility - CheckpointList not rendering items #85

Description

@frankbria

Problem

Checkpoint panel exists in Dashboard but CheckpointList component is not rendering checkpoint items, causing 8 E2E tests to fail.

Current Behavior

  • CheckpointList component exists with correct data-testid attributes
  • ✅ Panel is rendered in Dashboard (web-ui/src/components/Dashboard.tsx:511-516)
  • ❌ No checkpoint items appearing in the list
  • ❌ Tests timing out waiting for checkpoint-item-* elements

Failed Tests (8 total)

All in tests/e2e/test_checkpoint_ui.spec.ts:

  • should display checkpoint panel (line 39)
  • should list existing checkpoints (line 58)
  • should open create checkpoint modal (line 94)
  • should validate checkpoint name input (line 111)
  • should show restore confirmation dialog (line 139)
  • should display checkpoint diff preview (line 163)
  • should display checkpoint metadata (line 187)
  • should allow deleting checkpoint (line 206)

Root Cause Analysis Needed

1. Verify API endpoint returns data

curl http://localhost:8080/api/projects/1/checkpoints

Expected: Array of checkpoint objects
Actual: ?

2. Check test database seeding

sqlite3 tests/e2e/.codeframe/state.db "SELECT * FROM checkpoints;"

Expected: 3 checkpoints (per seed-test-data.py output: "✅ Seeded 3/3 checkpoints")
Actual: ?

3. Verify CheckpointList API call

Check browser console for:

  • API request to /api/projects/1/checkpoints
  • Response status and data
  • Any JavaScript errors

4. Check component rendering logic

File: web-ui/src/components/checkpoints/CheckpointList.tsx:59-73

Does loadCheckpoints() successfully fetch and set state?

Debugging Steps

  1. Check if data exists in database:

    sqlite3 tests/e2e/.codeframe/state.db "SELECT id, name, created_at FROM checkpoints WHERE project_id = 1;"
  2. Test API endpoint manually:

    curl -v http://localhost:8080/api/projects/1/checkpoints
  3. Add console logging to CheckpointList:

    // In loadCheckpoints() at line 59
    console.log('Fetching checkpoints for project:', projectId);
    const data = await listCheckpoints(projectId);
    console.log('Checkpoints received:', data);
  4. Check for React errors:

    • Open browser dev tools during test run
    • Look for errors in Console tab
    • Check Network tab for failed API requests

Expected Fix

Once root cause identified, likely one of:

  • API issue: Backend endpoint not returning data
  • Database issue: Checkpoints not seeded properly
  • Frontend issue: CheckpointList not handling data correctly
  • Routing issue: API path mismatch

Impact

Blocks 8/12 failed E2E tests - highest impact issue after tab navigation.

Acceptance Criteria

  • /api/projects/1/checkpoints returns 3 checkpoints
  • CheckpointList renders 3 checkpoint items
  • Each item has data-testid="checkpoint-item-{id}"
  • Checkpoint name, timestamp, and git SHA visible
  • Create checkpoint button visible
  • All 8 checkpoint UI tests pass

Related Files

  • web-ui/src/components/checkpoints/CheckpointList.tsx:59-73 - Data loading
  • web-ui/src/api/checkpoints.ts - API client
  • tests/e2e/seed-test-data.py - Database seeding
  • codeframe/ui/server.py - Backend API endpoints
  • tests/e2e/.codeframe/state.db - Test database

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions