Render N-level headings in markdown/JSON output for the hierarchy tree - #187
Render N-level headings in markdown/JSON output for the hierarchy tree#187shouze wants to merge 2 commits into
Conversation
|
Coverage after merging feat/team-hierarchy-output into feat/team-hierarchy-consolidate will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
Adds hierarchy-aware metadata and nested team headings to Markdown/JSON output.
Changes:
- Adds
sectionPathand hierarchy flattening. - Renders nested Markdown headings and JSON paths.
- Extends replay options and adds tests.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Summary | Review notes |
|---|---|---|
src/types.ts |
Defines hierarchy path metadata. | No blocking comment supplied. |
src/output.ts |
Outputs nested headings and section paths. | Requires changes: replay flags are not fully registered, and section markers can be lost for filtered repositories. |
src/output.test.ts |
Tests Markdown, JSON, and replay output. | No blocking comment supplied. |
src/group.ts |
Flattens hierarchy sections with heading transitions. | Requires changes: hierarchy grouping is not connected to the production CLI flow. |
src/group.test.ts |
Tests hierarchy flattening. | No blocking comment supplied. |
Suppressed comments (2)
src/group.ts:376
- When a hierarchy node has both direct
groupsandchildren, this early return traverses only the children and drops every repo innode.groups.nestOverlappingLabelscan produce exactly that shape for an auto-nested parent (the parent keeps its own groups), so those repositories disappear from the flattened output. Emit the node's direct groups before descending into its children.
if (node.children && node.children.length > 0) {
for (const child of node.children) visit(child, path);
return;
src/output.ts:65
consolidateTeamSectionsis destructured here, but thebuildOutputdispatcher used by the CLI and TUI does not accept this property in itsextraOptions, so the real output path can never pass the setting through tobuildReplayCommand. Thread this option through the dispatcher and its callers; otherwise the replay command silently omits consolidation.
consolidateTeamSections,
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ddb5418 to
b4eb5da
Compare
|
Coverage after merging feat/team-hierarchy-output into feat/team-hierarchy-consolidate will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 similar comment
|
Coverage after merging feat/team-hierarchy-output into feat/team-hierarchy-consolidate will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Addresses Copilot review on PR #187: - flattenTeamHierarchy no longer drops a node's own groups when it also has overlap-nested children (emits the node's repos under its own heading before descending into children). - buildMarkdownOutput now tracks pending sectionLabel/sectionPath transitions across ALL groups (not just visible ones), so a heading is never lost when the repo that first carried it gets filtered out (deselected or with no selected matches) — matches how the JSON cursor already behaved. - buildOutput's extraOptions now forwards consolidateTeamSections so it reaches buildReplayCommand instead of being silently dropped. CLI registration of --group-by-team-prefix-consolidate and wiring groupByTeamHierarchy/flattenTeamHierarchy into the production search path are intentionally out of scope here — tracked by issue #182.
|
Coverage after merging feat/team-hierarchy-output into feat/team-hierarchy-consolidate will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Addresses Copilot review on PR #187: - flattenTeamHierarchy no longer drops a node's own groups when it also has overlap-nested children (emits the node's repos under its own heading before descending into children). - buildMarkdownOutput now tracks pending sectionLabel/sectionPath transitions across ALL groups (not just visible ones), so a heading is never lost when the repo that first carried it gets filtered out (deselected or with no selected matches) — matches how the JSON cursor already behaved. - buildOutput's extraOptions now forwards consolidateTeamSections so it reaches buildReplayCommand instead of being silently dropped. CLI registration of --group-by-team-prefix-consolidate and wiring groupByTeamHierarchy/flattenTeamHierarchy into the production search path are intentionally out of scope here — tracked by issue #182.
72e052a to
fe82d6c
Compare
|
Coverage after merging feat/team-hierarchy-output into feat/team-hierarchy-consolidate will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 similar comment
|
Coverage after merging feat/team-hierarchy-output into feat/team-hierarchy-consolidate will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Addresses Copilot review on PR #187: - flattenTeamHierarchy no longer drops a node's own groups when it also has overlap-nested children (emits the node's repos under its own heading before descending into children). - buildMarkdownOutput now tracks pending sectionLabel/sectionPath transitions across ALL groups (not just visible ones), so a heading is never lost when the repo that first carried it gets filtered out (deselected or with no selected matches) — matches how the JSON cursor already behaved. - buildOutput's extraOptions now forwards consolidateTeamSections so it reaches buildReplayCommand instead of being silently dropped. CLI registration of --group-by-team-prefix-consolidate and wiring groupByTeamHierarchy/flattenTeamHierarchy into the production search path are intentionally out of scope here — tracked by issue #182.
fe82d6c to
b19bdae
Compare
|
Coverage after merging feat/team-hierarchy-output into feat/team-hierarchy-consolidate will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 similar comment
|
Coverage after merging feat/team-hierarchy-output into feat/team-hierarchy-consolidate will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
What does this PR do?
How did you verify your code works?