diff --git a/src/commands/integration/slack-channels.ts b/src/commands/integration/slack-channels.ts index 86471c5..b6e4703 100644 --- a/src/commands/integration/slack-channels.ts +++ b/src/commands/integration/slack-channels.ts @@ -84,7 +84,7 @@ export function pickerOptions( } export function pickerMessage(selected: SlackChannelRef[]): string { - if (selected.length === 0) return 'Which public channels should Polylane join?'; + if (selected.length === 0) return 'Where do you triage and discuss incidents?'; return `Selected: ${selected.map((c) => `#${c.name}`).join(', ')}. Add another public channel, or Done.`; } diff --git a/test/integration-connect-slack-channels.test.ts b/test/integration-connect-slack-channels.test.ts index 3fee057..7fa69e9 100644 --- a/test/integration-connect-slack-channels.test.ts +++ b/test/integration-connect-slack-channels.test.ts @@ -63,10 +63,17 @@ describe('pickerMessage', () => { SLACK_CHANNEL_PICKER_NOTE, 'Find and add public channels here. For private channels, invite @Polylane from the channel in Slack.' ); - assert.equal(pickerMessage([]), 'Which public channels should Polylane join?'); + assert.equal(pickerMessage([]), 'Where do you triage and discuss incidents?'); assert.match(pickerMessage([{ id: 'C1', name: 'alerts' }, { id: 'C2', name: 'deploys' }]), /#alerts, #deploys/); }); + it('keeps repeated-selection wording after a choice', () => { + assert.equal( + pickerMessage([{ id: 'C1', name: 'alerts' }, { id: 'C2', name: 'deploys' }]), + 'Selected: #alerts, #deploys. Add another public channel, or Done.' + ); + }); + it('keeps empty and no-match states scoped to public channels without repeating the note', () => { assert.equal(NO_SLACK_CHANNELS_LINE, 'No public Slack channels are available here.'); assert.equal(noSlackChannelMatchesLine('infra'), 'No public Slack channel matching "infra" is available here.');