Skip to content

fix(canvas): move comment failures outside conversations - #114

Merged
lukasoppermann merged 2 commits into
mainfrom
lukasoppermann-pick-and-polish-notices
Oct 24, 2026
Merged

lukasoppermann merged 2 commits into
mainfrom
lukasoppermann-pick-and-polish-notices

Conversation

@lukasoppermann

Copy link
Copy Markdown
Contributor

Why

Local-storage and out-of-sync notices distract from feedback in Pick & polish and canvas Comments. Errors inside conversations also interrupt reading and writing comments.

What changes

Removes local-only, stale-panel and stale-note notices. Genuine failures use one dismissible canvas notification outside sidebars, conversations and composers, including while a modal is open. Failed saves retain drafts, and checks against unauthorized changes and overwriting newer work remain intact. Hub's browser review pages keep their existing inline errors.

Adds follow-up and deletion failure stories, updates the existing affected stories and guide, and ships rebuilt canvas assets with plugin patch version 1.5.2.

Full Hub CI could not start in the isolated container because its locked Ruby gems were unavailable.

Storybook screenshots

Screenshot attachments remain incomplete. The browser canvas displays captures but exposes no file-export action, and this session has no available Playwright MCP fallback tools. File-backed capture requires the configured fallback to be trusted and loaded in a fresh session. Missing screenshots:

Storybook title Stories
Components/Prototype canvas/Improvement threads Author Identity Unavailable; Follow Up Failure; Delete Failure
Prototype canvas/Hub panel Rate Limited; Local Draft Comments; Local Comments Before First Publish; Local Comment Upload Failed; Comments Failed; Live Updates Failed; Review Revision Failed

Hide local-storage and stale-note notices in Pick & polish and canvas Comments. Report genuine failures through one dismissible canvas notification while retaining drafts and revision protections. Bump the plugin patch version to 1.5.2.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: da64f7ce-7f92-429a-b4e5-fd69b7ed2cae
@lukasoppermann
lukasoppermann marked this pull request as ready for review October 24, 2026 06:51
@lukasoppermann
lukasoppermann requested review from a team and nshki as code owners October 24, 2026 06:51
Copilot AI max review requested due to automatic review settings October 24, 2026 06:51
Rebuild the Controls bridge and its Storybook fixture after the shared canvas copy change so the required asset reproducibility check passes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: da64f7ce-7f92-429a-b4e5-fd69b7ed2cae
@lukasoppermann
lukasoppermann merged commit 1cd6a5e into main Oct 24, 2026
39 checks passed
@lukasoppermann
lukasoppermann deleted the lukasoppermann-pick-and-polish-notices branch October 24, 2026 06:59

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.

🟡 Changes recommended

The new notification flow still has unresolved accessibility and failure-reporting regressions.

6 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

Moves Pick & polish and canvas Comments failures into a shared dismissible notification, while preserving inline errors on Hub’s browser review pages.

Changes:

  • Adds shared notification handling, message filtering, and modal registration.
  • Routes canvas review errors outside conversations and composers while retaining failed drafts.
  • Updates tests, stories, documentation, and rebuilt extension assets for plugin version 1.5.2.
File Description
hub/​docs/​prototype-canvas.md Documents external notifications and retained safety checks.
hub/​app/​javascript/​utils/​prototype-canvas/​en.ts Adds notification labels and removes local-storage copy.
hub/​app/​javascript/​utils/​canvas-review-error/​index.ts Filters notices and normalizes failure messages.
hub/​app/​javascript/​hooks/​use-review-error/​index.ts Reports errors through context with an inline fallback.
hub/​app/​javascript/​hooks/​use-review-error/​context.ts Defines error-reporting and dialog-registration contracts.
hub/​app/​javascript/​features/​review-thread-reply-form/​index.tsx Routes reply and length errors through shared reporting.
hub/​app/​javascript/​features/​review-thread-message/​index.tsx Routes edit, delete, and length errors through shared reporting.
hub/​app/​javascript/​features/​review-thread-conversation/​index.tsx Routes resolution and read-state failures through shared reporting.
hub/​app/​javascript/​features/​review-comments-sidebar/​index.tsx Moves loading errors outside the canvas sidebar.
hub/​app/​javascript/​features/​review-comment-reactions/​index.tsx Routes reaction failures through shared reporting.
hub/​app/​javascript/​features/​review-comment-composer/​index.tsx Reports save and length errors externally in the canvas.
hub/​app/​javascript/​features/​prototype-review-overlays/​index.tsx Reports selection and rate-limit notices through context.
hub/​app/​javascript/​features/​prototype-canvas-improvement-threads/​stories.tsx Adds follow-up and deletion failure stories.
hub/​app/​javascript/​features/​prototype-canvas-improvement-threads/​index.tsx Connects improvement-thread feedback to notifications.
hub/​app/​javascript/​features/​prototype-canvas-improvement-notes/​index.tsx Filters note errors and routes composer feedback externally.
hub/​app/​javascript/​features/​prototype-canvas-hub-panel/​styles.css Removes obsolete sidebar-notice styles.
hub/​app/​javascript/​features/​prototype-canvas-hub-panel/​stories.tsx Adds the notification provider to panel stories.
hub/​app/​javascript/​features/​prototype-canvas-hub-panel/​index.tsx Separates comment failures from other panel errors.
hub/​app/​javascript/​features/​prototype-canvas-hub-panel/​index.test.tsx Covers external notifications and retained reply drafts.
hub/​app/​javascript/​components/​prototype-canvas-dialog/​index.tsx Registers dialogs as modal notification hosts.
hub/​app/​javascript/​components/​mention-input/​index.tsx Routes mention errors through shared reporting.
hub/​app/​javascript/​components/​canvas-review-feedback/​styles.css Positions notifications in canvas and modal views.
hub/​app/​javascript/​components/​canvas-review-feedback/​index.tsx Implements notification storage, dismissal, and portals.
hub/​app/​javascript/​application/​prototype-canvas/​tests/​improvement-notes.test.tsx Covers note failures, notice filtering, and draft retention.
hub/​app/​javascript/​application/​prototype-canvas/​index.tsx Adds the feedback provider around canvas content.
.github/​extensions/​replica-prototype/​plugin.json Bumps the plugin patch version to 1.5.2.
.github/​extensions/​replica-prototype/​marketplace.test.mjs Updates the expected plugin version.
.github/​extensions/​replica-prototype/​assets/​renderer-prototype-canvas-improvement-threads.js Rebuilds improvement-thread presentation code.
.github/​extensions/​replica-prototype/​assets/​renderer-improvement-notes-prototype.js Rebuilds improvement-note notification integration.

Review effort: Max

}
/>
) : null}
</CanvasReviewFeedback>
Comment on lines +143 to +145
onInvalid={(event) => {
if (tooMany && !showLimitError) event.preventDefault()
props.onInvalid?.(event)
Comment on lines +153 to +154
const [commentError, setCommentError] = useState("")
useReviewError(commentError)
syncError ||
saved.state?.profileError ||
(!saved.state ? copy.storageLoading : !preview.ready ? copy.bridgeUnavailable : "")
(saved.state && !preview.ready ? copy.bridgeUnavailable : "")
const showError = useReviewError(error)
const showIdentityError = useReviewError(changedIdentity && copy.changedIdentity)
const showRemovedError = useReviewError((removed || deletionRemoved) && copy.removed)
const showTargetStatus = useReviewError(thread && !thread.point && copy.targetUnavailable)
Comment on lines +6 to +8
"These notes changed in another panel. Reload before making changes.",
"This note changed while it was open. Reopen it before making changes.",
"The open improvements changed while syncing. Review them and select Fix all again.",
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