Repository navigation
fix(canvas): move comment failures outside conversations - #114
Merged
Merged
Conversation
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
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
There was a problem hiding this comment.
🟡 Changes recommended
The new notification flow still has unresolved accessibility and failure-reporting regressions.
6 open issues
Include AppDialogs within the notification provider · New Re-report external validation errors on each invalid submission · New Prevent duplicate error notifications for failed comment operations · New Report bridge failures only after incompatibility or timeout · New Treat unresolved note targets as non-alert fallback states · New Show actionable feedback when deletion revisions become stale · New
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.", |
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
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: