Q204: meeting records that were never held are removed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-09 11:22:44 -04:00
1 parent 9f44e0bdee
commit 8861aa4c30
14 files changed
+16 -85

No files matched your search

-36
View File
@@ -1,36 +0,0 @@
import type { DatabaseSync } from "node:sqlite";
import type { CreateMeetingInput, DeleteMeetingInput } from "../../shared/commands";
import { createId } from "../../shared/ids";
import { AuditService } from "./audit-service";
export class MeetingService {
private readonly audit: AuditService;
constructor(private readonly db: DatabaseSync) {
this.audit = new AuditService(db);
}
create(input: CreateMeetingInput): string {
const id = createId("mtg");
const now = new Date().toISOString();
this.db.prepare(`
insert into meetings(id, org_id, title, meeting_type, status, scheduled_at, duration_minutes, agenda, notes, decisions, created_at, updated_at)
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
`).run(id, input.orgId, input.title.trim(), input.meetingType, "scheduled", input.scheduledAt, input.durationMinutes, input.agenda.trim(), "", "", now, now);
this.audit.record({
orgId: input.orgId,
entityType: "meeting",
entityId: id,
actorType: "system",
actorId: null,
action: "created",
payload: { title: input.title.trim(), meetingType: input.meetingType },
});
return id;
}
delete(input: DeleteMeetingInput): void {
const result = this.db.prepare("delete from meetings where id = ? and org_id = ?").run(input.meetingId, input.orgId);
if (result.changes === 0) throw new Error("Meeting was not found.");
}
}
-1
View File
@@ -151,7 +151,6 @@ export class SnapshotService {
auditEvents: recentInOrg<AppSnapshot["auditEvents"][number]>(this.db, "audit_events", "created_at desc", 200, activeOrgId),
documents: list(this.db, "documents", "updated_at desc"),
knowledgeEntries: list(this.db, "knowledge_entries", "updated_at desc"),
meetings: list(this.db, "meetings", "scheduled_at desc"),
sprints: list(this.db, "sprints", "start_date desc"),
connectorAccounts: list(this.db, "connector_accounts", "toolkit_slug asc"),
connectorGrants: list(this.db, "agent_connector_grants", "toolkit_slug asc, created_at asc"),