Skip to content

feat: add descriptive messages to cloud action responses - #4592

Merged
amir20 merged 1 commit into
masterfrom
feat/cloud-action-messages
Apr 5, 2026
Merged

feat: add descriptive messages to cloud action responses#4592
amir20 merged 1 commit into
masterfrom
feat/cloud-action-messages

Conversation

@amir20

@amir20 amir20 commented Apr 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • UpdateContainer now returns (bool, error)true if updated, false if already up-to-date
  • Added message field to ActionResult proto with human-readable descriptions for LLM consumption (e.g. "Successfully restarted container abc123")
  • Cloud tool callers no longer need to construct English from raw action strings

Test plan

  • go build ./... passes
  • go test ./internal/cloud/ ./internal/agent/ ./internal/web/ ./internal/support/... all pass
  • Verify cloud action responses return proper messages end-to-end

🤖 Generated with Claude Code

UpdateContainer now returns (bool, error) indicating whether an update
occurred. ActionResult proto gains a message field with human-readable
descriptions for LLM consumption.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Apr 5, 2026

Copy link
Copy Markdown
  • Bug - untested path: tools_test.go mock always returns (false, nil), so only the "already up-to-date" message path is exercised. The "successfully updated" branch has no test coverage.

  • Magic string coupling: agent/client.go detects update success via progress.Status == "done" — tightly coupled to the string literal in docker_service.go. A shared constant would prevent silent breakage.

  • pastTense default fallback: string(action) + "ed" produces incorrect English for irregular verbs. Fine for now since all current actions are explicit, but fragile if new actions are added without updating the switch.

  • internal/web/actions.go still discards the bool return — intentional, but means the HTTP update endpoint can't surface "already up-to-date" to the frontend. Worth a TODO or comment if that's a known gap.

@amir20
amir20 merged commit dd5cd3c into master Apr 5, 2026
12 checks passed
@amir20
amir20 deleted the feat/cloud-action-messages branch April 5, 2026 23:17
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