Skip to content

Show imports/moves in summary table; hide zero-count rows#649

Open
Copilot wants to merge 3 commits intomainfrom
copilot/update-summary-table-imports-moves
Open

Show imports/moves in summary table; hide zero-count rows#649
Copilot wants to merge 3 commits intomainfrom
copilot/update-summary-table-imports-moves

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

Summary

The Summary table now includes 📥 Import and 🔀 Move rows alongside the existing action rows, hides any row whose count is 0, and falls back to a "No changes" message when every row would be empty.

Changes

  • SummaryModel: added Imports and Moves ActionSummary properties.
  • SummaryEnrichmentStage: counts changes whose ImportId / MovedFromAddress is set (orthogonal to action buckets — a single change can appear in both an action row and an import/move row).
  • SummaryRenderer: builds the row list, filters Count == 0, emits Import/Move rows, and renders the existing "No changes" paragraph when no row remains.
  • Stub SummaryModel constructions in 4 test files updated for the new required properties.
  • Replaced Render_SummaryTable_ShowsEmptyCellWhenNoActionResources with Render_SummaryTable_OmitsRowsWithZeroCount to lock in the new behavior.
  • Regenerated snapshots (SNAPSHOT_UPDATE_OK); refactoring-comprehensive.md and comprehensive-demo.md now expose the new rows.
  • docs/features.md: replaced the "No-Changes Summary" section with a "Concise Summary Table" section covering both behaviors.
  • Added release notes at docs/issues/121-summary-table-imports-moves/release-notes.md.

Example (plan with adds, imports, and moves)

## Summary

| Action | Count | Resource Types |
| -------- | ------- | ---------------- |
| ➕ Add | 2 | 1 azurerm_resource_group<br/>1 azurerm_virtual_network |
| 📥 Import | 2 | 1 azurerm_resource_group<br/>1 azurerm_storage_account |
| 🔀 Move | 1 | 1 azurerm_virtual_network |
| **Total** | **2** | |

Total semantics are unchanged (add + change + destroy + replace), so ProgramEntry's tfplan2md_haschanges pipeline variable is unaffected.


Checklist

  • All checks pass (build, test, lint)
  • Commits follow Conventional Commits
  • PR description uses the standard template (Problem / Change / Verification)

Merge method: Use Rebase and merge to maintain a linear history. The repository enforces rebase-only merges by default.

Create & merge guidance: Use scripts/pr-github.sh create to create PRs, and scripts/pr-github.sh create-and-merge to perform the merge (this script is the authoritative, repo-preferred tool for PR creation and merges). If you need to inspect/check the PR, use GitHub chat tools (github/*) as needed.

Copilot AI and others added 2 commits April 23, 2026 10:06
SNAPSHOT_UPDATE_OK: Summary table now includes Import/Move rows when
those operations occur and omits any rows whose count is 0. When all
rows are zero, the table is replaced with "No changes". Snapshots
regenerated to reflect the new layout.

Agent-Logs-Url: https://github.com/oocx/tfplan2md/sessions/1c705acd-8ce3-4e94-9262-f8d50ef0987a

Co-authored-by: oocx <584396+oocx@users.noreply.github.com>
@oocx
Copy link
Copy Markdown
Owner

oocx commented Apr 23, 2026

@copilot release notes are missing

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 23, 2026

@copilot release notes are missing

Added release notes at docs/issues/121-summary-table-imports-moves/release-notes.md in 435b1f8.

Copilot finished work on behalf of oocx April 23, 2026 18:52
Copilot AI requested a review from oocx April 23, 2026 18:52
@oocx oocx marked this pull request as ready for review April 23, 2026 18:58
@github-actions
Copy link
Copy Markdown
Contributor

Test Results

1 254 tests   1 254 ✅  1m 46s ⏱️
    1 suites      0 💤
    1 files        0 ❌

Results for commit 435b1f8.

@github-actions
Copy link
Copy Markdown
Contributor

Code Coverage Summary

Metric Coverage Threshold Status
Line 89.02% 84.48% ✅ Pass
Branch 79.24% 72.80% ✅ Pass

Coverage report artifact

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.

2 participants