Comments: resolving a comment shows live in the presentation view, but un-resolving does show until the viewer reloads #111
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_whiteboard#111
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The presentation view does not handle comment-state changes instantly:
Steps to reproduce
Expected
Tab B re-renders the comment marker as active immediately on un-resolve, just like it re-rendered on resolve.
Actual
Tab B keeps showing the marker as resolved (greyed out). The active state only appears after a manual reload of tab B.

Implementation Spec for Issue #111
Objective
Comment un-resolve must apply live to the presentation/viewer tab the same way comment resolve does. Right now, un-resolving a comment in the editor leaves the marker stuck in the resolved (grey) state in any other tab until that tab is reloaded.
Root cause
crates/hero_whiteboard_ui/static/web/js/whiteboard/comments.js::setResolvedbroadcastscomment.resolvedorcomment.unresolvedover the WebSocket.comments.js::handleSyncMessagealready handles both types correctly. But the central WebSocket router insync.js::handleWsMessageonly forwards four comment types to the comments handler:comment.unresolvedis missing from that list, so the message is silently dropped. That's why resolve syncs live but un-resolve doesn't.Requirements
Files to Modify
crates/hero_whiteboard_ui/static/web/js/whiteboard/sync.js— extend the comment-message router to includecomment.unresolved.Implementation Plan
Step 1: Route
comment.unresolvedto the comments handlerFile:
crates/hero_whiteboard_ui/static/web/js/whiteboard/sync.jsChange the dispatch arm in
handleWsMessage:No changes needed in
comments.js—handleSyncMessagealready branches oncomment.resolved || comment.unresolvedand updates the marker state and appearance.Dependencies: none.
Acceptance Criteria
cargo fmt,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace --libclean.Notes
localUserIdecho-skip inhandleWsMessagecontinues to ensure the originating editor tab doesn't double-apply its own change.Test Results
cargo fmt --all -- --check— cleancargo clippy --workspace --all-targets -- -D warnings— cleancargo test --workspace --lib— 0 failednode --check sync.js— cleanImplementation Summary
One-line surgical fix: route
comment.unresolvedfrom the WebSocket through to the comments handler.Root cause
comments.js::setResolvedbroadcasts eithercomment.resolvedorcomment.unresolvedover the WebSocket, andcomments.js::handleSyncMessagealready branches on both correctly. But the central router insync.js::handleWsMessageonly forwarded four comment types (created / updated / resolved / deleted) to the comments handler —comment.unresolvedwas silently dropped, so other tabs never re-rendered the marker as active.crates/hero_whiteboard_ui/static/web/js/whiteboard/sync.jsAdded
comment.unresolvedto the dispatch arm:No changes needed elsewhere. The receiving handler in
comments.js:593-599was already prepared:Files Changed
crates/hero_whiteboard_ui/static/web/js/whiteboard/sync.js—+1/-1Test Results
cargo fmt --all -- --check— cleancargo clippy --workspace --all-targets -- -D warnings— cleancargo test --workspace --lib— 0 failednode --check sync.js— cleanManual smoke
Notes
localUserIdecho-skip earlier inhandleWsMessagecontinues to ensure the originating editor tab doesn't double-apply its own change.