Skip to content

Conversation

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds hierarchical tree support to the status command by extending JSON output, console rendering, and tests to carry and display nested branch children.

  • Introduces generic Tree<T>/TreeItem<T> and adds a Tree(Tree<string>) overload to ILogger/ConsoleLogger
  • Extends JSON output records and mapping functions to include Children collections
  • Refactors StackHelpers and commands to build and render nested branch trees; updates tests to use a TestLogger

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Stack/Stack.csproj Added MoreLinq reference for tree traversal utilities
src/Stack/Infrastructure/ConsoleLogger.cs Implemented Tree(Tree<string>) and recursion helper
src/Stack/Commands/Stack/StackStatusCommand.cs Updated JSON records, mapping logic, and schema‐version handling
src/Stack/Commands/PullRequests/CreatePullRequestsCommand.cs Updated output methods to accept schema version and tree items
src/Stack/Commands/Helpers/StackHelpers.cs Added methods to build, traverse, and output nested branch lists
src/Stack.Tests/Helpers/TestLogger.cs Stubbed Tree logger (needs deeper recursion)
src/Stack.Tests/... Switched tests to use TestLogger with ITestOutputHelper
Comments suppressed due to low confidence (2)

src/Stack.Tests/Helpers/TestLogger.cs:54

  • [nitpick] The TestLogger.Tree method only writes top‐level children and skips nested nodes. Implement recursive traversal so tests can verify deeper levels of the rendered tree.
// TODO: Handle child nodes if needed

src/Stack.Tests/Commands/Stack/StackSwitchCommandHandlerTests.cs:13

  • Class declarations cannot take constructor parameters directly. Move the ITestOutputHelper parameter into a proper constructor inside the class body to compile correctly.
public class StackSwitchCommandHandlerTests(ITestOutputHelper testOutputHelper)

@geofflamrock geofflamrock force-pushed the tree-structure-migrate branch from fc1dffc to 9dcde11 Compare June 10, 2025 22:07
@geofflamrock geofflamrock force-pushed the tree-structure-status branch 2 times, most recently from e402dd8 to e4848f7 Compare June 10, 2025 22:29
Base automatically changed from tree-structure-migrate to main June 10, 2025 22:32
@geofflamrock geofflamrock force-pushed the tree-structure-status branch from e4848f7 to 9ad4e8e Compare June 10, 2025 22:37
@geofflamrock geofflamrock added the minor Increment the minor version when merged label Jun 10, 2025
@geofflamrock geofflamrock marked this pull request as ready for review June 10, 2025 22:43
@geofflamrock geofflamrock merged commit 8cebacc into main Jun 11, 2025
18 checks passed
@geofflamrock geofflamrock deleted the tree-structure-status branch June 11, 2025 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Increment the minor version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support proper tree structure in status command

2 participants