Skip to content

Commit c24ea3c

Browse files
author
IM.codes
committed
Remove shallow default Team combos
1 parent 96f0ccd commit c24ea3c

3 files changed

Lines changed: 19 additions & 12 deletions

File tree

shared/p2p-modes.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,6 @@ export interface P2pComboPreset {
306306

307307
export const COMBO_PRESETS: P2pComboPreset[] = [
308308
{ key: 'brainstorm>discuss>plan', pipeline: ['brainstorm', 'discuss', 'plan'] },
309-
{ key: 'audit>plan', pipeline: ['audit', 'plan'] },
310-
{ key: 'review>plan', pipeline: ['review', 'plan'] },
311309
{ key: 'audit>review>plan', pipeline: ['audit', 'review', 'plan'] },
312310
];
313311

test/daemon/p2p-config-mode.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,13 @@ describe('COMBO_PRESETS', () => {
324324
expect(presetKeys).not.toContain('brainstorm>plan');
325325
});
326326

327+
it('omits shallow two-step presets from the default combo list', () => {
328+
const presetKeys = COMBO_PRESETS.map((preset) => preset.key);
329+
expect(presetKeys).not.toContain('audit>plan');
330+
expect(presetKeys).not.toContain('review>plan');
331+
expect(COMBO_PRESETS.every((preset) => preset.pipeline.length >= 3)).toBe(true);
332+
});
333+
327334
it('all presets have valid mode keys in their pipeline', () => {
328335
for (const preset of COMBO_PRESETS) {
329336
for (const modeKey of preset.pipeline) {

web/test/components/SessionControls.test.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ afterEach(() => {
752752
input.textContent = 'run combo';
753753
fireEvent.input(input);
754754
fireEvent.click(screen.getByRole('button', { name: /^team$/i }));
755-
fireEvent.click(screen.getByText(/mode_auditmode_plan/i));
755+
fireEvent.click(screen.getByText(/mode_auditmode_reviewmode_plan/i));
756756

757757
expect(screen.getByText('combo_send_confirm_title')).toBeDefined();
758758
expect(screen.getAllByRole('button', { name: /^send$/i }).length).toBeGreaterThanOrEqual(1);
@@ -768,7 +768,7 @@ afterEach(() => {
768768
input.textContent = 'run combo';
769769
fireEvent.input(input);
770770
fireEvent.click(screen.getByRole('button', { name: /^team$/i }));
771-
fireEvent.click(screen.getByText(/mode_auditmode_plan/i));
771+
fireEvent.click(screen.getByText(/mode_auditmode_reviewmode_plan/i));
772772

773773
expect(screen.getByText('combo_send_confirm_title')).toBeDefined();
774774
expect(ws.sendSessionCommand).not.toHaveBeenCalled();
@@ -812,7 +812,7 @@ afterEach(() => {
812812
fireEvent.click(screen.getByRole('button', { name: /^team$/i }));
813813

814814
expect(screen.getByText('combo_requires_participants_hint')).toBeDefined();
815-
const comboBtn = screen.getByRole('button', { name: /mode_auditmode_plan/i }) as HTMLButtonElement;
815+
const comboBtn = screen.getByRole('button', { name: /mode_auditmode_reviewmode_plan/i }) as HTMLButtonElement;
816816
expect(comboBtn.disabled).toBe(true);
817817
expect(comboBtn.title).toBe('combo_requires_participants_hint');
818818
});
@@ -923,7 +923,9 @@ afterEach(() => {
923923
expect(screen.queryByText(/^mode_brainstorm$/i)).toBeNull();
924924
expect(screen.queryByText(/^mode_discuss$/i)).toBeNull();
925925
expect(screen.queryByText(/^mode_config$/i)).toBeNull();
926-
expect(screen.getByText(/mode_auditmode_plan/i)).toBeDefined();
926+
expect(screen.queryByText(/^mode_auditmode_plan$/i)).toBeNull();
927+
expect(screen.queryByText(/^mode_reviewmode_plan$/i)).toBeNull();
928+
expect(screen.getByText(/mode_auditmode_reviewmode_plan/i)).toBeDefined();
927929
});
928930

929931
it('puts the global rounds selector at the top of the P2P dropdown and saves changes', async () => {
@@ -982,7 +984,7 @@ afterEach(() => {
982984
input.textContent = 'first combo';
983985
fireEvent.input(input);
984986
fireEvent.click(screen.getByRole('button', { name: /^team$/i }));
985-
fireEvent.click(screen.getByText(/mode_auditmode_plan/i));
987+
fireEvent.click(screen.getByText(/mode_auditmode_reviewmode_plan/i));
986988

987989
const dialog = screen.getByText('combo_send_confirm_title').closest('.dialog') as HTMLElement;
988990
fireEvent.click(within(dialog).getByRole('checkbox'));
@@ -994,7 +996,7 @@ afterEach(() => {
994996
p2pAtTargets: [
995997
{ session: '__all__', mode: 'config' },
996998
],
997-
p2pMode: 'audit>plan',
999+
p2pMode: 'audit>review>plan',
9981000
p2pSessionConfig: {
9991001
'my-session': { enabled: true, mode: 'audit' },
10001002
},
@@ -1006,7 +1008,7 @@ afterEach(() => {
10061008
input.textContent = 'second combo';
10071009
fireEvent.input(input);
10081010
fireEvent.click(screen.getByRole('button', { name: /^team$/i }));
1009-
fireEvent.click(screen.getByText(/mode_auditmode_plan/i));
1011+
fireEvent.click(screen.getByText(/mode_auditmode_reviewmode_plan/i));
10101012

10111013
expect(screen.queryByText('combo_send_confirm_title')).toBeNull();
10121014
expectLastSendPayload(ws, {
@@ -1015,7 +1017,7 @@ afterEach(() => {
10151017
p2pAtTargets: [
10161018
{ session: '__all__', mode: 'config' },
10171019
],
1018-
p2pMode: 'audit>plan',
1020+
p2pMode: 'audit>review>plan',
10191021
p2pSessionConfig: {
10201022
'my-session': { enabled: true, mode: 'audit' },
10211023
},
@@ -1034,7 +1036,7 @@ afterEach(() => {
10341036
fireEvent.input(input);
10351037

10361038
fireEvent.click(screen.getByRole('button', { name: /^team$/i }));
1037-
fireEvent.click(screen.getByText(/mode_auditmode_plan/i));
1039+
fireEvent.click(screen.getByText(/mode_auditmode_reviewmode_plan/i));
10381040

10391041
const dialog = screen.getByText('combo_send_confirm_title').closest('.dialog') as HTMLElement;
10401042
fireEvent.click(within(dialog).getByRole('button', { name: /^send$/i }));
@@ -1045,7 +1047,7 @@ afterEach(() => {
10451047
p2pAtTargets: [
10461048
{ session: '__all__', mode: 'config' },
10471049
],
1048-
p2pMode: 'audit>plan',
1050+
p2pMode: 'audit>review>plan',
10491051
p2pSessionConfig: {
10501052
'my-session': { enabled: true, mode: 'audit' },
10511053
},

0 commit comments

Comments
 (0)