Files
ai-news-writer/docs/BIT-5284-PHASE2-ISSUE-TEMPLATE.md
2026-04-23 19:54:23 +00:00

3.6 KiB

BIT-5284 Phase 2 Child Issue Template

Use this template to create the Phase 2 child issue in Paperclip once BIT-4619 backend modules are ready.


Issue Details

Title: BIT-5284 Phase 2: Real Backend Integration — Swap Mock API for Real Analytics Data

Parent: BIT-5284 (Phase 1 complete)

Status: in_progress (or blocked_on_dependency)

Priority: medium


Description

Objective

Integrate the real analytics backend (from BIT-4619) with the Phase 1 dashboard UI.

Context

Phase 1 (BIT-5284-PHASE1) delivered a complete dashboard UI with mock data. Phase 2 replaces the mock API with the real backend modules once they are implemented on BIT-4619.

Acceptance Criteria

  • BIT-4619 backend modules are implemented and tested (aggregation, stores, db, schema)
  • Dashboard branch rebased onto completed BIT-4619 backend
  • Mock API import replaced with real backend import (single line change)
  • Integration tests verify dashboard works with real backend
  • PR created and merged for Phase 2

Dependencies

  • Blocked by: BIT-4619 (backend module implementation)
  • Parent: BIT-5284 (Phase 1 complete)

Implementation Notes

Changes Required

// File: src/http/ui-handlers.js
// Change this line:
- import * as api from './analytics-api.js';  // mock API
+ import * as api from '../analytics/';  // real backend

// Then rebase on BIT-4619 backend branch

Integration Testing

  • Verify dashboard renders with real backend data
  • Verify CSV export generates from real backend
  • Check performance with real data volume
  • Verify error handling for backend failures

Resources

  • docs/BIT-5284-INTEGRATION-PLAN.md — API contract
  • docs/BIT-5284-COMPLETION-HANDOFF.md — Phase 2 integration instructions
  • docs/BIT-5284-PHASE-2-BLOCKER.md — Required backend modules

Unblock Action

Implement 5 missing modules on BIT-4619:

  1. src/analytics/aggregation.js
  2. src/analytics/article-store.js
  3. src/analytics/engagement-store.js
  4. src/analytics/db.js
  5. src/analytics/schema.js

Once complete, Phase 2 integration can be executed (single import swap + rebase).


Workflow

  1. Monitor BIT-4619: Check progress on backend module implementation
  2. Verify Backend Ready: When all 5 modules are implemented on task/BIT-4619-gitea-actions-secrets
  3. Create This Issue: Use template above to create Phase 2 child issue in Paperclip
  4. Execute Integration:
    # On task/BIT-5284-analytics-dashboard branch:
    git fetch origin task/BIT-4619-gitea-actions-secrets
    git rebase origin/task/BIT-4619-gitea-actions-secrets
    
    # Update import in src/http/ui-handlers.js (single line)
    git add src/http/ui-handlers.js
    git commit -m "feat(analytics): Phase 2 integration — use real backend API"
    
    # Run integration tests
    npm test src/http/analytics-api.test.js
    
    # Push and create PR
    git push origin task/BIT-5284-analytics-dashboard
    
  5. Merge: Review and merge to main

Estimated Effort

  • Blockers Resolution (BIT-4619): TBD (external dependency)
  • Integration (Phase 2): ~1-2 hours (single import swap + rebase + testing)
  • PR Review & Merge: ~2-4 hours (code review cycle)

Success Criteria for Phase 2

✅ PR #8 (Phase 1) merged to main
✅ BIT-4619 backend modules complete and tested
✅ Dashboard successfully integrated with real backend
✅ All integration tests passing
✅ Phase 2 PR merged to main


Ready to create? Use the title and description above in Paperclip when BIT-4619 backend is ready.