feat(FN-1206): promote missions to an inline top-level view
- Extend dashboard task view state and nav controls to include a persistent missions view toggle - Render MissionManager inline in App project content and route mission/session navigation into the missions view - Remove modal-based mission wiring from AppModals and useModalManager now that missions are no longer a modal - Add inline MissionManager styling and update App/Header/tablet tests for the new missions navigation behavior
This commit is contained in:
@@ -47,9 +47,6 @@ export interface ModalManager {
|
||||
mailboxAgents: Agent[];
|
||||
gitManagerOpen: boolean;
|
||||
workflowStepsOpen: boolean;
|
||||
missionsOpen: boolean;
|
||||
missionResumeSessionId: string | undefined;
|
||||
missionTargetId: string | undefined;
|
||||
agentsOpen: boolean;
|
||||
scriptsOpen: boolean;
|
||||
setupWizardOpen: boolean;
|
||||
@@ -106,11 +103,6 @@ export interface ModalManager {
|
||||
openWorkflowSteps: () => void;
|
||||
closeWorkflowSteps: () => void;
|
||||
|
||||
openMissions: () => void;
|
||||
openMissionById: (missionId: string) => void;
|
||||
openMissionWithSession: (sessionId: string) => void;
|
||||
closeMissions: () => void;
|
||||
|
||||
openAgents: () => void;
|
||||
closeAgents: () => void;
|
||||
|
||||
@@ -162,9 +154,6 @@ export function useModalManager(options: UseModalManagerOptions): ModalManager {
|
||||
const [mailboxAgents, setMailboxAgents] = useState<Agent[]>([]);
|
||||
const [gitManagerOpen, setGitManagerOpen] = useState(false);
|
||||
const [workflowStepsOpen, setWorkflowStepsOpen] = useState(false);
|
||||
const [missionsOpen, setMissionsOpen] = useState(false);
|
||||
const [missionResumeSessionId, setMissionResumeSessionId] = useState<string | undefined>(undefined);
|
||||
const [missionTargetId, setMissionTargetId] = useState<string | undefined>(undefined);
|
||||
const [agentsOpen, setAgentsOpen] = useState(false);
|
||||
const [scriptsOpen, setScriptsOpen] = useState(false);
|
||||
const [setupWizardOpen, setSetupWizardOpen] = useState(false);
|
||||
@@ -182,7 +171,6 @@ export function useModalManager(options: UseModalManagerOptions): ModalManager {
|
||||
mailboxOpen ||
|
||||
gitManagerOpen ||
|
||||
workflowStepsOpen ||
|
||||
missionsOpen ||
|
||||
scriptsOpen ||
|
||||
agentsOpen ||
|
||||
usageOpen ||
|
||||
@@ -303,21 +291,6 @@ export function useModalManager(options: UseModalManagerOptions): ModalManager {
|
||||
const openWorkflowSteps = useCallback(() => setWorkflowStepsOpen(true), []);
|
||||
const closeWorkflowSteps = useCallback(() => setWorkflowStepsOpen(false), []);
|
||||
|
||||
const openMissions = useCallback(() => setMissionsOpen(true), []);
|
||||
const openMissionById = useCallback((missionId: string) => {
|
||||
setMissionTargetId(missionId);
|
||||
setMissionsOpen(true);
|
||||
}, []);
|
||||
const openMissionWithSession = useCallback((sessionId: string) => {
|
||||
setMissionResumeSessionId(sessionId);
|
||||
setMissionsOpen(true);
|
||||
}, []);
|
||||
const closeMissions = useCallback(() => {
|
||||
setMissionsOpen(false);
|
||||
setMissionResumeSessionId(undefined);
|
||||
setMissionTargetId(undefined);
|
||||
}, []);
|
||||
|
||||
const openAgents = useCallback(() => setAgentsOpen(true), []);
|
||||
const closeAgents = useCallback(() => setAgentsOpen(false), []);
|
||||
|
||||
@@ -380,9 +353,6 @@ export function useModalManager(options: UseModalManagerOptions): ModalManager {
|
||||
mailboxAgents,
|
||||
gitManagerOpen,
|
||||
workflowStepsOpen,
|
||||
missionsOpen,
|
||||
missionResumeSessionId,
|
||||
missionTargetId,
|
||||
agentsOpen,
|
||||
scriptsOpen,
|
||||
setupWizardOpen,
|
||||
@@ -423,10 +393,6 @@ export function useModalManager(options: UseModalManagerOptions): ModalManager {
|
||||
closeGitManager,
|
||||
openWorkflowSteps,
|
||||
closeWorkflowSteps,
|
||||
openMissions,
|
||||
openMissionById,
|
||||
openMissionWithSession,
|
||||
closeMissions,
|
||||
openAgents,
|
||||
closeAgents,
|
||||
openScripts,
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { ProjectInfo } from "../api";
|
||||
import { getScopedItem, setScopedItem } from "../utils/projectStorage";
|
||||
|
||||
export type ViewMode = "overview" | "project";
|
||||
export type TaskView = "board" | "list" | "agents";
|
||||
export type TaskView = "board" | "list" | "agents" | "missions";
|
||||
|
||||
interface UseViewStateOptions {
|
||||
projectsLoading: boolean;
|
||||
@@ -48,7 +48,7 @@ export function useViewState(options: UseViewStateOptions): UseViewStateResult {
|
||||
|
||||
const [taskView, setTaskView] = useState<TaskView>(() => {
|
||||
const saved = getScopedItem("kb-dashboard-task-view");
|
||||
if (saved === "board" || saved === "list" || saved === "agents") return saved;
|
||||
if (saved === "board" || saved === "list" || saved === "agents" || saved === "missions") return saved;
|
||||
return "board";
|
||||
});
|
||||
|
||||
@@ -58,7 +58,7 @@ export function useViewState(options: UseViewStateOptions): UseViewStateResult {
|
||||
|
||||
useEffect(() => {
|
||||
const saved = getScopedItem("kb-dashboard-task-view", currentProject?.id);
|
||||
if (saved === "board" || saved === "list" || saved === "agents") {
|
||||
if (saved === "board" || saved === "list" || saved === "agents" || saved === "missions") {
|
||||
setTaskView(saved);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user