fix(sync): board-card rollback, inbox status sync, markRead error handling
- board-card: capture prev issue before optimistic update, restore on error - useRealtimeSync: wire issue:updated WS handler to update inbox issue_status - inbox: markRead uses optimistic update, refetch on error with toast Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a2e5cbd47b
commit
6761310038
3 changed files with 18 additions and 4 deletions
|
|
@ -47,12 +47,14 @@ export const BoardCardContent = memo(function BoardCardContent({
|
|||
|
||||
const handleUpdate = useCallback(
|
||||
(updates: Partial<UpdateIssueRequest>) => {
|
||||
const prev = { ...issue };
|
||||
useIssueStore.getState().updateIssue(issue.id, updates);
|
||||
api.updateIssue(issue.id, updates).catch(() => {
|
||||
useIssueStore.getState().updateIssue(issue.id, prev);
|
||||
toast.error("Failed to update issue");
|
||||
});
|
||||
},
|
||||
[issue.id]
|
||||
[issue],
|
||||
);
|
||||
|
||||
const showPriority = storeProperties.priority;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue