The open-source app everyone uses to manage agents at work
TypeScript acpxagent-orchestrationagent-skillsagentic-aiai-agentsai-engineeringai-governanceai-toolsautonomous-agentsclaudeclaude-codeclaude-skillscodexhermesllmmcpmulti-agentopenclawproject-managementworkflow-automation
fix(ui): use issuePrefix instead of name-derived prefix in create dialog badges (#8550)
Hardik Dholariya3b74ff481377
diff --git a/ui/src/components/NewGoalDialog.tsx b/ui/src/components/NewGoalDialog.tsxindex a589cfae8d..a41ea3e4e5 100644--- a/ui/src/components/NewGoalDialog.tsx+++ b/ui/src/components/NewGoalDialog.tsx@@ -124,7 +124,7 @@ export function NewGoalDialog() {<div className="flex items-center gap-2 text-sm text-muted-foreground">{selectedCompany && (<span className="bg-muted px-1.5 py-0.5 rounded text-xs font-medium">- {selectedCompany.name.slice(0, 3).toUpperCase()}+ {selectedCompany.issuePrefix}</span>)}<span className="text-muted-foreground/60">›</span>diff --git a/ui/src/components/NewIssueDialog.test.tsx b/ui/src/components/NewIssueDialog.test.tsxindex 5b11679b0f..a41c886b2a 100644--- a/ui/src/components/NewIssueDialog.test.tsx+++ b/ui/src/components/NewIssueDialog.test.tsx@@ -1362,4 +1362,35 @@ describe("NewIssueDialog", () => {act(() => root.unmount());});});++ describe("PAP-8501: company badge shows issuePrefix", () => {+ it("displays issuePrefix instead of name-derived prefix", async () => {+ // Override company data to have mismatched name/prefix+ companyState.companies = [+ {+ id: "company-1",+ name: "Acme Labs",+ status: "active",+ brandColor: "#123456",+ issuePrefix: "OPS",+ },+ ];+ companyState.selectedCompany = {+ id: "company-1",+ name: "Acme Labs",+ status: "active",+ brandColor: "#123456",+ issuePrefix: "OPS",+ };++ const { root } = renderDialog(container);+ await waitForAssertion(() => {+ const text = container.textContent ?? "";+ // Should show OPS (issuePrefix), not ACM (name.slice(0,3))+ expect(text).toContain("OPS");+ });++ act(() => root.unmount());+ });+ });});diff --git a/ui/src/components/NewIssueDialog.tsx b/ui/src/components/NewIssueDialog.tsxindex 35d1f627ba..8c88565239 100644--- a/ui/src/components/NewIssueDialog.tsx+++ b/ui/src/components/NewIssueDialog.tsx@@ -1336,7 +1336,7 @@ export function NewIssueDialog() {: undefined}>- {(dialogCompany?.name ?? "").slice(0, 3).toUpperCase()}+ {dialogCompany?.issuePrefix ?? ""}</button></PopoverTrigger><PopoverContent className="w-48 p-1" align="start">@@ -1366,7 +1366,7 @@ export function NewIssueDialog() {: undefined}>- {c.name.slice(0, 3).toUpperCase()}+ {c.issuePrefix}</span><span className="truncate">{c.name}</span></button>diff --git a/ui/src/components/NewProjectDialog.tsx b/ui/src/components/NewProjectDialog.tsxindex f7268c4d43..7bb3158f7d 100644--- a/ui/src/components/NewProjectDialog.tsx+++ b/ui/src/components/NewProjectDialog.tsx@@ -219,7 +219,7 @@ export function NewProjectDialog() {<div className="flex items-center gap-2 text-sm text-muted-foreground">{selectedCompany && (<span className="bg-muted px-1.5 py-0.5 rounded text-xs font-medium">- {selectedCompany.name.slice(0, 3).toUpperCase()}+ {selectedCompany.issuePrefix}</span>)}<span className="text-muted-foreground/60">›</span>