Skip to content

[8/9] Remove --group-by-team-prefix-consolidate and consolidateTeamHierarchy #196

Description

@shouze

Context

Issue #178 (closed by PR #185) implemented --group-by-team-prefix-consolidate / consolidateTeamHierarchy: a mode that collapses unambiguous single-branch nesting chains into one heading with an (including …) suffix.

After using this in practice, it does not match the functional need: the actual pain point is the manual effort of resolving combined/ambiguous sections (e.g. "gamme-lead-client + gamme-lead-client-p1") one by one via --pick-team, not the visual density of unambiguous single-branch chains. This option is being replaced by an automatic pick-team resolution strategy, tracked in a new sibling issue (auto-pick via smallest-common-prefix). --group-by-team-prefix-consolidate and consolidateTeamHierarchy must be removed entirely rather than kept alongside the new option.

Part of EPIC #125.

Solution

Remove the feature end-to-end, keeping shared tree helpers that other code paths still use:

  • github-code-search.ts: remove the --group-by-team-prefix-consolidate CLI option definition, the groupByTeamPrefixConsolidate field on the parsed options type, the consolidateApplied computation (including its --format json stderr warning), the consolidateTeamHierarchy import/call, and the consolidateTeamSections field passed to buildReplayCommand / runInteractive.
  • src/group.ts: remove consolidateTeamHierarchy and its private helper consolidateNode. Keep assignLevels and pruneEmptyChildren — both are still used by nestOverlappingLabels / groupByTeamHierarchy.
  • src/group.test.ts: remove the describe("consolidateTeamHierarchy", …) block and its import.
  • src/output.ts: remove consolidateTeamSections from ReplayOptions, from buildReplayCommand's destructuring/flag emission, and from runInteractive's parameter list.
  • src/output.test.ts: remove the consolidateTeamSections / --group-by-team-prefix-consolidate replay-command test cases.
  • src/tui.ts: remove the consolidateTeamSections parameter and its forwarding to the renderer.
  • src/completions.ts + src/completions.test.ts: remove the group-by-team-prefix-consolidate completion entry and its bash/zsh/fish assertions.
  • Docs: remove the "Advanced: consolidated rendering" section from docs/usage/team-grouping.md (including the JSON-ignores-consolidation warning box and the "regardless of --group-by-team-prefix-consolidate" wording nearby) and the option row from docs/reference/cli-options.md.
  • CHANGELOG.md: drop "consolidated rendering" from the pending v2.0.0 entry's summary.

No replacement CLI surface is introduced by this issue — the removal is a prerequisite for the new auto-pick issue, not a rename.

Acceptance Criteria

  • --group-by-team-prefix-consolidate is no longer a recognized CLI option (absent from --help, shell completions, and docs).
  • consolidateTeamHierarchy and consolidateNode no longer exist anywhere in src/.
  • assignLevels and pruneEmptyChildren are untouched and still used by the hierarchy-building code path.
  • The replay command never emits --group-by-team-prefix-consolidate.
  • docs/usage/team-grouping.md and docs/reference/cli-options.md no longer mention the option.

Definition of Done

  • bun test, bun run lint, bun run format:check, bun run knip, bun run build.ts all green.
  • bun run knip reports no newly-unused exports left behind by the removal.
  • No functional regression to --group-by-team-prefix, automatic overlapping-name nesting, or --pick-team (all unrelated to this removal).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions