Skip to content

🔧 fix P2-3049 + P2-3053: empty Center cell + dynamic ToC reporting-phase year (staging bundle)#708

Merged
yecksin merged 6 commits into
stagingfrom
P2-3049-Result-Center-displays-center-as-undefined
Jun 23, 2026
Merged

🔧 fix P2-3049 + P2-3053: empty Center cell + dynamic ToC reporting-phase year (staging bundle)#708
yecksin merged 6 commits into
stagingfrom
P2-3049-Result-Center-displays-center-as-undefined

Conversation

@yecksin

@yecksin yecksin commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Bundle of two independent fixes, grouped for a single staging validation pass.


P2-3049 — Results list: empty Center cell instead of "Undefined"

Summary

  • The Center column rendered the literal text "Undefined" when a result had no lead center (led by an external partner).
  • Replaced the hardcoded fallback || 'Undefined' with || '' so the cell is left blank.
  • Added a TODO (P2-3049) comment noting that a future change should fall back to the lead partner when there is no lead center.

Why this approach is correct

  • "Undefined" was never a real value — just a hardcoded fallback. A blank cell is the least-surprising behavior for a result with no lead center.
  • Scoped to the exact ternary branch, so results that do have a center are unaffected. No backend/API change needed. IPSR list has no lead_center column (no duplicated path).

Code walkthrough

-  [innerHTML]="column.attr === 'lead_center' ? (subResult.lead_center || 'Undefined') : (...)"
+  [innerHTML]="column.attr === 'lead_center' ? (subResult.lead_center || '') : (...)"

P2-3053 — ToC report views: show active reporting-phase year dynamically

Summary

  • The ToC / Area-of-Work report views showed a hardcoded 2025 phase while 2026 is the active reporting phase.
  • The active reporting-phase year is now resolved dynamically (via entity-aow.service) and surfaced across entity-details, entity-aow, and aow-hlo-table.
  • Applies the confirmed ToC nomenclature in the affected templates.

Why this approach is correct

  • Removes a hardcoded year that drifts every phase; the value now follows the active phase from the service, so the UI stays correct without per-year code edits.
  • Spec covered under openspec/changes/p2-3053-dynamic-reporting-phase-year/.

Verification

  • P2-3049: validated locally and on prtest — center name still shows for results with a center; blank cell (no "Undefined") for partner-led results.
  • P2-3053: validated on dev — ToC report views display the active reporting-phase year (2026) dynamically.

🤖 Generated with Claude Code

yecksin and others added 5 commits June 22, 2026 09:44
…ly in ToC report views

The Reporting-by-ToC views hardcoded the literal "2025" so they kept showing
"Reporting Phase 2025" / "Expected target 2025" after the 2026 phase opened.
Bind these to the active reporting phase year instead.

- Add EntityAowService.reportingPhaseYear getter (active phase year, '' until
  loaded so the UI never renders "null").
- entity-aow-aow + entity-aow-2030: phase header now "Reporting Phase {year}".
- aow-hlo-table: "Expected target {year}" column built via computed from the
  active phase year (shared by High-Level Outputs, Intermediate Outcomes and
  2030 Outcomes — one change covers all three).
- aow-hlo-create-modal: the 3 hardcoded "2025" mentions in the target
  description now use the dynamic year.
- Update aow-hlo-table.component.spec.ts accordingly.

Scope: report-result views only. Previously-reported/historical data is left
untouched (indicator-details "achieved by end of 2024" / achieved_in_2024 field
and the 2022-2024 baseline). Frontend-only. Remaining nomenclature items from
the ticket are tracked in a Jira comment tagged to Santiago Sanchez + Angel.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CyLZHACEnyTLf3xAEsZUbS
…efined"

When a result has no lead center (it is led by an external partner), the
Center column rendered the literal text "Undefined". Replace the hardcoded
fallback `|| 'Undefined'` with an empty string so the cell stays blank.

Added a TODO (P2-3049) note documenting that a future change should fall
back to displaying the lead partner when no lead center exists.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…l validation

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…menclature

Per Santiago Sánchez's clarification (2026-06-22) for the Reporting-by-ToC interface:

- Entry-point cards (entity-details): "Reporting by Theory of Change" → "Results
  planned in your {year} ToC" with a question-circle tooltip ("Report results as
  planned theory of change"); "Reporting by Result Category" → "Report Emerging
  results" with a question-circle info note explaining results that emerged
  outside the {year} Theory of Change. Year is the dynamic active phase.
- HLO / Outcomes / 2030 Outcomes table headers (aow-hlo-table): Indicator name →
  "KPI statement", Type → "Indicator typology", "Expected target {year}" →
  "{year} target" (dynamic), Actual achieved → "Achieved target".
- Add TooltipModule to entity-details; update aow-hlo-table spec assertions.

Frontend-only, report-views only. Historical/previously-reported data untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CyLZHACEnyTLf3xAEsZUbS
…ctive' into P2-3049 (bundle for staging validation)
@yecksin yecksin changed the title 🔧 fix(results-list) P2-3049: render empty Center cell instead of "Undefined" 🔧 fix P2-3049 + P2-3053: empty Center cell + dynamic ToC reporting-phase year (staging bundle) Jun 23, 2026
…arCloud code smell

The "TODO" keyword triggered a SonarCloud maintainability code smell. The
future scope (fall back to lead partner) is already tracked in Jira, so the
in-code comment is reworded as a NOTE without changing its meaning.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@yecksin yecksin merged commit a089bff into staging Jun 23, 2026
6 checks passed
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant