Always render the workflow selector expanded across the dashboard. - remove collapsible workflow selector props, state, icons, and toggle styles - stop InlineCreateCard from passing collapse persistence options - delete project storage support and tests for collapsed workflow selector state - add a patch changeset for the published CLI package Files changed: .changeset/fn-6080-removal.md | 5 ++ .../dashboard/app/components/InlineCreateCard.tsx | 3 - .../dashboard/app/components/WorkflowSelector.css | 14 +---- .../dashboard/app/components/WorkflowSelector.tsx | 65 +-------------------- .../components/__tests__/InlineCreateCard.test.tsx | 50 ---------------- .../components/__tests__/WorkflowSelector.test.tsx | 68 ---------------------- .../app/utils/__tests__/projectStorage.test.ts | 3 +- packages/dashboard/app/utils/projectStorage.ts | 1 - 8 files changed, 8 insertions(+), 201 deletions(-) Fusion-Task-Id: FN-6080 Fusion-Task-Lineage: cca26111-9e20-47d0-8473-d18a3b488ae1
86 lines
2.3 KiB
TypeScript
86 lines
2.3 KiB
TypeScript
export const GLOBAL_STORAGE_KEYS: string[] = [
|
|
"kb-dashboard-theme-mode",
|
|
"kb-dashboard-color-theme",
|
|
"kb-dashboard-view-mode",
|
|
"kb-dashboard-current-project",
|
|
"kb-dashboard-recent-projects",
|
|
"fn-agent-log-markdown",
|
|
"fn-agent-log-tool-output",
|
|
];
|
|
|
|
export const PROJECT_STORAGE_KEYS: string[] = [
|
|
"kb-dashboard-task-view",
|
|
"kb-dashboard-list-columns",
|
|
"kb-dashboard-hide-done",
|
|
"kb-dashboard-list-collapsed",
|
|
"kb-dashboard-selected-tasks",
|
|
"kb-dashboard-list-selected-task",
|
|
"kb-dashboard-list-sidebar-width",
|
|
"kb-dashboard-mailbox-sidebar-width",
|
|
"kb-dashboard-board-workflow-collapsed",
|
|
"kb-quick-entry-text",
|
|
"kb-inline-create-text",
|
|
"fn-agent-view",
|
|
"kb-terminal-tabs",
|
|
"kb-planning-last-description",
|
|
"kb-subtask-last-description",
|
|
"kb-mission-last-goal",
|
|
"kb-usage-view-mode",
|
|
"kb-usage-hidden-windows",
|
|
"kb-usage-modal-size",
|
|
"kb-usage-provider-order",
|
|
"kb-chat-active-session",
|
|
"kb-dashboard-working-branch-filter",
|
|
"kb-dashboard-base-branch-filter",
|
|
"kb-capacity-risk-banner-dismissed",
|
|
"kb-files-line-numbers",
|
|
"fusion-plugin-dependency-graph:positions",
|
|
];
|
|
|
|
export function scopedKey(baseKey: string, projectId?: string): string {
|
|
if (typeof projectId !== "string" || projectId.length === 0) {
|
|
return baseKey;
|
|
}
|
|
|
|
return `kb:${projectId}:${baseKey}`;
|
|
}
|
|
|
|
export function getScopedItem(baseKey: string, projectId?: string): string | null {
|
|
if (typeof window === "undefined") {
|
|
return null;
|
|
}
|
|
|
|
const getItem = window.localStorage?.getItem;
|
|
if (typeof getItem !== "function") {
|
|
return null;
|
|
}
|
|
|
|
return getItem.call(window.localStorage, scopedKey(baseKey, projectId));
|
|
}
|
|
|
|
export function setScopedItem(baseKey: string, value: string, projectId?: string): void {
|
|
if (typeof window === "undefined") {
|
|
return;
|
|
}
|
|
|
|
const setItem = window.localStorage?.setItem;
|
|
if (typeof setItem !== "function") {
|
|
return;
|
|
}
|
|
|
|
setItem.call(window.localStorage, scopedKey(baseKey, projectId), value);
|
|
}
|
|
|
|
export function removeScopedItem(baseKey: string, projectId?: string): void {
|
|
if (typeof window === "undefined") {
|
|
return;
|
|
}
|
|
|
|
const removeItem = window.localStorage?.removeItem;
|
|
if (typeof removeItem !== "function") {
|
|
return;
|
|
}
|
|
|
|
removeItem.call(window.localStorage, scopedKey(baseKey, projectId));
|
|
}
|