Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(control-ui): enable the messages tab so a manifest app can be DMed
Jose Ramirezf80c1efa284f
diff --git a/control-ui/lib/__tests__/slackAppManifest.test.ts b/control-ui/lib/__tests__/slackAppManifest.test.tsindex 1fbbaac0d..4b6e43a89 100644--- a/control-ui/lib/__tests__/slackAppManifest.test.ts+++ b/control-ui/lib/__tests__/slackAppManifest.test.ts@@ -120,6 +120,32 @@ describe('slackAppManifest', () => {})})+describe('slackAppManifest — direct messages', () => {+ const yaml = slackAppManifest('Evenfire', URL)++ // Slack defaults messages_tab_enabled to false, and an app installed from a+ // manifest that says nothing about app_home has DMs switched off: the member+ // sees "Sending messages to this app has been turned off." That breaks the+ // documented enrolment path, which tells people to send `verify 123456` as a+ // DM, and it contradicts this same manifest asking for im:history and im:read.+ it('enables the messages tab so the app can be DMed', () => {+ expect(yaml).toContain('app_home:')+ expect(yaml).toMatch(/messages_tab_enabled:\s*true/)+ })++ it('does not make the messages tab read-only', () => {+ // Read-only leaves the tab visible but still refuses the member's message,+ // which looks identical to the bug it is meant to fix.+ expect(yaml).toMatch(/messages_tab_read_only_enabled:\s*false/)+ })++ it('keeps the DM scopes it already requests meaningful', () => {+ const scopes = listItemsUnder(yaml, 'bot:')+ expect(scopes).toContain('im:history')+ expect(scopes).toContain('im:read')+ })+})+describe('canGenerateSlackAppManifest', () => {it('accepts an absolute request URL', () => {expect(canGenerateSlackAppManifest(URL)).toBe(true)diff --git a/control-ui/lib/slackAppManifest.ts b/control-ui/lib/slackAppManifest.tsindex 4aa434e3b..cda216752 100644--- a/control-ui/lib/slackAppManifest.ts+++ b/control-ui/lib/slackAppManifest.ts@@ -61,6 +61,10 @@ export function slackAppManifest(appName: string, requestUrl: string): string {return `display_information:name: ${name}features:+ app_home:+ home_tab_enabled: false+ messages_tab_enabled: true+ messages_tab_read_only_enabled: falsebot_user:display_name: ${name}always_online: falsediff --git a/control-ui/package-lock.json b/control-ui/package-lock.jsonindex 619afc85c..237030c69 100644--- a/control-ui/package-lock.json+++ b/control-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-ui",- "version": "0.1.411",+ "version": "0.1.412","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-ui",- "version": "0.1.411",+ "version": "0.1.412","dependencies": {"@clerum/llm-providers": "file:../packages/llm-providers","@clerum/workflow-recipe-capability-policy": "file:../packages/workflow-recipe-capability-policy",diff --git a/control-ui/package.json b/control-ui/package.jsonindex f0af4d4bc..21eff9373 100644--- a/control-ui/package.json+++ b/control-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-ui",- "version": "0.1.411",+ "version": "0.1.412","private": true,"scripts": {"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",