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:
parent
98ee05d458
commit
3b5cee823c
28 changed files with 1845 additions and 577 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue