@burdenoff/microfe-planmagnet 2026.930.20 → 2026.930.21

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.
Files changed (26) hide show
  1. package/dist/planmagnet/automation/AutomationExecutionsPanel.d.ts.map +1 -1
  2. package/dist/planmagnet/automation/AutomationExecutionsPanel.js +43 -39
  3. package/dist/planmagnet/automation/AutomationExecutionsPanel.js.map +1 -1
  4. package/dist/planmagnet/automation/AutomationRuleFields.d.ts +23 -4
  5. package/dist/planmagnet/automation/AutomationRuleFields.d.ts.map +1 -1
  6. package/dist/planmagnet/automation/AutomationRuleFields.js +255 -108
  7. package/dist/planmagnet/automation/AutomationRuleFields.js.map +1 -1
  8. package/dist/planmagnet/automation/automationRuleTypes.d.ts +138 -15
  9. package/dist/planmagnet/automation/automationRuleTypes.d.ts.map +1 -1
  10. package/dist/planmagnet/automation/automationRuleTypes.js +162 -22
  11. package/dist/planmagnet/automation/automationRuleTypes.js.map +1 -1
  12. package/dist/planmagnet/controls/AutomationRuleControls.d.ts.map +1 -1
  13. package/dist/planmagnet/controls/AutomationRuleControls.js +76 -71
  14. package/dist/planmagnet/controls/AutomationRuleControls.js.map +1 -1
  15. package/dist/planmagnet/pages/AutomationAutomationRuleDetailPagePage.d.ts.map +1 -1
  16. package/dist/planmagnet/pages/AutomationAutomationRuleDetailPagePage.js +85 -76
  17. package/dist/planmagnet/pages/AutomationAutomationRuleDetailPagePage.js.map +1 -1
  18. package/dist/planmagnet/pages/AutomationAutomationRulesPagePage.js +12 -12
  19. package/dist/planmagnet/pages/AutomationAutomationRulesPagePage.js.map +1 -1
  20. package/dist/planmagnet/pages/AutomationCreateAutomationRulePagePage.d.ts.map +1 -1
  21. package/dist/planmagnet/pages/AutomationCreateAutomationRulePagePage.js +48 -44
  22. package/dist/planmagnet/pages/AutomationCreateAutomationRulePagePage.js.map +1 -1
  23. package/dist/planmagnet/people/People.d.ts.map +1 -1
  24. package/dist/planmagnet/people/People.js +30 -17
  25. package/dist/planmagnet/people/People.js.map +1 -1
  26. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"AutomationCreateAutomationRulePagePage.js","names":[],"sources":["../../../src/planmagnet/pages/AutomationCreateAutomationRulePagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useMutation } from '@apollo/client/react';\nimport { Button, Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { Bot, Save, X } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\nimport { throwOnError } from '../utils/mutationResult';\nimport { detailPath } from '../utils/rowNavigation';\nimport {\n AutomationRuleFields,\n type AutomationRuleFormState,\n} from '../automation/AutomationRuleFields';\nimport { actionsToApi, conditionsToApi } from '../automation/automationRuleTypes';\nimport { AUTOMATION_RULE_QUERIES } from '../controls/AutomationRuleControls';\n\nconst CREATE = gql`\n mutation CreateAutomationRule($input: PlanmagnetCreateAutomationRuleInput!) {\n planmagnetCreateAutomationRule(input: $input) {\n id\n }\n }\n`;\n\nconst EMPTY: AutomationRuleFormState = {\n name: '',\n description: '',\n projectId: '',\n triggerType: 'WORK_ITEM_CREATED',\n conditions: [],\n actions: [],\n};\n\nexport function AutomationCreateAutomationRulePagePage() {\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n const [form, setForm] = useState<AutomationRuleFormState>(EMPTY);\n const [error, setError] = useState<string | null>(null);\n const [create, { loading }] = useMutation<{ planmagnetCreateAutomationRule: { id: string } }>(\n CREATE,\n {\n refetchQueries: AUTOMATION_RULE_QUERIES,\n }\n );\n\n const canSubmit = form.name.trim() !== '' && form.projectId !== '' && !loading;\n\n const handleCreate = async () => {\n if (!canSubmit || !workspaceId) return;\n setError(null);\n try {\n const result = await throwOnError(\n create({\n variables: {\n input: {\n projectId: form.projectId,\n name: form.name.trim(),\n description: form.description.trim() || undefined,\n triggerType: form.triggerType,\n triggerConfig: {},\n conditions: conditionsToApi(form.conditions),\n actions: actionsToApi(form.actions),\n },\n },\n })\n );\n const id = result.data?.planmagnetCreateAutomationRule.id;\n navigate(\n id\n ? detailPath('/automation/automation-rule-detail-page', id)\n : '/automation/automation-rules-page'\n );\n } catch (e) {\n setError(e instanceof Error ? e.message : 'The rule could not be created.');\n }\n };\n\n return (\n <div className=\"space-y-6 p-6 max-w-3xl\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">New automation rule</h1>\n <p className=\"text-sm text-muted-foreground\">\n Runs its actions when the trigger fires and every condition matches.\n </p>\n </div>\n <div className=\"flex gap-2\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => navigate('/automation/automation-rules-page')}\n >\n <X className=\"mr-1 h-4 w-4\" />\n Cancel\n </Button>\n <Button\n size=\"sm\"\n onClick={() => void handleCreate()}\n disabled={!canSubmit}\n data-testid=\"automation-create-submit\"\n >\n <Save className=\"mr-1 h-4 w-4\" />\n {loading ? 'Creating…' : 'Create rule'}\n </Button>\n </div>\n </div>\n {error && (\n <div role=\"alert\" className=\"p-3 bg-destructive/10 text-destructive rounded-md text-sm\">\n {error}\n </div>\n )}\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <Bot className=\"h-4 w-4\" />\n Rule details\n </CardTitle>\n </CardHeader>\n <CardContent>\n <AutomationRuleFields form={form} onChange={setForm} />\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAeA,IAAM,IAAS,CAAG;;;;;;GAQZ,IAAiC;CACrC,MAAM;CACN,aAAa;CACb,WAAW;CACX,aAAa;CACb,YAAY,EAAE;CACd,SAAS,EAAE;CACZ;AAED,SAAgB,IAAyC;CACvD,IAAM,EAAE,mBAAgB,GAAe,EACjC,IAAW,GAAuB,EAClC,CAAC,GAAM,KAAW,EAAkC,EAAM,EAC1D,CAAC,GAAO,KAAY,EAAwB,KAAK,EACjD,CAAC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AER,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;IAAW,WAAU;cAArB,CACE,kBAAC,GAAD,EAAK,WAAU,WAAY,CAAA,EAAA,eAEjB;OACD,CAAA,EACb,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;IAA4B;IAAM,UAAU;IAAW,CAAA,EAC3C,CAAA,CACT,EAAA,CAAA;GACH"}
1
+ {"version":3,"file":"AutomationCreateAutomationRulePagePage.js","names":[],"sources":["../../../src/planmagnet/pages/AutomationCreateAutomationRulePagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useMutation } from '@apollo/client/react';\nimport { Button, Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { Bot, Save, X } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\nimport { throwOnError } from '../utils/mutationResult';\nimport { isForbidden, mutationErrorMessage } from '../utils/graphqlErrors';\nimport { detailPath } from '../utils/rowNavigation';\nimport {\n AutomationRuleFields,\n type AutomationRuleFormState,\n} from '../automation/AutomationRuleFields';\nimport {\n actionsToApi,\n conditionsToApi,\n saveBlockReason,\n scheduleConditionsToApi,\n} from '../automation/automationRuleTypes';\nimport { AUTOMATION_RULE_QUERIES } from '../controls/AutomationRuleControls';\n\nconst CREATE = gql`\n mutation CreateAutomationRule($input: PlanmagnetCreateAutomationRuleInput!) {\n planmagnetCreateAutomationRule(input: $input) {\n id\n }\n }\n`;\n\nconst EMPTY: AutomationRuleFormState = {\n name: '',\n description: '',\n projectId: '',\n triggerType: 'WORK_ITEM_CREATED',\n conditions: [],\n scheduleStatuses: [],\n scheduleNotUpdatedForDays: '',\n actions: [],\n};\n\nexport function AutomationCreateAutomationRulePagePage() {\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n const [form, setForm] = useState<AutomationRuleFormState>(EMPTY);\n const [error, setError] = useState<string | null>(null);\n const [create, { loading }] = useMutation<{ planmagnetCreateAutomationRule: { id: string } }>(\n CREATE,\n {\n refetchQueries: AUTOMATION_RULE_QUERIES,\n }\n );\n\n const blockReason = saveBlockReason(form);\n const canSubmit = form.name.trim() !== '' && form.projectId !== '' && !blockReason && !loading;\n\n const handleCreate = async () => {\n if (!canSubmit || !workspaceId) return;\n setError(null);\n try {\n const result = await throwOnError(\n create({\n variables: {\n input: {\n projectId: form.projectId,\n name: form.name.trim(),\n description: form.description.trim() || undefined,\n triggerType: form.triggerType,\n triggerConfig: {},\n conditions:\n form.triggerType === 'SCHEDULE'\n ? scheduleConditionsToApi(form.scheduleStatuses, form.scheduleNotUpdatedForDays)\n : conditionsToApi(form.conditions),\n actions: actionsToApi(form.actions),\n },\n },\n })\n );\n const id = result.data?.planmagnetCreateAutomationRule.id;\n navigate(\n id\n ? detailPath('/automation/automation-rule-detail-page', id)\n : '/automation/automation-rules-page'\n );\n } catch (e) {\n setError(\n isForbidden(e)\n ? 'Your role can view automation rules but not change them.'\n : mutationErrorMessage(e, 'The rule could not be created.')\n );\n }\n };\n\n return (\n <div className=\"space-y-6 p-6 max-w-3xl\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">New automation rule</h1>\n <p className=\"text-sm text-muted-foreground\">\n Runs its actions when the trigger fires and every condition matches.\n </p>\n </div>\n <div className=\"flex gap-2\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => navigate('/automation/automation-rules-page')}\n >\n <X className=\"mr-1 h-4 w-4\" />\n Cancel\n </Button>\n <Button\n size=\"sm\"\n onClick={() => void handleCreate()}\n disabled={!canSubmit}\n title={blockReason ?? undefined}\n data-testid=\"automation-create-submit\"\n >\n <Save className=\"mr-1 h-4 w-4\" />\n {loading ? 'Creating…' : 'Create rule'}\n </Button>\n </div>\n </div>\n {error && (\n <div role=\"alert\" className=\"p-3 bg-destructive/10 text-destructive rounded-md text-sm\">\n {error}\n </div>\n )}\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <Bot className=\"h-4 w-4\" />\n Rule details\n </CardTitle>\n </CardHeader>\n <CardContent>\n <AutomationRuleFields form={form} onChange={setForm} />\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAqBA,IAAM,IAAS,CAAG;;;;;;GAQZ,IAAiC;CACrC,MAAM;CACN,aAAa;CACb,WAAW;CACX,aAAa;CACb,YAAY,EAAE;CACd,kBAAkB,EAAE;CACpB,2BAA2B;CAC3B,SAAS,EAAE;CACZ;AAED,SAAgB,IAAyC;CACvD,IAAM,EAAE,mBAAgB,GAAe,EACjC,IAAW,GAAuB,EAClC,CAAC,GAAM,KAAW,EAAkC,EAAM,EAC1D,CAAC,GAAO,KAAY,EAAwB,KAAK,EACjD,CAAC,GAAQ,EAAE,gBAAa,EAC5B,GACA,EACE,gBAAgB,GACjB,CACF,EAEK,IAAc,EAAgB,EAAK,EACnC,IAAY,EAAK,KAAK,MAAM,KAAK,MAAM,EAAK,cAAc,MAAM,CAAC,KAAe,CAAC,GAEjF,IAAe,YAAY;AAC3B,SAAC,KAAa,CAAC,IACnB;KAAS,KAAK;AACd,OAAI;IAmBF,IAAM,KAlBS,MAAM,EACnB,EAAO,EACL,WAAW,EACT,OAAO;KACL,WAAW,EAAK;KAChB,MAAM,EAAK,KAAK,MAAM;KACtB,aAAa,EAAK,YAAY,MAAM,IAAI,KAAA;KACxC,aAAa,EAAK;KAClB,eAAe,EAAE;KACjB,YACE,EAAK,gBAAgB,aACjB,EAAwB,EAAK,kBAAkB,EAAK,0BAA0B,GAC9E,EAAgB,EAAK,WAAW;KACtC,SAAS,EAAa,EAAK,QAAQ;KACpC,EACF,EACF,CAAC,CACH,EACiB,MAAM,+BAA+B;AACvD,MACE,IACI,EAAW,2CAA2C,EAAG,GACzD,oCACL;YACM,GAAG;AACV,MACE,EAAY,EAAE,GACV,6DACA,EAAqB,GAAG,iCAAiC,CAC9D;;;;AAIL,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eAAyB;KAAwB,CAAA,EAC/D,kBAAC,KAAD;KAAG,WAAU;eAAgC;KAEzC,CAAA,CACA,EAAA,CAAA,EACN,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,GAAD;MACE,SAAQ;MACR,MAAK;MACL,eAAe,EAAS,oCAAoC;gBAH9D,CAKE,kBAAC,GAAD,EAAG,WAAU,gBAAiB,CAAA,EAAA,SAEvB;SACT,kBAAC,GAAD;MACE,MAAK;MACL,eAAe,KAAK,GAAc;MAClC,UAAU,CAAC;MACX,OAAO,KAAe,KAAA;MACtB,eAAY;gBALd,CAOE,kBAAC,GAAD,EAAM,WAAU,gBAAiB,CAAA,EAChC,IAAU,cAAc,cAClB;QACL;OACF;;GACL,KACC,kBAAC,OAAD;IAAK,MAAK;IAAQ,WAAU;cACzB;IACG,CAAA;GAER,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;IAAW,WAAU;cAArB,CACE,kBAAC,GAAD,EAAK,WAAU,WAAY,CAAA,EAAA,eAEjB;OACD,CAAA,EACb,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;IAA4B;IAAM,UAAU;IAAW,CAAA,EAC3C,CAAA,CACT,EAAA,CAAA;GACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"People.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/people/People.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,YAAY,EAElB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AA8Bf,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,QAAQ,GACT,EAAE;IACD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QA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,GAAG,SAAS,GAAG,YAAY,GAAG,IAAI,CAsBnF;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,eAAe,2CAQ5D;AAED,mFAAmF;AACnF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ/C;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,iBAAiB,2CAahE"}
@@ -2,33 +2,46 @@ import { createContext as e, useCallback as t, useContext as n, useEffect as r,
2
2
  import { jsx as o } from "react/jsx-runtime";
3
3
  import { buildActorFallback as s, useActorProfiles as c } from "@burdenoff/fe-libs/shared";
4
4
  //#region src/planmagnet/people/People.tsx
5
- var l = e(null);
6
- function u({ workspaceId: e, children: n }) {
7
- let [r, s] = a([]), u = t((e) => {
5
+ var l = {
6
+ "automation:engine": "Automation",
7
+ "automation:scheduler": "Automation"
8
+ }, u = e(null);
9
+ function d({ workspaceId: e, children: n }) {
10
+ let [r, s] = a([]), l = t((e) => {
8
11
  s((t) => t.includes(e) ? t : [...t, e]);
9
12
  }, []), d = c(i(() => r.map((e) => ({
10
13
  actorId: e,
11
14
  actorType: "user"
12
15
  })), [r]), { workspaceId: e }), f = i(() => ({
13
- request: u,
16
+ request: l,
14
17
  profiles: d
15
- }), [u, d]);
16
- return /* @__PURE__ */ o(l.Provider, {
18
+ }), [l, d]);
19
+ return /* @__PURE__ */ o(u.Provider, {
17
20
  value: f,
18
21
  children: n
19
22
  });
20
23
  }
21
- function d(e) {
22
- let t = n(l), i = t?.request;
24
+ function f(e) {
25
+ let t = n(u), i = t?.request, a = e ? l[e] : void 0;
23
26
  return r(() => {
24
- e && i && i(e);
25
- }, [e, i]), e ? t?.profiles[e] ?? s({
27
+ e && i && !a && i(e);
28
+ }, [
29
+ e,
30
+ i,
31
+ a
32
+ ]), e ? a ? {
33
+ actorId: e,
34
+ actorType: "service",
35
+ displayName: a,
36
+ secondaryLabel: "Automation",
37
+ resolved: !0
38
+ } : t?.profiles[e] ?? s({
26
39
  actorId: e,
27
40
  actorType: "user"
28
41
  }) : null;
29
42
  }
30
- function f({ id: e, className: t }) {
31
- let n = d(e);
43
+ function p({ id: e, className: t }) {
44
+ let n = f(e);
32
45
  return n ? /* @__PURE__ */ o("span", {
33
46
  className: t,
34
47
  title: n.email ?? void 0,
@@ -38,19 +51,19 @@ function f({ id: e, className: t }) {
38
51
  children: "—"
39
52
  });
40
53
  }
41
- function p(e) {
54
+ function m(e) {
42
55
  return e.trim().split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0].toUpperCase()).join("");
43
56
  }
44
- function m({ id: e, className: t }) {
45
- let n = d(e), r = n ? n.email ? `${n.displayName} (${n.email})` : n.displayName : void 0;
57
+ function h({ id: e, className: t }) {
58
+ let n = f(e), r = n ? n.email ? `${n.displayName} (${n.email})` : n.displayName : void 0;
46
59
  return /* @__PURE__ */ o("span", {
47
60
  className: t,
48
61
  title: r,
49
62
  "aria-label": r,
50
- children: (n?.resolved ? p(n.displayName) : "") || "?"
63
+ children: (n?.resolved ? m(n.displayName) : "") || "?"
51
64
  });
52
65
  }
53
66
  //#endregion
54
- export { u as PeopleProvider, m as PersonAvatar, f as PersonName, p as initialsOf, d as usePersonProfile };
67
+ export { d as PeopleProvider, h as PersonAvatar, p as PersonName, m as initialsOf, f as usePersonProfile };
55
68
 
56
69
  //# sourceMappingURL=People.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"People.js","names":[],"sources":["../../../src/planmagnet/people/People.tsx"],"sourcesContent":["import {\n buildActorFallback,\n useActorProfiles,\n type ActorInput,\n type ActorProfile,\n type ActorProfileMap,\n} from '@burdenoff/fe-libs/shared';\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n type ReactNode,\n} from 'react';\n\n/**\n * Show people by name, not by UUID.\n *\n * Until 2026-09-24, 21 places in this MFE rendered a raw user id where a\n * person belonged — project owners, roadmap owners, assignees, the team lead.\n * fe-libs already resolves ids to workspace-member identities\n * (`useActorProfiles`, with a 5-minute cache), but it batches per CALL and\n * does not dedupe across calls, so calling it from every row would fire a\n * burst of lookups on the first render of each list.\n *\n * So there is exactly one call, here. Every `<PersonName id>` on screen\n * registers its id with the provider; ids registered during the same render\n * land in one state update, and the provider resolves them together. A\n * growing list costs one request for the NEW ids only — already-resolved ids\n * come from the fe-libs cache.\n *\n * An id that cannot be resolved (not a member of this workspace, lookup\n * failed) renders fe-libs' short fallback, \"User 1a2b3c\", rather than the full\n * UUID: still identifiable, never a wall of hex.\n */\n\ninterface PeopleContextValue {\n request: (id: string) => void;\n profiles: ActorProfileMap;\n}\n\nconst PeopleContext = createContext<PeopleContextValue | null>(null);\n\nexport function PeopleProvider({\n workspaceId,\n children,\n}: {\n workspaceId?: string;\n children: ReactNode;\n}) {\n const [ids, setIds] = useState<readonly string[]>([]);\n\n const request = useCallback((id: string) => {\n setIds((previous) => (previous.includes(id) ? previous : [...previous, id]));\n }, []);\n\n const actors = useMemo<ActorInput[]>(\n () => ids.map((actorId) => ({ actorId, actorType: 'user' })),\n [ids]\n );\n\n // No apiGatewayUrl on purpose: this MFE is handed the WORKSPACE gateway, and\n // the hook resolves the right gateways from the hostname itself.\n const profiles = useActorProfiles(actors, { workspaceId });\n\n const value = useMemo(() => ({ request, profiles }), [request, profiles]);\n return <PeopleContext.Provider value={value}>{children}</PeopleContext.Provider>;\n}\n\nexport interface PersonNameProps {\n /** A user id. Empty or missing renders an em dash. */\n id: string | null | undefined;\n className?: string;\n}\n\n/**\n * Inline text on purpose. fe-libs' `ActorIdentity` is a block (avatar plus two\n * stacked paragraphs); every place this replaces is an inline label —\n * \"Owner: …\", a table cell, a <span> inside a <p> — where a block would break\n * the layout and nest a <div> inside a <p>. The email, when known, is the\n * hover title, so two people with the same name stay distinguishable.\n */\n/**\n * Register an id with the provider and return its profile: the resolved identity, or fe-libs' short fallback\n * (\"User 1a2b3c\", `resolved: false`) until and unless it resolves. `null` for an empty id.\n */\nexport function usePersonProfile(id: string | null | undefined): ActorProfile | null {\n const context = useContext(PeopleContext);\n const request = context?.request;\n\n useEffect(() => {\n if (id && request) request(id);\n }, [id, request]);\n\n if (!id) return null;\n return context?.profiles[id] ?? buildActorFallback({ actorId: id, actorType: 'user' });\n}\n\nexport function PersonName({ id, className }: PersonNameProps) {\n const profile = usePersonProfile(id);\n if (!profile) return <span className={className ?? 'text-muted-foreground'}>—</span>;\n return (\n <span className={className} title={profile.email ?? undefined}>\n {profile.displayName}\n </span>\n );\n}\n\n/** Up to two initials from a display name (\"Ada Lovelace\" → \"AL\", \"ada\" → \"A\"). */\nexport function initialsOf(name: string): string {\n return name\n .trim()\n .split(/\\s+/)\n .filter(Boolean)\n .slice(0, 2)\n .map((word) => word[0]!.toUpperCase())\n .join('');\n}\n\nexport interface PersonAvatarProps {\n id: string | null | undefined;\n className?: string;\n}\n\n/**\n * An initials bubble for a user id. Initials come from the RESOLVED name; until the id resolves (or when it never\n * does) the bubble shows a neutral \"?\" rather than letters cut from the UUID, which matched nobody (BOFF-7977,\n * BOFF-8000). The tooltip is the name, plus the email when known.\n */\nexport function PersonAvatar({ id, className }: PersonAvatarProps) {\n const profile = usePersonProfile(id);\n const label = profile\n ? profile.email\n ? `${profile.displayName} (${profile.email})`\n : profile.displayName\n : undefined;\n const initials = profile?.resolved ? initialsOf(profile.displayName) : '';\n return (\n <span className={className} title={label} aria-label={label}>\n {initials || '?'}\n </span>\n );\n}\n"],"mappings":";;;;AA2CA,IAAM,IAAgB,EAAyC,KAAK;AAEpE,SAAgB,EAAe,EAC7B,gBACA,eAIC;CACD,IAAM,CAAC,GAAK,KAAU,EAA4B,EAAE,CAAC,EAE/C,IAAU,GAAa,MAAe;AAC1C,KAAQ,MAAc,EAAS,SAAS,EAAG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ACR,CAAA"}
1
+ {"version":3,"file":"People.js","names":[],"sources":["../../../src/planmagnet/people/People.tsx"],"sourcesContent":["import {\n buildActorFallback,\n useActorProfiles,\n type ActorInput,\n type ActorProfile,\n type ActorProfileMap,\n} from '@burdenoff/fe-libs/shared';\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n type ReactNode,\n} from 'react';\n\n/**\n * Show people by name, not by UUID.\n *\n * Until 2026-09-24, 21 places in this MFE rendered a raw user id where a\n * person belonged — project owners, roadmap owners, assignees, the team lead.\n * fe-libs already resolves ids to workspace-member identities\n * (`useActorProfiles`, with a 5-minute cache), but it batches per CALL and\n * does not dedupe across calls, so calling it from every row would fire a\n * burst of lookups on the first render of each list.\n *\n * So there is exactly one call, here. Every `<PersonName id>` on screen\n * registers its id with the provider; ids registered during the same render\n * land in one state update, and the provider resolves them together. A\n * growing list costs one request for the NEW ids only — already-resolved ids\n * come from the fe-libs cache.\n *\n * An id that cannot be resolved (not a member of this workspace, lookup\n * failed) renders fe-libs' short fallback, \"User 1a2b3c\", rather than the full\n * UUID: still identifiable, never a wall of hex.\n */\n\ninterface PeopleContextValue {\n request: (id: string) => void;\n profiles: ActorProfileMap;\n}\n\n/**\n * The automation engine's own actor identities (BOFF-8047 follow-up) — never a real workspace member's id, so\n * they are mapped explicitly rather than sent through `useActorProfiles` (which would only ever resolve them to\n * its generic \"not a member\" fallback). Sourced directly from wspace-planmagnet-svc, not guessed:\n * - `automation-engine.ts`'s `AUTOMATION_COMMENT_AUTHOR_ID` (`'automation:engine'`) — the fixed author of every\n * comment a POST_COMMENT action posts, regardless of which trigger or actor caused the run.\n * - `automation-scheduler.ts`'s `AUTOMATION_SCHEDULER_ACTOR_ID` (`'automation:scheduler'`) — the actor behind a\n * SCHEDULE-triggered run (threaded through as `updatedBy` on that run's other actions).\n * No real actor id can ever collide with the `automation:` prefix (workspace-member ids are uuids) — see that\n * constant's own doc comment in the engine.\n */\nconst AUTOMATION_ACTOR_NAMES: Record<string, string> = {\n 'automation:engine': 'Automation',\n 'automation:scheduler': 'Automation',\n};\n\nconst PeopleContext = createContext<PeopleContextValue | null>(null);\n\nexport function PeopleProvider({\n workspaceId,\n children,\n}: {\n workspaceId?: string;\n children: ReactNode;\n}) {\n const [ids, setIds] = useState<readonly string[]>([]);\n\n const request = useCallback((id: string) => {\n setIds((previous) => (previous.includes(id) ? previous : [...previous, id]));\n }, []);\n\n const actors = useMemo<ActorInput[]>(\n () => ids.map((actorId) => ({ actorId, actorType: 'user' })),\n [ids]\n );\n\n // No apiGatewayUrl on purpose: this MFE is handed the WORKSPACE gateway, and\n // the hook resolves the right gateways from the hostname itself.\n const profiles = useActorProfiles(actors, { workspaceId });\n\n const value = useMemo(() => ({ request, profiles }), [request, profiles]);\n return <PeopleContext.Provider value={value}>{children}</PeopleContext.Provider>;\n}\n\nexport interface PersonNameProps {\n /** A user id. Empty or missing renders an em dash. */\n id: string | null | undefined;\n className?: string;\n}\n\n/**\n * Inline text on purpose. fe-libs' `ActorIdentity` is a block (avatar plus two\n * stacked paragraphs); every place this replaces is an inline label —\n * \"Owner: …\", a table cell, a <span> inside a <p> — where a block would break\n * the layout and nest a <div> inside a <p>. The email, when known, is the\n * hover title, so two people with the same name stay distinguishable.\n */\n/**\n * Register an id with the provider and return its profile: the resolved identity, or fe-libs' short fallback\n * (\"User 1a2b3c\", `resolved: false`) until and unless it resolves. `null` for an empty id.\n */\nexport function usePersonProfile(id: string | null | undefined): ActorProfile | null {\n const context = useContext(PeopleContext);\n const request = context?.request;\n const automationName = id ? AUTOMATION_ACTOR_NAMES[id] : undefined;\n\n useEffect(() => {\n // An automation identity is never a real workspace member — registering it with the provider would only\n // ever come back as the generic \"not a member\" fallback, and would cost a wasted slot in every batch lookup.\n if (id && request && !automationName) request(id);\n }, [id, request, automationName]);\n\n if (!id) return null;\n if (automationName) {\n return {\n actorId: id,\n actorType: 'service',\n displayName: automationName,\n secondaryLabel: 'Automation',\n resolved: true,\n };\n }\n return context?.profiles[id] ?? buildActorFallback({ actorId: id, actorType: 'user' });\n}\n\nexport function PersonName({ id, className }: PersonNameProps) {\n const profile = usePersonProfile(id);\n if (!profile) return <span className={className ?? 'text-muted-foreground'}>—</span>;\n return (\n <span className={className} title={profile.email ?? undefined}>\n {profile.displayName}\n </span>\n );\n}\n\n/** Up to two initials from a display name (\"Ada Lovelace\" → \"AL\", \"ada\" → \"A\"). */\nexport function initialsOf(name: string): string {\n return name\n .trim()\n .split(/\\s+/)\n .filter(Boolean)\n .slice(0, 2)\n .map((word) => word[0]!.toUpperCase())\n .join('');\n}\n\nexport interface PersonAvatarProps {\n id: string | null | undefined;\n className?: string;\n}\n\n/**\n * An initials bubble for a user id. Initials come from the RESOLVED name; until the id resolves (or when it never\n * does) the bubble shows a neutral \"?\" rather than letters cut from the UUID, which matched nobody (BOFF-7977,\n * BOFF-8000). The tooltip is the name, plus the email when known.\n */\nexport function PersonAvatar({ id, className }: PersonAvatarProps) {\n const profile = usePersonProfile(id);\n const label = profile\n ? profile.email\n ? `${profile.displayName} (${profile.email})`\n : profile.displayName\n : undefined;\n const initials = profile?.resolved ? initialsOf(profile.displayName) : '';\n return (\n <span className={className} title={label} aria-label={label}>\n {initials || '?'}\n </span>\n );\n}\n"],"mappings":";;;;AAsDA,IAAM,IAAiD;CACrD,qBAAqB;CACrB,wBAAwB;CACzB,EAEK,IAAgB,EAAyC,KAAK;AAEpE,SAAgB,EAAe,EAC7B,gBACA,eAIC;CACD,IAAM,CAAC,GAAK,KAAU,EAA4B,EAAE,CAAC,EAE/C,IAAU,GAAa,MAAe;AAC1C,KAAQ,MAAc,EAAS,SAAS,EAAG,GAAG,IAAW,CAAC,GAAG,GAAU,EAAG,CAAE;IAC3E,EAAE,CAAC,EASA,IAAW,EAPF,QACP,EAAI,KAAK,OAAa;EAAE;EAAS,WAAW;EAAQ,EAAE,EAC5D,CAAC,EAAI,CACN,EAIyC,EAAE,gBAAa,CAAC,EAEpD,IAAQ,SAAe;EAAE;E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magnet",
3
- "version": "2026.930.20",
3
+ "version": "2026.930.21",
4
4
  "description": "Burdenoff PlanMagnet Microfrontend",
5
5
  "type": "module",
6
6
  "files": [