@objectstack/platform-objects 5.1.0 → 5.2.0

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.
@@ -664,13 +664,56 @@ var SysNotification = ObjectSchema.create({
664
664
  displayNameField: "title",
665
665
  titleFormat: "{title}",
666
666
  compactLayout: ["title", "type", "is_read", "created_at"],
667
+ /**
668
+ * Row-level inbox actions. Use `visible` CEL expressions to ensure
669
+ * `mark_read` only shows on unread rows and vice-versa, mirroring the
670
+ * mark-as-read affordances in GitHub / Linear inboxes. The toolbar-level
671
+ * `mark_all_read` is intentionally omitted server-side: it requires a
672
+ * bulk update primitive that doesn't yet exist on the REST surface, and
673
+ * the popover already handles the multi-row case client-side via N
674
+ * single-row PATCHes (see `InboxPopover.tsx` -> AppHeader `markAllRead`).
675
+ */
676
+ actions: [
677
+ {
678
+ name: "mark_read",
679
+ label: "Mark as Read",
680
+ icon: "check",
681
+ variant: "secondary",
682
+ mode: "custom",
683
+ locations: ["list_item"],
684
+ type: "api",
685
+ method: "PATCH",
686
+ target: "/api/v1/data/sys_notification/{id}",
687
+ bodyExtra: { is_read: true },
688
+ visible: "!record.is_read",
689
+ successMessage: "Notification marked as read",
690
+ refreshAfter: true
691
+ },
692
+ {
693
+ name: "mark_unread",
694
+ label: "Mark as Unread",
695
+ icon: "bell-dot",
696
+ variant: "secondary",
697
+ mode: "custom",
698
+ locations: ["list_item"],
699
+ type: "api",
700
+ method: "PATCH",
701
+ target: "/api/v1/data/sys_notification/{id}",
702
+ bodyExtra: { is_read: false, read_at: null },
703
+ visible: "record.is_read",
704
+ successMessage: "Notification marked as unread",
705
+ refreshAfter: true
706
+ }
707
+ ],
667
708
  listViews: {
668
709
  unread: {
669
710
  type: "grid",
670
711
  name: "unread",
671
712
  label: "Unread",
672
713
  data: { provider: "object", object: "sys_notification" },
673
- columns: ["type", "title", "recipient_id", "created_at"],
714
+ // Title + actor first (the "who/what" the user actually scans);
715
+ // type stays as a categorising chip; created_at right-aligned.
716
+ columns: ["title", "actor_name", "type", "created_at"],
674
717
  filter: [
675
718
  { field: "recipient_id", operator: "equals", value: "{current_user_id}" },
676
719
  { field: "is_read", operator: "equals", value: false }
@@ -684,17 +727,21 @@ var SysNotification = ObjectSchema.create({
684
727
  name: "mine",
685
728
  label: "Mine",
686
729
  data: { provider: "object", object: "sys_notification" },
687
- columns: ["type", "title", "is_read", "created_at"],
730
+ columns: ["title", "actor_name", "type", "is_read", "created_at"],
688
731
  filter: [{ field: "recipient_id", operator: "equals", value: "{current_user_id}" }],
689
732
  sort: [{ field: "created_at", order: "desc" }],
690
- pagination: { pageSize: 50 }
733
+ pagination: { pageSize: 50 },
734
+ // Group by notification category so mention/assignment storms don't
735
+ // hide system or task_due rows. Users still toggle to flat via the
736
+ // toolbar Group control if they prefer chronology only.
737
+ grouping: { fields: [{ field: "type", order: "asc", collapsed: false }] }
691
738
  },
692
739
  all_notifications: {
693
740
  type: "grid",
694
741
  name: "all_notifications",
695
742
  label: "All",
696
743
  data: { provider: "object", object: "sys_notification" },
697
- columns: ["type", "title", "recipient_id", "is_read", "created_at"],
744
+ columns: ["title", "recipient_id", "actor_name", "type", "is_read", "created_at"],
698
745
  sort: [{ field: "created_at", order: "desc" }],
699
746
  pagination: { pageSize: 100 }
700
747
  }
@@ -1547,6 +1594,14 @@ var SysApprovalRequest = ObjectSchema.create({
1547
1594
  description: "Record snapshot at submission time",
1548
1595
  group: "State"
1549
1596
  }),
1597
+ process_hash: Field.text({
1598
+ label: "Process Hash",
1599
+ required: false,
1600
+ maxLength: 80,
1601
+ readonly: true,
1602
+ description: "sha256 of the approval process body at submit time (ADR-0009 execution pinning). Resolved through sys_metadata_history so process upgrades do not affect in-flight requests.",
1603
+ group: "State"
1604
+ }),
1550
1605
  completed_at: Field.datetime({
1551
1606
  label: "Completed At",
1552
1607
  required: false,