Skip to content

Refactor campfire list to use getDockTools helper#281

Merged
jeremy merged 3 commits intomainfrom
feat/missing-commands
Mar 12, 2026
Merged

Refactor campfire list to use getDockTools helper#281
jeremy merged 3 commits intomainfrom
feat/missing-commands

Conversation

@jeremy
Copy link
Copy Markdown
Member

@jeremy jeremy commented Mar 12, 2026

Summary

  • Extracts getDockTools and dockToolNotFoundError from getDockToolID in helpers.go, so chat list can use the lower-level helper directly instead of duplicating dock parsing inline
  • Rewrites runChatList project-scoped path to call getDockTools, replacing the inline dock parsing added in Fix campfire list on multi-campfire projects #275
  • Adds title-based summary for single chat ("Chat: Team Chat"), count-based for multiple ("2 chats in project")
  • Standardizes all breadcrumbs across chat subcommands (list, messages, post, upload, show, delete) to use --chat long flag syntax instead of positional chat <id> <action>

Builds on #275 which added core multi-chat support.

Test plan

  • bin/ci passes (unit tests, e2e, lint, surface snapshot, skill drift)
  • TestGetDockTools_* — new helper returns correct enabled/all partitions
  • TestGetDockToolID_AmbiguousMultipleReturnsError — regression guard for messages/post paths
  • TestChatListMultipleChatsBreadcrumbs--chat syntax in multi-chat breadcrumbs
  • TestChatListSingleChatSummary — title summary + concrete ID breadcrumbs
  • TestChatListAllBreadcrumbSyntax--all breadcrumbs use --chat not positional

@jeremy jeremy requested a review from a team as a code owner March 12, 2026 03:22
Copilot AI review requested due to automatic review settings March 12, 2026 03:22
@github-actions github-actions bot added commands CLI command implementations tests Tests (unit and e2e) breaking Breaking change labels Mar 12, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 12, 2026

⚠️ Potential breaking changes detected:

  • The -c flag has been replaced with --chat across several commands, meaning scripts or users relying on the old flag syntax will encounter errors.
  • Positional syntax for some commands, such as 'basecamp chat messages', has been removed in favor of the --chat flag, potentially breaking scripts using the old syntax.

Review carefully before merging. Consider a major version bump.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

Copy link
Copy Markdown

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

This PR refactors dock parsing for campfire listing by extracting a reusable getDockTools helper (plus a shared not-found error builder) and rewiring campfire list to use it, while also improving list output summaries and standardizing breadcrumbs to --campfire syntax.

Changes:

  • Extract getDockTools and dockToolNotFoundError from getDockToolID to enable reuse and reduce inline dock parsing.
  • Update campfire list (project-scoped) to use getDockTools, and adjust summaries for single vs multi-campfire projects.
  • Standardize list-related breadcrumbs to use --campfire long-flag syntax (including list --all).

Reviewed changes

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

File Description
internal/commands/helpers.go Introduces getDockTools + dockToolNotFoundError and refactors getDockToolID to use them.
internal/commands/helpers_test.go Adds unit tests for getDockTools behavior and a regression test for ambiguous dock tool selection.
internal/commands/campfire.go Refactors project-scoped campfire list to use getDockTools, improves summaries, and updates breadcrumbs to --campfire.
internal/commands/campfire_test.go Adds tests covering new breadcrumb syntax and summary behavior for single/multiple campfires and --all.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jeremy jeremy force-pushed the feat/missing-commands branch from 1b778b2 to 46de6d7 Compare March 12, 2026 15:50
Copilot AI review requested due to automatic review settings March 12, 2026 21:00
@jeremy jeremy force-pushed the feat/missing-commands branch from 46de6d7 to 9fafc5d Compare March 12, 2026 21:00
@github-actions github-actions bot added the enhancement New feature or request label Mar 12, 2026
Copy link
Copy Markdown

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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

jeremy added 3 commits March 12, 2026 15:03
Splits dock resolution into composable helpers so callers that need
the full tool list (like campfire list) can use getDockTools directly
without going through getDockToolID's single-ID contract.
Replaces inline dock parsing with the shared getDockTools helper.
Adds title-based summary for single campfire, count-based for
multiple. Fixes breadcrumbs to use --campfire flag syntax throughout
(list, list --all, and campfireListBreadcrumbs helper).
Update messages, post, upload, show, and delete breadcrumbs
to use `--chat <id>` instead of positional `chat <id> <action>`.
Copilot AI review requested due to automatic review settings March 12, 2026 22:05
@jeremy jeremy force-pushed the feat/missing-commands branch from e65dad9 to 72eb59e Compare March 12, 2026 22:05
Copy link
Copy Markdown

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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jeremy jeremy merged commit 8287b54 into main Mar 12, 2026
29 checks passed
@jeremy jeremy deleted the feat/missing-commands branch March 12, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking change commands CLI command implementations enhancement New feature or request tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants