Skip to content

Commit f22df38

Browse files
committed
fix(slack): scope compact plan suppression
1 parent cae664d commit f22df38

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

‎extensions/slack/src/monitor/message-handler/dispatch-progress.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,11 @@ export function createSlackProgressRuntime(runtimeParams: {
130130
};
131131
const progressWorkCounter = createChannelProgressWorkCounter();
132132
const progressSeed = `${account.accountId}:${message.channel}`;
133+
const slackProgressStyle = resolveSlackProgressStyle(account.config);
133134
// THIS BEHAVIOR IS INTENTIONAL AND MUST NOT BE CASUALLY ADJUSTED.
134135
// DO NOT CHANGE THIS WITHOUT APPROVAL FROM SJF OR PASHPASHPASH.
135136
const useDraftProgressCard =
136-
Boolean(draftStream) && isProgressMode && resolveSlackProgressStyle(account.config) === "card";
137+
Boolean(draftStream) && isProgressMode && slackProgressStyle === "card";
137138
const explicitProgressTitle = resolveExplicitSlackProgressTitle(account.config);
138139
const progressDraftMaxLineChars = resolveChannelProgressDraftMaxLineChars(account.config);
139140
const progressCard = createSlackDraftProgressCardRuntime({
@@ -464,6 +465,9 @@ export function createSlackProgressRuntime(runtimeParams: {
464465

465466
const pushPlanProgress = async (steps?: AgentPlanStep[], explanation?: string) => {
466467
if (isProgressMode) {
468+
if (slackProgressStyle === "compact") {
469+
return false;
470+
}
467471
return await progressDraft.pushPlanProgress(steps, { explanation });
468472
}
469473
if (previewToolProgressSuppressed || !draftStream) {

‎src/channels/progress-draft-compositor.test.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ describe("createChannelProgressDraftCompositor", () => {
7070
expect(update).toHaveBeenLastCalledWith("🛠️ Next", expect.anything());
7171
});
7272

73-
it("hides plan task progress when tool progress is disabled", async () => {
73+
it("keeps plan task progress independent from tool progress", async () => {
7474
const update = vi.fn();
7575
const progress = createTestProgressDraftCompositor({
7676
entry: {
@@ -86,8 +86,11 @@ describe("createChannelProgressDraftCompositor", () => {
8686
await progress.pushPlanProgress([{ step: "Patch", status: "in_progress" }], {
8787
explanation: "Applying the change.",
8888
}),
89-
).toBe(false);
90-
expect(update).not.toHaveBeenCalled();
89+
).toBe(true);
90+
expect(update).toHaveBeenLastCalledWith("Applying the change.\n\n▸ Patch", {
91+
flush: true,
92+
lines: [],
93+
});
9194
});
9295

9396
it("publishes partial-preview tool lines without enabling progress-only plans", async () => {

‎src/channels/progress-draft-compositor.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ export function createChannelProgressDraftCompositor(params: {
517517
if (
518518
!params.active ||
519519
params.mode !== "progress" ||
520-
!previewToolProgressEnabled ||
521520
progressSuppressed ||
522521
finalReplyStarted ||
523522
finalReplyDelivered

0 commit comments

Comments
 (0)