refactor(toast): HUD 상태 라인 피드백 통합 및 우선순위 큐 적용
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
type TimerPreset,
|
||||
} from '@/entities/session';
|
||||
import { useSoundPresetSelection } from '@/features/sound-preset';
|
||||
import { useHudStatusLine } from '@/shared/lib/useHudStatusLine';
|
||||
import { useToast } from '@/shared/ui';
|
||||
import { SpaceFocusHudWidget } from '@/widgets/space-focus-hud';
|
||||
import { SpaceSetupDrawerWidget } from '@/widgets/space-setup-drawer';
|
||||
@@ -102,6 +103,7 @@ export const SpaceWorkspaceWidget = () => {
|
||||
|
||||
const canStart = goalInput.trim().length > 0;
|
||||
const isFocusMode = workspaceMode === 'focus';
|
||||
const { activeStatus, pushStatusLine, runActiveAction } = useHudStatusLine(isFocusMode);
|
||||
|
||||
const handleGoalChipSelect = (chip: GoalChip) => {
|
||||
setSelectedGoalId(chip.id);
|
||||
@@ -122,9 +124,8 @@ export const SpaceWorkspaceWidget = () => {
|
||||
}
|
||||
|
||||
setWorkspaceMode('focus');
|
||||
|
||||
pushToast({
|
||||
title: `목표: ${goalInput.trim()} 시작해요.`,
|
||||
pushStatusLine({
|
||||
message: `목표: ${goalInput.trim()} 시작해요.`,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -182,6 +183,9 @@ export const SpaceWorkspaceWidget = () => {
|
||||
goal={goalInput.trim()}
|
||||
timerLabel={selectedTimerLabel}
|
||||
visible={isFocusMode}
|
||||
statusLine={activeStatus}
|
||||
onStatusAction={runActiveAction}
|
||||
onStatusMessage={pushStatusLine}
|
||||
onGoalUpdate={(nextGoal) => {
|
||||
setGoalInput(nextGoal);
|
||||
setSelectedGoalId(null);
|
||||
@@ -210,6 +214,7 @@ export const SpaceWorkspaceWidget = () => {
|
||||
onRestoreThought={restoreThought}
|
||||
onRestoreThoughts={restoreThoughts}
|
||||
onClearInbox={clearThoughts}
|
||||
onStatusMessage={pushStatusLine}
|
||||
onExitRequested={handleExitRequested}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user