Skip to content

Fix Canvas toolbar code host actions - #509

Merged
onevcat merged 1 commit into
mainfrom
fix/canvas-github-toolbar-status
Jun 25, 2026
Merged

Fix Canvas toolbar code host actions#509
onevcat merged 1 commit into
mainfrom
fix/canvas-github-toolbar-status

Conversation

@onevcat

@onevcat onevcat commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add the Normal toolbar status item to Canvas so the focused card shows PR/check status, toasts, or the time hint in the toolbar center.
  • Route Open on Code Host / Open Pull Request and command palette PR entries through the Canvas focused card when Canvas is active.
  • Document Canvas toolbar behavior and focused-card context for PR and command palette actions.

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 toon
  • make check 2>&1 | xcsift -f toon
  • make build-app 2>&1 | xcsift -f toon
  • Self-verify: launched a separate debug app with PROWL_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.

Copilot AI left a comment

Copy link
Copy Markdown

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 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.

@onevcat
onevcat merged commit a7a14aa into main Jun 25, 2026
2 checks passed
@onevcat
onevcat deleted the fix/canvas-github-toolbar-status branch June 25, 2026 13:39
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.

2 participants