End-to-end smoke-test: PBI/Story/Task verschijnen zonder refresh (#57)
* fix(backlog-store): make INSERT handlers idempotent to prevent duplicate entries on duplicate SSE-events * docs(realtime-smoke): add manual smoke-checklist for PBI/Story/Task realtime end-to-end verification --------- Co-authored-by: Scrum4Me Agent <30029041+madhura68@users.noreply.github.com>
This commit is contained in:
parent
311f413e24
commit
6375ed6949
3 changed files with 245 additions and 3 deletions
|
|
@ -69,7 +69,8 @@ export const useBacklogStore = create<BacklogStore>((set) => ({
|
|||
),
|
||||
}
|
||||
}
|
||||
// I
|
||||
// I — idempotent: skip if already present (optimistic update may have arrived first)
|
||||
if (state.pbis.some((p) => p.id === id)) return {}
|
||||
return { pbis: [...state.pbis, data as unknown as BacklogPbi] }
|
||||
}
|
||||
|
||||
|
|
@ -95,8 +96,9 @@ export const useBacklogStore = create<BacklogStore>((set) => ({
|
|||
}
|
||||
return { storiesByPbi }
|
||||
}
|
||||
// I
|
||||
// I — idempotent: skip if already present
|
||||
const pbiId = data.pbi_id as string
|
||||
if ((state.storiesByPbi[pbiId] ?? []).some((s) => s.id === id)) return {}
|
||||
return {
|
||||
storiesByPbi: {
|
||||
...state.storiesByPbi,
|
||||
|
|
@ -127,8 +129,9 @@ export const useBacklogStore = create<BacklogStore>((set) => ({
|
|||
}
|
||||
return { tasksByStory }
|
||||
}
|
||||
// I
|
||||
// I — idempotent: skip if already present
|
||||
const storyId = data.story_id as string
|
||||
if ((state.tasksByStory[storyId] ?? []).some((t) => t.id === id)) return {}
|
||||
return {
|
||||
tasksByStory: {
|
||||
...state.tasksByStory,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue