Skip to content

Commit 63d595e

Browse files
committed
feat(projects): name a project after its root workspace with a " - Project" suffix
1 parent 6f42b47 commit 63d595e

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎apps/sim/lib/projects/membership.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ import type { DbOrTx } from '@/lib/db/types'
99
* ever without a project.
1010
*/
1111

12-
/** A project's name: the name of the workspace that roots it. */
12+
/**
13+
* A project's name: the name of the workspace that roots it, marked as a project so it reads
14+
* apart from that workspace. Matches the backfill's naming.
15+
*/
1316
function projectNameFor(workspaceName: string): string {
14-
return workspaceName.trim() || 'Untitled project'
17+
return `${workspaceName.trim() || 'Untitled'} - Project`
1518
}
1619

1720
interface NewWorkspace {

‎packages/db/script-migrations/0030_backfill_projects.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ export function resolveLineagePlacements(
4747
return placements
4848
}
4949

50-
/** A project's name: its lineage root workspace's name. */
50+
/** A project's name: its lineage root workspace's name, marked as a project. */
5151
export function projectName(rootName: string): string {
52-
return rootName.trim() || 'Untitled project'
52+
return `${rootName.trim() || 'Untitled'} - Project`
5353
}
5454

5555
/**

0 commit comments

Comments
 (0)