Skip to content

fix(pi): show actionable status for ambiguous project errors#439

Merged
Alan-TheGentleman merged 1 commit into
mainfrom
fix/pi-status-bar-ambiguous-project
May 28, 2026
Merged

fix(pi): show actionable status for ambiguous project errors#439
Alan-TheGentleman merged 1 commit into
mainfrom
fix/pi-status-bar-ambiguous-project

Conversation

@Alan-TheGentleman
Copy link
Copy Markdown
Collaborator

Summary

  • Adds errorStatusLabel(message: string) helper in plugin/pi/index.ts that maps known error patterns to actionable status labels rather than the generic error string.
  • When the underlying failure is an ambiguous project (multiple git repos in cwd), the Pi status bar now shows 🧠 repos · ambiguous project instead of the misleading 🧠 repos · error.
  • Adds a new test in test/index-source.test.mjs asserting the mapping exists and the bare hardcoded · error string is gone from the catch block.
  • Documents the new status bar states and adds a troubleshooting row in plugin/pi/README.md.

Test plan

  • New test ambiguous_project error maps to actionable status label, not generic 'error' written first (red), then fixed (green)
  • All 17 plugin/pi tests pass: node --test test/*.test.mjs
  • go test ./... — all Go packages pass
  • go vet ./... && go build ./... — clean

Closes #384

Replace the generic '· error' status bar label with '· ambiguous project'
when the underlying failure is an ambiguous project detection (multiple git
repos in cwd). Adds `errorStatusLabel()` to map known error patterns to
actionable labels so users can distinguish backend errors from project
resolution problems.

Closes #384
Copilot AI review requested due to automatic review settings May 28, 2026 14:39
@Alan-TheGentleman Alan-TheGentleman added the type:bug Bug fix label May 28, 2026
@Alan-TheGentleman Alan-TheGentleman merged commit ab86d8e into main May 28, 2026
7 of 9 checks passed
@Alan-TheGentleman Alan-TheGentleman deleted the fix/pi-status-bar-ambiguous-project branch May 28, 2026 14:43
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

Improves the plugin/pi status bar UX by mapping ambiguous-project failures to an actionable label instead of the generic error, and documents the new status states.

Changes:

  • Add errorStatusLabel(message: string) helper and use it in executeMemoryTool error handling to set a more actionable status label.
  • Add a source-level test to ensure the mapping exists and the old hardcoded · error status format is removed from the catch block.
  • Document the new status bar states and add a troubleshooting row for ambiguous project cases.

Reviewed changes

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

File Description
plugin/pi/index.ts Adds errorStatusLabel and uses it to set a more actionable status bar label on failures.
plugin/pi/test/index-source.test.mjs Adds a regression test covering the new status-label mapping and removal of hardcoded · error.
plugin/pi/README.md Documents the new status bar label meanings and adds a troubleshooting entry.

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

Comment on lines +22 to +26
assert.match(source, /function errorStatusLabel\(/);
// Verify the function maps ambiguous project messages to the actionable label
assert.match(source, /ambiguous project/);
// Verify executeMemoryTool uses errorStatusLabel instead of the bare 'error' string
assert.match(source, /errorStatusLabel\(message\)/);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(plugin/pi): show actionable status for ambiguous project errors

2 participants