Repository navigation
fix(canvas): keep comments available with Pick & polish - #113
Merged
Merged
Conversation
Restore both review toolbars and coordinate their active sidebars, pins, and target selection without changing stored review data. Protect pending captures and open drafts when switching workflows. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 37c4f329-df0b-44b5-9600-2c9c3f3a42de
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-workflow interaction defects remain, and installed-plugin loading and authenticated Hub posting are still unverified.
2 open issues
2 files not reviewed
.github/extensions/replica-prototype/assets/renderer-improvement-notes-prototype.js: Generated file.github/extensions/replica-prototype/assets/renderer-prototype-canvas-improvement-threads.js: Generated file
What changed in this PR
Keeps Comments available alongside Pick & polish in the shared prototype canvas, with separate sidebars and coordinated selection handling.
Changes:
- Adds active-workflow state and interaction locks to coordinate comments and improvement notes.
- Adds regression tests, two Storybook examples, and updated canvas guidance.
- Refreshes bundled renderer assets and bumps the plugin to 1.5.1.
| File | Description |
|---|---|
hub/docs/prototype-canvas.md |
Documents side-by-side review workflows. |
hub/app/javascript/features/prototype-canvas-improvement-threads/types.ts |
Adds an interaction-state callback. |
hub/app/javascript/features/prototype-canvas-improvement-threads/index.tsx |
Reports open conversations and deletion interactions. |
hub/app/javascript/features/prototype-canvas-improvement-notes/use-preview-selection/index.ts |
Limits anchor resolution and selections to the active workflow. |
hub/app/javascript/features/prototype-canvas-improvement-notes/index.tsx |
Coordinates improvement controls, sidebars, and interaction locks. |
hub/app/javascript/features/prototype-canvas-hub-panel/index.tsx |
Restores Comments controls and coordinates comment activity. |
hub/app/javascript/application/prototype-canvas/tests/commenting-and-polish.test.tsx |
Covers switching, selection isolation, and draft protection. |
hub/app/javascript/application/prototype-canvas/stories.tsx |
Adds combined-workflow sidebar examples. |
hub/app/javascript/application/prototype-canvas/index.tsx |
Connects active-workflow state and interaction locks. |
.github/extensions/replica-prototype/plugin.json |
Bumps the plugin version to 1.5.1. |
.github/extensions/replica-prototype/marketplace.test.mjs |
Updates the expected plugin version. |
.github/extensions/replica-prototype/assets/renderer-prototype-canvas-improvement-threads.js |
Bundles thread interaction reporting. |
.github/extensions/replica-prototype/assets/renderer-improvement-notes-prototype.js |
Bundles improvement-workflow coordination. |
Review effort: Max
Comment on lines
+308
to
+311
| active={reviewSurface === "comments"} | ||
| onActivate={() => setReviewSurface("comments")} | ||
| selectionDisabled={improvementInteraction} | ||
| onInteractionChange={setCommentInteraction} |
Comment on lines
+339
to
+347
| selected !== null, | ||
| ) | ||
| }, [ | ||
| selectedAnchor, | ||
| draftActive, | ||
| mutation, | ||
| preparingSelection, | ||
| selectionMode, | ||
| selected, |
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.

Why
Enabling Pick & polish hides the ordinary commenting controls. Prototype users need access to both workflows without losing their existing comments or improvement notes.
What changes
Keep the existing Comments and Pick & polish controls together in the toolbar. Each opens its own sidebar and pins. Only the active workflow resolves preview anchors and accepts selections, so an element or region cannot open both composers. Pending source capture, target selection, composers, and open conversations prevent switching to the other workflow until that interaction finishes or is cancelled.
Saved review data, comment permissions, local note storage, synchronization, and Fix all remain unchanged. Includes the rebuilt renderer assets and the approved patch bump to plugin 1.5.1. Two isolated application stories show the existing sidebars with both toolbar controls; the existing comments-only and improvement-conversation stories still cover distinct supported states.
The complete Hub CI command could not start because the isolated devcontainer lacks locked Ruby gems. Rendered examples use fixtures with the existing unavailable-bridge state; installed-plugin loading and authenticated Hub posting remain unverified. No installed plugin, benchmark prototype, or real review data was changed.
Storybook screenshots
Prototype canvas/Publication example / Comments And Pick And Polish — light, 1435 × 1238 CSS pixels
Prototype canvas/Publication example / Comments With Pick And Polish Sidebar — light, 1435 × 1238 CSS pixels