Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(app, api-client, shared-data): Set command intent to "fixit" #15119

Merged
merged 2 commits into from
May 8, 2024

Conversation

mjhuff
Copy link
Contributor

@mjhuff mjhuff commented May 7, 2024

Closes EXEC-431

Overview

Before we can POST fixit commands during Error Recovery flows, we need to refactor useChainRunCommands to support sending the params necessary to POST a fixit command. In addition to a normal CreateCommand, this requires sending:

  • A failedCommandId
  • An explicit fixit intent

Because the FE never explicitly sets intent in the app until now, it feels correct to keep the intent: fixit logic abstracted when creating a new command from the app. Open to thoughts/comments/concerns.

Test Plan

  • We're covered by new tests and there are no effective changes. However, here is a branch with a working 'home' command during ER when you click "resume". You'll have to enable the backend & frontend FFs for this to work.

Review requests

Are the shared-data types changes correct?

Risk assessment

low

mjhuff added 2 commits May 7, 2024 09:59
…to support FIXIT commands

useChainRunCommands takes an optional parameter, the failedCommandId, and implictly sends a command
with a FIXIT intent if present.
@mjhuff mjhuff requested review from sfoster1, TamarZanzouri and a team May 7, 2024 19:01
@mjhuff mjhuff requested review from a team as code owners May 7, 2024 19:01
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

I think this is the right way to go, yeah. I'd be open to having a second function or something but I think this is a lot better.

@mjhuff mjhuff merged commit 0e7b29a into edge May 8, 2024
48 checks passed
@mjhuff mjhuff deleted the visit-command-intent-if-errored branch May 8, 2024 14:42
Carlos-fernandez pushed a commit that referenced this pull request May 20, 2024
…#15119)

Closes EXEC-431

Before we can POST fixit commands during Error Recovery flows, we need to refactor useChainRunCommands to support sending the params necessary to POST a fixit command. In addition to a normal CreateCommand, this requires sending:

* A failedCommandId
* An explicit fixit intent
Carlos-fernandez pushed a commit that referenced this pull request Jun 3, 2024
…#15119)

Closes EXEC-431

Before we can POST fixit commands during Error Recovery flows, we need to refactor useChainRunCommands to support sending the params necessary to POST a fixit command. In addition to a normal CreateCommand, this requires sending:

* A failedCommandId
* An explicit fixit intent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants