Skip to content

Commit 743b0e3

Browse files
refactor(dashboards): store dashboards as workspace files
Dashboards are now ordinary workspace files, handled like Sim pages, instead of a separate resource. Creating or uploading `<Name>.dashboard` drops the suffix and stamps `text/x-sim-dashboard`; the type is sticky across content writes. The file viewer renders it live behind the `dashboards` flag, and the public share viewer shows a workspace-only notice. - Remove the dashboard resource: sidebar page, API routes, hooks, contracts, application layer, Mothership dashboards/dashboard_folders tools, resource tags, and the per-turn dashboardsEnabled payload. - Revert the file discovery column (0385) and drop the dashboard folder resource enum (0384); dashboards never shipped, so no backfill. - Chat panel decides previewability and tab/picker icons from the file type, not the name, so extensionless dashboards render and get the chart icon. - Renderer: authored left label columns are kept intact, horizontal bar frames grow with row count, and hovered rows get a label-and-bar highlight. - Simplify the create-dashboard skill around one validated example. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
1 parent f894b9e commit 743b0e3

98 files changed

Lines changed: 653 additions & 61476 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/sim/app/api/files/uploads/finalizers.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
import { getWorkspaceFileSize, type StorageContext } from '@/lib/uploads/shared/types'
2323
import { UploadSessionError, type UploadSessionRecord } from '@/lib/uploads/upload-session/service'
2424
import { readWorkspaceFileUploadProvenance } from '@/lib/uploads/upload-session/workspace-file-provenance'
25-
import { defaultFileDiscovery } from '@/lib/workspace-files/discovery'
2625
import { toV2File } from '@/app/api/v2/files/utils'
2726

2827
export interface UploadActor {
@@ -377,7 +376,6 @@ async function insertOrLoadFileMetadata(
377376
userId: input.userId,
378377
workspaceId: input.workspaceId,
379378
context: input.context,
380-
discovery: defaultFileDiscovery(input.context),
381379
originalName: input.originalName,
382380
displayName: input.originalName,
383381
contentType: input.contentType,

‎apps/sim/app/api/workspaces/[id]/dashboards/[dashboardId]/route.ts‎

Lines changed: 0 additions & 67 deletions
This file was deleted.

‎apps/sim/app/api/workspaces/[id]/dashboards/folders/route.ts‎

Lines changed: 0 additions & 59 deletions
This file was deleted.

‎apps/sim/app/api/workspaces/[id]/dashboards/route.ts‎

Lines changed: 0 additions & 29 deletions
This file was deleted.

‎apps/sim/app/workspace/[workspaceId]/components/folders/foldered-resources.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { ComponentType } from 'react'
2-
import { ChartColumn, Database, File as FileIcon, Table as TableIcon } from '@sim/emcn/icons'
2+
import { Database, File as FileIcon, Table as TableIcon } from '@sim/emcn/icons'
33
import type { FolderResourceType } from '@/lib/api/contracts/folders'
44
import { folderListHref } from '@/app/workspace/[workspaceId]/components/folders/search-params'
55

@@ -10,7 +10,7 @@ import { folderListHref } from '@/app/workspace/[workspaceId]/components/folders
1010
*/
1111
export type FolderedHeaderResourceType = Extract<
1212
FolderResourceType,
13-
'file' | 'knowledge_base' | 'table' | 'dashboard'
13+
'file' | 'knowledge_base' | 'table'
1414
>
1515

1616
export interface FolderedResourceHeaderMeta {
@@ -36,7 +36,6 @@ export const FOLDERED_RESOURCE_HEADERS: Record<
3636
file: { rootLabel: 'Files', rootIcon: FileIcon, listSegment: 'files' },
3737
knowledge_base: { rootLabel: 'Knowledge bases', rootIcon: Database, listSegment: 'knowledge' },
3838
table: { rootLabel: 'Tables', rootIcon: TableIcon, listSegment: 'tables' },
39-
dashboard: { rootLabel: 'Dashboards', rootIcon: ChartColumn, listSegment: 'dashboards' },
4039
}
4140

4241
/**

‎apps/sim/app/workspace/[workspaceId]/dashboards/[dashboardId]/page.tsx‎

Lines changed: 0 additions & 8 deletions
This file was deleted.

‎apps/sim/app/workspace/[workspaceId]/dashboards/dashboard-dialog.tsx‎

Lines changed: 0 additions & 163 deletions
This file was deleted.

0 commit comments

Comments
 (0)