Skip to content

fix(seer-slack): Allow clicks on existing runs to handle gracefully#108175

Merged
leeandher merged 9 commits intomasterfrom
leanderrodrigues/iswf-2090-allow-clicks-to-just-check-autofix-run-state-for-now
Feb 13, 2026
Merged

fix(seer-slack): Allow clicks on existing runs to handle gracefully#108175
leeandher merged 9 commits intomasterfrom
leanderrodrigues/iswf-2090-allow-clicks-to-just-check-autofix-run-state-for-now

Conversation

@leeandher
Copy link
Member

Editing the messages has caused some issues, and we cannot set the 'is being automated' state with confidence since seer makes its own determination to change outgoing messages.

Instead, we'll just attach the green button if autofix is available and they have the feature, then if a run is in progress, let the user know. Will look into editing messages in a follow up, but this feels like a better UX.

@linear
Copy link

linear bot commented Feb 12, 2026

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 12, 2026
@leeandher leeandher force-pushed the leanderrodrigues/iswf-2090-allow-clicks-to-just-check-autofix-run-state-for-now branch from 84e9f33 to 5c20a7c Compare February 12, 2026 23:18
@leeandher leeandher force-pushed the leanderrodrigues/iswf-2090-allow-clicks-to-just-check-autofix-run-state-for-now branch from ff3b563 to ff5f777 Compare February 12, 2026 23:34
@leeandher leeandher marked this pull request as ready for review February 12, 2026 23:36
@leeandher leeandher requested review from a team as code owners February 12, 2026 23:36
@leeandher leeandher force-pushed the leanderrodrigues/iswf-2090-allow-clicks-to-just-check-autofix-run-state-for-now branch from ff5f777 to bbf7496 Compare February 12, 2026 23:45
@leeandher leeandher force-pushed the leanderrodrigues/iswf-2090-allow-clicks-to-just-check-autofix-run-state-for-now branch from 6d73b5f to 2d4edc2 Compare February 13, 2026 00:35
@leeandher leeandher force-pushed the leanderrodrigues/iswf-2090-allow-clicks-to-just-check-autofix-run-state-for-now branch from 2d4edc2 to d99bc19 Compare February 13, 2026 00:53
@leeandher leeandher force-pushed the leanderrodrigues/iswf-2090-allow-clicks-to-just-check-autofix-run-state-for-now branch from d99bc19 to 695913c Compare February 13, 2026 01:01
Base automatically changed from leander/restructure to master February 13, 2026 14:24
@leeandher leeandher requested a review from a team as a code owner February 13, 2026 14:24
@leeandher leeandher force-pushed the leanderrodrigues/iswf-2090-allow-clicks-to-just-check-autofix-run-state-for-now branch from 695913c to 3ff435b Compare February 13, 2026 14:43
leeandher and others added 9 commits February 13, 2026 12:53
…runs

When a user clicks an autofix button, check if a run already exists for
the group. If one is still processing, update the Slack message to
reflect the current state instead of starting a duplicate run. Also
distinguish completed vs in-progress stages in the UI and always show
the issue link button.

Refs ISWF-2090
Co-Authored-By: Claude <noreply@anthropic.com>
…lean

Refactor the existing autofix state check to return the actual step
dict rather than a has_complete_stage boolean. This simplifies the
logic and prevents re-runs over Slack which cause confusing UX when
messages can't be reliably edited. Also update completed text to
indicate the stage has "already" been completed.

Co-Authored-By: Claude <noreply@anthropic.com>
Also match root_cause_analysis_processing and solution_processing
step keys when checking existing autofix state, and treat them as
incomplete stages. Use None as the next() default to match the
dict | None return type annotation.

Co-Authored-By: Claude <noreply@anthropic.com>
@leeandher leeandher force-pushed the leanderrodrigues/iswf-2090-allow-clicks-to-just-check-autofix-run-state-for-now branch from ef2b28c to d4636b2 Compare February 13, 2026 17:53
Copy link
Contributor

@Christinarlong Christinarlong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code makes sense, cursor comments look valid too

Comment on lines +130 to +162
try:
existing_state = get_autofix_state(
group_id=group.id, organization_id=group.organization.id
)
except Exception as e:
with SeerOperatorEventLifecycleMetric(
interaction_type=SeerOperatorInteractionType.ENTRYPOINT_ON_TRIGGER_AUTOFIX_ERROR,
entrypoint_key=self.entrypoint.key,
).capture():
self.entrypoint.on_trigger_autofix_error(
error="Encountered an error while talking to Seer"
)
lifecycle.record_failure(failure_reason=e)
return
if existing_state:
stopping_point_step = get_stopping_point_status(stopping_point, existing_state)
lifecycle.add_extras(
{
"existing_run_id": str(existing_state.run_id),
"existing_run_status": str(existing_state.status),
}
)
# For now, we don't support re-runs over slack -- it causes a confusing UX without
# reliably being able to edit messages.
if stopping_point_step:
with SeerOperatorEventLifecycleMetric(
interaction_type=SeerOperatorInteractionType.ENTRYPOINT_ON_TRIGGER_AUTOFIX_ALREADY_EXISTS,
entrypoint_key=self.entrypoint.key,
).capture():
self.entrypoint.on_trigger_autofix_already_exists(
state=existing_state, step_state=stopping_point_step
)
return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dang I wonder if this could be some pipeline or someway to better separate out the state shifting nature.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when it was 2 states (error, success) it felt okay, now we have 3, and i imagine it will only grow, so I'm actually very open to restructuring 💯 i would need to think it through some more though, maybe for the next milestone

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@leeandher leeandher merged commit 45efed8 into master Feb 13, 2026
75 checks passed
@leeandher leeandher deleted the leanderrodrigues/iswf-2090-allow-clicks-to-just-check-autofix-run-state-for-now branch February 13, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants