Support the full set of chat space types

The PRD calls for company, division, department, project, pod and ad-hoc
spaces, but only company, department, project and direct were accepted. Add
division, pod and ad_hoc to the command contract, the service whitelist and the
new-space dialog. The space_type column is free text, so no migration is
needed.
This commit is contained in:
ZacharyZhang-NY committed 2026-05-28 19:47:16 -04:00
1 parent 43e1626f77
commit b4056502ec
3 files changed
+14 -3

No files matched your search

@@ -18,7 +18,15 @@ import { ChatMessageMutationService } from "./chat-message-mutation-service";
import { recordChatMentions, resolveChatMentions, type ResolvedMention } from "./chat-mentions";
import { FileHandoffService, type FileHandoffAttachment } from "./file-handoff-service";
const SPACE_TYPES = new Set<CreateChatSpaceInput["spaceType"]>(["company", "department", "project", "direct"]);
const SPACE_TYPES = new Set<CreateChatSpaceInput["spaceType"]>([
"company",
"division",
"department",
"project",
"pod",
"ad_hoc",
"direct",
]);
const SPACE_VISIBILITIES = new Set<CreateChatSpaceInput["visibility"]>(["workspace", "restricted"]);
const RETENTION_POLICIES = new Set(["standard_365d", "restricted_365d"]);
@@ -14,7 +14,7 @@ import { ROLE_KEY } from "../../../shared/domain";
import type { PageProps } from "./types";
import { activeOrgId, requireActiveEmployee } from "./types";
type SpaceType = "company" | "department" | "project" | "direct";
type SpaceType = "company" | "division" | "department" | "project" | "pod" | "ad_hoc" | "direct";
type Visibility = "workspace" | "restricted";
function value(form: FormData, key: string): string {
@@ -274,8 +274,11 @@ export function ChatPage({ snapshot, actions }: PageProps) {
<Field label="Type">
<select className="input" name="spaceType" defaultValue="project">
<option value="company">Company</option>
<option value="division">Division</option>
<option value="department">Department</option>
<option value="project">Project</option>
<option value="pod">Pod</option>
<option value="ad_hoc">Ad-hoc</option>
<option value="direct">Direct</option>
</select>
</Field>
+1 -1
View File
@@ -140,7 +140,7 @@ export interface DeleteMessageInput {
export interface CreateChatSpaceInput {
orgId: string;
spaceType: "company" | "department" | "project" | "direct";
spaceType: "company" | "division" | "department" | "project" | "pod" | "ad_hoc" | "direct";
name: string;
topic: string;
visibility: "workspace" | "restricted";