Skip to content

fix(html-report): phase timeline ordering and rework dot coloring#270

Merged
decko merged 4 commits into
mainfrom
soda/249
May 15, 2026
Merged

fix(html-report): phase timeline ordering and rework dot coloring#270
decko merged 4 commits into
mainfrom
soda/249

Conversation

@decko
Copy link
Copy Markdown
Owner

@decko decko commented May 15, 2026

Summary

Fixes two issues in the HTML report's phase timeline visualization:

  1. Phase ordering — Phases in the timeline were not sorted by their canonical pipeline position. A new PHASE_ORDER constant and sort_phases() helper ensure phases always appear in the order: triage → plan → implement → verify → review → submit → monitor. A pipeline_phases override from SessionMeta is respected when available. Unknown phases sort to the end.

  2. Rework dot coloring — Phases that were repeated (generation > 1 and status completed) previously showed the same green dot as first-run completions. They now render with an amber (#ffc107) dot using the new .phase-status-rework CSS class, making rework visually distinct at a glance.

Acceptance Criteria

  • PHASE_ORDER constant defined in html_report.py with canonical pipeline order
  • sort_phases(phases, pipeline_phases=None) helper sorts by position, then generation
  • Unknown phase names sort to end of timeline
  • pipeline_phases arg from SessionMeta overrides default order when provided
  • Jinja2 template uses sort_phases() when iterating phase dots
  • Completed gen-1 phases → green dot (phase-status-completed)
  • Completed gen>1 phases → amber dot (phase-status-rework, #ffc107)
  • Failed phases → red dot (phase-status-failed)
  • Skipped phases → muted dot (phase-status-skipped)
  • 9 new tests: 5 TestSortPhases + 4 TestPhaseTimelineDotColoring
  • All 153 test_report_html.py tests pass; zero existing tests modified

Review Results

python-specialist (IMPORTANT — fixed)

Assertions in TestPhaseTimelineDotColoring were vacuous: assert "phase-status-rework" in content matched the CSS <style> block (which defines .phase-status-rework) even when no phase dot was rendered. Fixed by asserting on the full class attribute string class="phase-status phase-status-rework", which only appears in rendered <span> elements, not in CSS selectors. Added negative assertions to guard against future false-positives.

rag-specialist (MINOR — addressed)

No test for skipped phase dot coloring. Added test_skipped_phase_has_skipped_dot to TestPhaseTimelineDotColoring.


Refs #249

Assisted-by: Claude Opus 4.6 (1M context) noreply@anthropic.com
Assigned-by: decko

decko added 4 commits May 15, 2026 17:22
… test

Per review findings:
- IMPORTANT: assertions like 'phase-status-rework' in content matched the CSS
  <style> block, not the rendered <span> elements.  Changed to assert on the
  full class attribute string 'class="phase-status phase-status-rework"'
  which only appears in the dot <span>, not in the CSS selector definitions.
  Added negative assertion for rework/gen-1 tests to further guard against
  false-positives.
- MINOR: added test_skipped_phase_has_skipped_dot to cover the pass-through
  path for skipped phases.
@decko decko added the ai-assisted Implemented with AI assistance label May 15, 2026
@decko decko merged commit d19bb35 into main May 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Implemented with AI assistance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant