@ai-matrx/meet 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.cjs CHANGED
@@ -1947,6 +1947,15 @@ function createMeetingSession(options) {
1947
1947
  const { manager, repository, store, identity } = options;
1948
1948
  let channel = null;
1949
1949
  let meetingChannel = null;
1950
+ async function readMeeting(meetingId) {
1951
+ try {
1952
+ return await repository.meeting(meetingId);
1953
+ } catch (error) {
1954
+ const slug = store.snapshot().meeting?.slug;
1955
+ if (slug === void 0) throw error;
1956
+ return repository.meetingBySlug(slug);
1957
+ }
1958
+ }
1950
1959
  function requireHostUser(operation) {
1951
1960
  if (identity.userId === null || !isHostRole(effectiveRole(store.snapshot()))) {
1952
1961
  throw new MeetError(
@@ -2027,7 +2036,7 @@ function createMeetingSession(options) {
2027
2036
  onBackfill: async () => {
2028
2037
  const meeting = store.snapshot().meeting;
2029
2038
  if (meeting === null) return;
2030
- const fresh = isGuest(identity) ? await repository.meetingBySlug(meeting.slug) : await repository.meeting(meeting.id);
2039
+ const fresh = isGuest(identity) ? await repository.meetingBySlug(meeting.slug) : await readMeeting(meeting.id);
2031
2040
  store.patch({ meeting: fresh, locked: fresh.locked });
2032
2041
  }
2033
2042
  });
@@ -2122,7 +2131,7 @@ function createMeetingSession(options) {
2122
2131
  // a recovered surface from looking healthy and being wrong.
2123
2132
  onBackfill: async () => {
2124
2133
  const [meeting, transcript, notes, recordings, attendees] = await Promise.all([
2125
- repository.meeting(meetingId),
2134
+ readMeeting(meetingId),
2126
2135
  repository.transcript(meetingId),
2127
2136
  repository.notes(meetingId),
2128
2137
  repository.recordings(meetingId),
@@ -5034,6 +5043,7 @@ function useGuestRecordAccess(meeting) {
5034
5043
 
5035
5044
  // src/react/components.tsx
5036
5045
  var import_react4 = require("react");
5046
+ var import_design_system = require("@ai-matrx/design-system");
5037
5047
  var import_format2 = require("@ai-matrx/kit/format");
5038
5048
 
5039
5049
  // src/core/format.ts
@@ -5641,11 +5651,11 @@ function NoteTakerRow() {
5641
5651
  ai.noteTakerLabel
5642
5652
  ] }),
5643
5653
  status.detail !== null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__panel-note", children: status.detail }) : null,
5644
- status.refusal !== null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mx-meet__refusal", role: "alert", children: [
5654
+ status.refusal !== null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system.ErrorBox, { as: "div", className: "mx-meet__refusal", error: status.refusal, operation: "Join this meeting", origin: "meet/components", children: [
5645
5655
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__refusal-reason", children: status.refusal.reason }),
5646
5656
  status.refusal.remedy.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__refusal-remedy", children: status.refusal.remedy }) : null
5647
5657
  ] }) : null,
5648
- ai.error !== null && !duplicateError ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mx-meet__refusal", role: "alert", children: [
5658
+ ai.error !== null && !duplicateError ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system.ErrorBox, { as: "div", className: "mx-meet__refusal", error: ai.error, operation: "Run the meeting assistant", origin: "meet/components", children: [
5649
5659
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__refusal-reason", children: ai.error.message }),
5650
5660
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__refusal-remedy", children: ai.error.remedy })
5651
5661
  ] }) : null,
@@ -5776,7 +5786,7 @@ function AiPanel({ onClose }) {
5776
5786
  ai.coverage.truncated ? " (the oldest were left out)" : "",
5777
5787
  "."
5778
5788
  ] }) : null,
5779
- ai.error !== null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mx-meet__refusal", role: "alert", children: [
5789
+ ai.error !== null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system.ErrorBox, { as: "div", className: "mx-meet__refusal", error: ai.error, operation: "Run the meeting assistant", origin: "meet/components", children: [
5780
5790
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__refusal-reason", children: ai.error.message }),
5781
5791
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__refusal-remedy", children: ai.error.remedy })
5782
5792
  ] }) : null
@@ -6248,7 +6258,7 @@ function GuestRecordAccessControl({
6248
6258
  resolved
6249
6259
  ] }),
6250
6260
  access.saving ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__panel-note", role: "status", children: "Saving what guests may read\u2026" }) : null,
6251
- access.error !== null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mx-meet__refusal", role: "alert", children: [
6261
+ access.error !== null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system.ErrorBox, { as: "div", className: "mx-meet__refusal", error: access.error, operation: "Change who can join", origin: "meet/components", children: [
6252
6262
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__refusal-reason", children: access.error.message }),
6253
6263
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__refusal-remedy", children: access.error.remedy })
6254
6264
  ] }) : null
@@ -6273,7 +6283,7 @@ function MeetingRecordBody({
6273
6283
  const [question, setQuestion] = (0, import_react4.useState)("");
6274
6284
  const [tab, setTab] = (0, import_react4.useState)("summary");
6275
6285
  if (record.failure !== null) {
6276
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "mx-meet mx-meet--record", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mx-meet__empty", role: "alert", children: [
6286
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "mx-meet mx-meet--record", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system.ErrorBox, { as: "div", className: "mx-meet__empty", error: record.failure, operation: "Open this meeting record", origin: "meet/components", children: [
6277
6287
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__empty-title", children: "This meeting record could not be opened" }),
6278
6288
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__empty-body", children: record.failure.message }),
6279
6289
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__empty-body", children: record.failure.remedy })
@@ -6506,7 +6516,7 @@ function MeetingRecordBody({
6506
6516
  record.coverage.truncated ? " (the oldest were left out)" : "",
6507
6517
  "."
6508
6518
  ] }) : null,
6509
- record.askError !== null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mx-meet__refusal", role: "alert", children: [
6519
+ record.askError !== null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system.ErrorBox, { as: "div", className: "mx-meet__refusal", error: record.askError, operation: "Ask about this meeting", origin: "meet/components", children: [
6510
6520
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__refusal-reason", children: record.askError.message }),
6511
6521
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__refusal-remedy", children: record.askError.remedy })
6512
6522
  ] }) : null
@@ -6579,7 +6589,7 @@ function RecordingPlayerBody({ fileId, host }) {
6579
6589
  ] });
6580
6590
  }
6581
6591
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mx-meet__record-section", children: [
6582
- error !== null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mx-meet__refusal", role: "alert", children: [
6592
+ error !== null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system.ErrorBox, { as: "div", className: "mx-meet__refusal", error, operation: "Complete this meeting action", origin: "meet/components", children: [
6583
6593
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__refusal-reason", children: error.message }),
6584
6594
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__refusal-remedy", children: error.remedy })
6585
6595
  ] }) : null,
@@ -6621,7 +6631,7 @@ function MeetingList({ baseUrl }) {
6621
6631
  const list = useMeetings();
6622
6632
  if (host === null) return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InertNotice, { what: "Your meetings" });
6623
6633
  if (list.failure !== null) {
6624
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mx-meet__empty", role: "alert", children: [
6634
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system.ErrorBox, { as: "div", className: "mx-meet__empty", error: list.failure, operation: "List your meetings", origin: "meet/components", children: [
6625
6635
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__empty-title", children: "Your meetings could not be listed" }),
6626
6636
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__empty-body", children: list.failure.message }),
6627
6637
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-meet__empty-body", children: list.failure.remedy })