feat(PBI-71): UX-fix 'lege sprint' + sprint-switch data-refresh (#175)
- StartSprintButton dialog toont 3-state banner: info met accurate vrije-
stories count + PBI-context, of waarschuwing als geen PBI geselecteerd
is, of waarschuwing als de geselecteerde PBI 0 vrije stories heeft
- Voeg sprint_id toe aan BacklogStory/Story/SprintStory + select in PB-
pagina's en sprint-board mappings, zodat de banner accuraat kan tellen
- createSprintAction: revalidatePath met 'layout' flag voor consistency
met createSprintWithPbisAction (top-nav 'Sprint' link ververst direct)
Sprint-switch data-refresh op alle relevante pagina's:
- BacklogHydrationWrapper: fingerprint-based re-hydratie zodat PB-data
na router.refresh opnieuw uit nieuwe initialData komt (was: useEffect
met lege deps draaide alleen 1x)
- SprintBoardClient: key={sprint.id} forceert remount bij sprint-switch
zodat lokale sprintStories/sprintStoryIds-state vers ge-init wordt
- Solo (desktop + mobile): gebruik resolveActiveSprint(id) ipv eerste
OPEN-sprint, plus key={sprint.id} op SoloBoard voor remount
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
35e37dac09
commit
71319e629d
14 changed files with 72 additions and 14 deletions
|
|
@ -51,6 +51,7 @@ export default async function MobileProductBacklogPage({ params, searchParams }:
|
|||
priority: true,
|
||||
status: true,
|
||||
pbi_id: true,
|
||||
sprint_id: true,
|
||||
created_at: true,
|
||||
},
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import { notFound } from 'next/navigation'
|
|||
import { getAccessibleProduct } from '@/lib/product-access'
|
||||
import { prisma } from '@/lib/prisma'
|
||||
import { requireSession } from '@/lib/auth-guard'
|
||||
import { resolveActiveSprint } from '@/lib/active-sprint'
|
||||
import { SoloBoard } from '@/components/solo/solo-board'
|
||||
import { NoActiveSprint } from '@/components/solo/no-active-sprint'
|
||||
import type { SoloTask } from '@/components/solo/solo-board'
|
||||
|
|
@ -24,9 +25,10 @@ export default async function MobileSoloProductPage({ params }: Props) {
|
|||
const product = await getAccessibleProduct(id, session.userId)
|
||||
if (!product) notFound()
|
||||
|
||||
const sprint = await prisma.sprint.findFirst({
|
||||
where: { product_id: id, status: 'OPEN' },
|
||||
})
|
||||
const active = await resolveActiveSprint(id)
|
||||
const sprint = active
|
||||
? await prisma.sprint.findFirst({ where: { id: active.id, product_id: id } })
|
||||
: null
|
||||
|
||||
if (!sprint) {
|
||||
return (
|
||||
|
|
@ -112,6 +114,7 @@ export default async function MobileSoloProductPage({ params }: Props) {
|
|||
|
||||
return (
|
||||
<SoloBoard
|
||||
key={sprint.id}
|
||||
productId={id}
|
||||
sprintGoal={sprint.sprint_goal}
|
||||
tasks={tasks}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue