Load/render workspace alignment (#182)

* docs: plan load render workspace alignment

* fix: normalize workspace status hydration

* fix: avoid duplicate backlog hydration load

* refactor: use sprint store active story

* refactor: migrate solo to workspace store

* chore: stabilize verification ignores
This commit is contained in:
Janpeter Visser 2026-05-10 07:34:58 +02:00 committed by GitHub
parent 98ee05d458
commit 3b5cee823c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 1845 additions and 577 deletions

View file

@ -62,8 +62,8 @@ export function SprintBoardClient({
const sprintStories = useSprintWorkspaceStore(
useShallow((s) => selectStoriesForActiveSprint(s) as SprintStory[]),
)
const selectedStoryId = useSprintWorkspaceStore((s) => s.context.activeStoryId)
const sprintStoryIds = new Set(sprintStories.map(s => s.id))
const [selectedStoryId, setSelectedStoryId] = useState<string | null>(null)
const [activeDragStory, setActiveDragStory] = useState<SprintStory | null>(null)
const [, startTransition] = useTransition()
@ -157,7 +157,9 @@ export function SprintBoardClient({
if (story) story.sprint_id = null
})
if (selectedStoryId === storyId) setSelectedStoryId(null)
if (selectedStoryId === storyId) {
useSprintWorkspaceStore.getState().setActiveStory(null)
}
startTransition(async () => {
const result = await removeStoryFromSprintAction(storyId)
@ -240,7 +242,7 @@ export function SprintBoardClient({
sprintId={sprintId}
isDemo={isDemo}
onRemove={handleRemove}
onSelect={setSelectedStoryId}
onSelect={(storyId) => useSprintWorkspaceStore.getState().setActiveStory(storyId)}
selectedStoryId={selectedStoryId}
currentUserId={currentUserId}
productId={productId}
@ -250,7 +252,6 @@ export function SprintBoardClient({
selectedStoryId ? (
<TaskList
key="tasks"
storyId={selectedStoryId}
sprintId={sprintId}
productId={productId}
isDemo={isDemo}