diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 4ad141962..0b429abec 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -33,8 +33,8 @@ "sendNames": { "type": "boolean", "title": "Send task names", - "default": true, - "description": "Send each task's name (its name in the Claude Code sidebar, or its first prompt) to the webhook. Off: the board shows the task without a name." + "default": false, + "description": "Send each task's name (its name in the Claude Code sidebar, or its first prompt) to the webhook. Off by default: the board shows the task without a name." } } } diff --git a/hooks/band/register.tsx b/hooks/band/register.tsx index b57bf830a..022f2f7c3 100644 --- a/hooks/band/register.tsx +++ b/hooks/band/register.tsx @@ -167,7 +167,7 @@ async function record($: EngineInterface, b: Band, options: Options) { const url = typeof options.webhookUrl === 'string' ? options.webhookUrl.trim() : '' if (url !== '') { const token = typeof options.webhookToken === 'string' ? options.webhookToken.trim() : '' - const request = webhookRequest(url, token, options.sendNames !== false, row) + const request = webhookRequest(url, token, options.sendNames === true, row) if ('refused' in request) { $.ui.status(`ponytail band: ${request.refused}`) return diff --git a/tests/band-webhook-names.test.js b/tests/band-webhook-names.test.js new file mode 100644 index 000000000..d1b305f4c --- /dev/null +++ b/tests/band-webhook-names.test.js @@ -0,0 +1,17 @@ +#!/usr/bin/env node +// The webhook gets no task names unless the user turns them on. + +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); + +const root = path.join(__dirname, '..'); + +const plugin = JSON.parse(fs.readFileSync(path.join(root, '.claude-plugin', 'plugin.json'), 'utf8')); +assert.strictEqual(plugin.userConfig.sendNames.default, false, 'sendNames is off by default'); + +const register = fs.readFileSync(path.join(root, 'hooks', 'band', 'register.tsx'), 'utf8'); +assert.ok(register.includes('options.sendNames === true'), 'an unset sendNames sends no names'); +assert.ok(!register.includes('options.sendNames !== false'), 'an unset sendNames must not count as on'); + +console.log('ok');