Skip to content

fix(canvas): keep comments available with Pick & polish - #113

Merged
lukasoppermann merged 1 commit into
mainfrom
lukasoppermann-comments-and-pick-polish
Oct 24, 2026
Merged

lukasoppermann merged 1 commit into
mainfrom
lukasoppermann-comments-and-pick-polish

Conversation

@lukasoppermann

Copy link
Copy Markdown
Contributor

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

Pick & polish sidebar with both review toolbars visible

Prototype canvas/Publication example / Comments With Pick And Polish Sidebar — light, 1435 × 1238 CSS pixels

Comments sidebar with both review toolbars visible

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
@lukasoppermann
lukasoppermann requested review from a team and nshki as code owners October 24, 2026 05:58
Copilot AI max review requested due to automatic review settings October 24, 2026 05:58
@lukasoppermann
lukasoppermann merged commit 536e45c into main Oct 24, 2026
40 checks passed
@lukasoppermann
lukasoppermann deleted the lukasoppermann-comments-and-pick-polish branch October 24, 2026 06:02

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.

🔵 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,
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