Skip to content

List each changed component's touched files in the PR comment#27

Merged
brovatten merged 2 commits into
mainfrom
feat/pr-comment-component-files
Jun 12, 2026
Merged

List each changed component's touched files in the PR comment#27
brovatten merged 2 commits into
mainfrom
feat/pr-comment-component-files

Conversation

@brovatten

Copy link
Copy Markdown
Member

Implements Variant A from the format exploration in #26: one collapsed dropdown per changed top-level component, between the legend and the CTA, listing the files that made that node change color.

Rendered shape (per #26 feedback: no status emoji in summaries — status is in the wording):

<details>
<summary><b>AuthService</b> : 3 files changed</summary>

- src/auth/handler.py
- src/auth/middleware.py
- src/auth/session.py

</details>

How it works

  • New scripts/build_component_files.py imports build_diff from diff_to_mermaid.py, so dropdowns and diagram always agree on what changed.
  • Files = component subtree paths (file_methods[] plus key_entities[].reference_file — some engine outputs, e.g. TypeScript repos, carry file linkage only in key_entities) ∩ the PR's own git diff (--no-renames --name-only merge-base..head, matching the Files-changed tab). --no-renames matters: with rename detection on, a moved file's old path never appears and the donor component's dropdown silently vanishes.
  • No git listing available → analysis-derived fallback (files added/removed from the component + method-set changes).
  • Rollup parents (only nested components changed) label their changed sub-component count, so the dropdown count explains the headline's recursive count instead of contradicting it.
  • HTML-escaped names/paths; caps of 15 files/component and 10k chars total, so diagram (≤45k) + dropdowns + chrome stays under GitHub's 65,536-char comment limit. The section degrades before the diagram ever does, and any failure omits the section, never the comment.

Review: a 4-dimension multi-agent review (python correctness, actions/bash semantics, product edge cases, tests/conventions) with adversarial verification produced 19 confirmed findings — all addressed in this commit, including the rename-detection drop (high), three-dot vs two-dot diff semantics on stale branches, the missing trailing newline that glued the CTA's --- into the </details> HTML block, empty-file_methods analyses, duplicate component names, non-UTF-8 paths, and meta/budget accounting.

Tests: 26 new unit tests (83 total, all green), including subprocess-level CLI tests and a contract test pinning that the committed .codeboarding/analysis.json paths are git ls-files-format so engine path-format drift fails CI. black==25.9.0 --check clean.

🤖 Generated with Claude Code

One collapsed <details> block per changed top-level component, between
the legend and the CTA, answering the question the colored diagram
raises but can't: which files made this node change color.

Files are the intersection of the component subtree's paths
(file_methods[] plus key_entities[].reference_file — some engine
outputs carry file linkage only in key_entities) with the PR's own
git diff (--no-renames --name-only merge-base..head, the Files-changed
set; --no-renames so a moved file's old path still appears for the
donor component). Without a git listing it falls back to
analysis-derived changes. Rollup parents label their changed
sub-component count so dropdown and headline counts agree.

HTML-escaped output, per-component (15 files) and total (10k chars)
caps so the block plus the ~45k mermaid diagram stays under GitHub's
65,536-char comment limit. Best-effort: any failure omits the section,
never the comment.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codeboarding-review

codeboarding-review Bot commented Jun 12, 2026

Copy link
Copy Markdown

Architecture review · 1 component changed

graph LR
    n_Analysis_Orchestrator["Analysis Orchestrator"]
    n_Visual_Diff_Engine["Visual Diff Engine"]
    n_Engagement_Integration_Layer["Engagement #amp; Integration Layer"]
    n_Analysis_Orchestrator -- "triggers state comparison and visualization" --> n_Visual_Diff_Engine
    n_Analysis_Orchestrator -- "provides execution context for CTA generation" --> n_Engagement_Integration_Layer
    n_Visual_Diff_Engine -- "provides structured diff data for reporting" --> n_Engagement_Integration_Layer
    classDef added fill:#1f883d,stroke:#0b5d23,color:#ffffff;
    classDef modified fill:#bf8700,stroke:#7d4e00,color:#ffffff;
    classDef deleted fill:#cf222e,stroke:#82071e,color:#ffffff,stroke-dasharray:5 3;
    class n_Visual_Diff_Engine modified;
    linkStyle 0,1,2 stroke:#7d4e00,stroke-width:2px;
Loading

Colors indicate component changes compared to main: 🟩 Added · 🟨 Modified · 🟥 Removed

Visual Diff Engine : 1 file changed
  • scripts/build_component_files.py

🌐 Explore this PR’s architecture in your browser →

See this architecture in your editor: Open in VS Code →

codeboarding-action · run 27415285780

@brovatten brovatten merged commit fe18a38 into main Jun 12, 2026
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