fix(PBI-79): cascade-restore alleen als hint-story bij nieuwe PBI hoort
Bug: setActivePbi reset activeStoryId/activeTaskId, maar het cascade- restore-pad zette daarna een hint-story actief zonder te valideren of die story bij de nieuw-geselecteerde PBI hoort. Bij PBI-switch bleef daardoor de task-kolom de taken van de vorige story tonen. Fix: alleen setActiveStory(hint) als entities.storiesById[hint].pbi_id === pbiId. Bij mismatch blijft activeStoryId null en is de task-kolom leeg totdat de gebruiker een story uit de nieuwe PBI kiest. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8d6fbdfc3d
commit
35c6404b14
1 changed files with 8 additions and 3 deletions
|
|
@ -334,10 +334,15 @@ export const useProductWorkspaceStore = create<ProductWorkspaceStore>()(
|
|||
await get().ensurePbiLoaded(pbiId, requestId)
|
||||
if (get().loading.activeRequestId !== requestId) return
|
||||
if (!productId) return
|
||||
// T-857: cascade-restore
|
||||
// T-857: cascade-restore. Alleen herstellen als de hint-story
|
||||
// bij de nieuw-geselecteerde PBI hoort — anders blijft een task-
|
||||
// selectie van een vorige PBI hangen (PBI-79 bugfix).
|
||||
const hint = readHints().perProduct[productId]?.lastActiveStoryId
|
||||
if (hint && get().entities.storiesById[hint]) {
|
||||
get().setActiveStory(hint)
|
||||
if (hint) {
|
||||
const hintStory = get().entities.storiesById[hint]
|
||||
if (hintStory && hintStory.pbi_id === pbiId) {
|
||||
get().setActiveStory(hint)
|
||||
}
|
||||
}
|
||||
})()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue