Fix Canvas toolbar code host actions - #509
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes Code Host–related actions when the Canvas view is active by ensuring “Open on Code Host / Open Pull Request” and Command Palette PR actions use the focused Canvas card’s worktree as their context. It also brings the Normal-view toolbar status center (PR/check summary/toasts/time hint) into Canvas and documents the focused-card context behavior.
Changes:
- Add the Normal toolbar center status content to Canvas, driven by the focused worktree (toast + PR status + code host).
- Route “Open on Code Host / Open Pull Request” and Command Palette PR entries through the Canvas focused worktree when Canvas is active.
- Add/extend tests and documentation for Canvas-focused action context.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| supacodeTests/WorktreeCommandsTests.swift | Adds unit coverage for resolving Code Host action worktree ID in Canvas mode and gating on Code Host capability. |
| supacodeTests/CommandPaletteFeatureTests.swift | Adds test ensuring Command Palette surfaces Code Host/PR actions for a Canvas-focused action target. |
| supacode/Features/Repositories/Views/WorktreeDetailView.swift | Introduces a Canvas toolbar state model and adds a .principal status item in Canvas matching Normal view behavior. |
| supacode/Features/CommandPalette/Reducer/CommandPaletteFeature.swift | Extends Code Host item generation to accept an action-target worktree ID (Canvas-focused context). |
| supacode/Commands/WorktreeCommands.swift | Injects WorktreeTerminalManager and resolves “Open on Code Host” target via Canvas focus when Canvas is active; adds helper function. |
| supacode/App/supacodeApp.swift | Wires terminalManager into WorktreeCommands initialization. |
| docs/components/github-pull-requests.md | Documents that PR-related actions can use Canvas focused-card context. |
| docs/components/command-palette.md | Notes that worktree-scoped actions in Canvas use the focused card as context. |
| docs/components/canvas.md | Documents Canvas toolbar behavior and focused-card routing for Code Host actions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Verification
xcodebuild test -project supacode.xcodeproj -scheme supacode -destination "platform=macOS" -only-testing:supacodeTests/CommandPaletteFeatureTests -only-testing:supacodeTests/AppFeatureCommandPaletteTests -only-testing:supacodeTests/WorktreeCommandsTests CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" -skipMacroValidation 2>&1 | xcsift -f toonmake check 2>&1 | xcsift -f toonmake build-app 2>&1 | xcsift -f toonPROWL_CLI_SOCKET=/tmp/prowl-self-verify.sock, opened this repo through the repo-built CLI, and confirmed the debug instance responded to Canvas view-mode shortcut routing in its log. Window screenshot capture was unavailable for that debug window in this environment.