Repository navigation
feat(seer): Add out-of-credits notification for Autofix - #130270
Closed
alexsohn1126 wants to merge 3 commits into
Closed
alexsohn1126 wants to merge 3 commits into
alexsohn1126 wants to merge 3 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding out of credits notification template for Autofix.
🤖 generated description below:
This adds SeerOutOfCredits, a new notification on the notification platform. It tells a user that their org doesn't have enough Seer credits to continue an Autofix run. It isn't tied to Slack, so any provider can render it. It has one copy for now: "Your org does not have enough credits to continue your Autofix run. Set up auto top up to keep your flow uninterrupted." It also has a
startedflag: false when someone tried to start Seer without credits, true when a run ran out partway through. Both cases show the same text today, and the flag lets the two messages diverge later without changing callers. The Slack renderer gets a branch that renders it.It also adds two pieces the Slack renderer uses to hide the next-step button on an autofix update.
SeerAutofixUpdate.next_seer_stopping_pointis the Seer step the next-step button would start. It is None for the root-cause handoff button and when there is no next step.SeerAutofixUpdate.has_credits_for_next_stepsays whether the org can pay for that step. It defaults to True, so tasks already in the queue keep working. The renderer shows the next-step button only when both are set. The handoff button is unchanged.Nothing sends SeerOutOfCredits or sets has_credits_for_next_step to False yet, so this changes no behavior on its own. #130271, stacked on this PR, does the wiring: the credit checks, the out-of-credits reply when someone clicks a button, and the Slack entrypoint changes.
Refs CW-2329