fix(pi): show actionable status for ambiguous project errors#439
Merged
Conversation
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
There was a problem hiding this comment.
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 inexecuteMemoryToolerror handling to set a more actionable status label. - Add a source-level test to ensure the mapping exists and the old hardcoded
· errorstatus 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\)/); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
errorStatusLabel(message: string)helper inplugin/pi/index.tsthat maps known error patterns to actionable status labels rather than the genericerrorstring.🧠 repos · ambiguous projectinstead of the misleading🧠 repos · error.test/index-source.test.mjsasserting the mapping exists and the bare hardcoded· errorstring is gone from the catch block.plugin/pi/README.md.Test plan
ambiguous_project error maps to actionable status label, not generic 'error'written first (red), then fixed (green)plugin/pitests pass:node --test test/*.test.mjsgo test ./...— all Go packages passgo vet ./... && go build ./...— cleanCloses #384