-
Notifications
You must be signed in to change notification settings - Fork 798
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
Add observer in UI #1409
Add observer in UI #1409
Conversation
…src/' …194)" (#3196)" This reverts commit a466afc103497c95a3aeaef120bb36bc4648baa0. <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Reintroduces observer feature in `PromptBox` with new `ObserverCruise` type and UI components, controlled by `observerFeatureEnabled` in `env.ts`. > > - **Behavior**: > - Reintroduces observer feature in `PromptBox.tsx`, allowing selection between 'Observer' and 'Task' modes. > - Adds `startObserverCruiseMutation` to handle observer mode, posting to `/cruise` endpoint. > - Uses `observerFeatureEnabled` from `env.ts` to toggle observer feature. > - **Types**: > - Adds `ObserverCruise` type in `types.ts` for observer-related API responses. > - **UI Components**: > - Adds `CustomSelectItem` and `SelectItemText` to `select.tsx` for custom select UI. > - **Environment**: > - Adds `observerFeatureEnabled` in `env.ts` to control observer feature toggle. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral)<sup> for b887fe9514c894f1138560f6f457b71e43c43692. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 21a61d4 in 19 seconds
More details
- Looked at
233
lines of code in4
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. skyvern-frontend/src/util/env.ts:23
- Draft comment:
The conversion ofobserverEnabled
to a boolean is correct, but ensureVITE_OBSERVER_ENABLED
is always set to "true" or "false" to avoid unexpected behavior. - Reason this comment was not posted:
Confidence changes required:33%
TheobserverFeatureEnabled
is being set based on theVITE_OBSERVER_ENABLED
environment variable, which is a string. This is correctly converted to a boolean, so no issues here.
2. skyvern-frontend/src/components/ui/select.tsx:117
- Draft comment:
CustomSelectItem
andSelectItem
have similar implementations. Consider refactoring to reduce code duplication. - Reason this comment was not posted:
Confidence changes required:50%
TheCustomSelectItem
andSelectItem
components have similar implementations. Consider reusing code to avoid duplication.
3. skyvern-frontend/src/routes/tasks/create/PromptBox.tsx:132
- Draft comment:
Consider extractinggetClient(credentialGetter)
to a common function to avoid repetition in mutations. - Reason this comment was not posted:
Confidence changes required:50%
ThestartObserverCruiseMutation
andgetTaskFromPromptMutation
both usegetClient(credentialGetter)
. This could be extracted to a common function to avoid repetition.
Workflow ID: wflow_yDcYS3DGyUpqSium
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Reviewed everything up to 21a61d4 in 1 minute and 15 seconds
More details
- Looked at
233
lines of code in4
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. skyvern-frontend/src/util/env.ts:23
- Draft comment:
The conversion ofobserverEnabled
to a boolean is correct, but ensure thatVITE_OBSERVER_ENABLED
is always set to either "true" or "false" to avoid unexpected behavior. - Reason this comment was not posted:
Confidence changes required:50%
TheobserverFeatureEnabled
is being set based on theVITE_OBSERVER_ENABLED
environment variable, which is a string. This is correctly converted to a boolean, so no issues here.
2. skyvern-frontend/src/components/ui/select.tsx:117
- Draft comment:
CustomSelectItem
andSelectItem
have similar implementations. Consider reusing one to avoid redundancy. - Reason this comment was not posted:
Confidence changes required:50%
TheCustomSelectItem
andSelectItem
components have similar implementations. Consider reusing one of them to avoid redundancy.
3. skyvern-frontend/src/routes/tasks/create/PromptBox.tsx:164
- Draft comment:
Ensure error messages are user-friendly and provide actionable feedback. - Reason this comment was not posted:
Confidence changes required:33%
ThestartObserverCruiseMutation
andgetTaskFromPromptMutation
both handle errors by displaying a toast with the error message. This is a good practice for user feedback.
Workflow ID: wflow_WlqROG18AcdXCpBd
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@@ -114,6 +114,30 @@ const SelectLabel = React.forwardRef< | |||
)); | |||
SelectLabel.displayName = SelectPrimitive.Label.displayName; | |||
|
|||
const CustomSelectItem = React.forwardRef< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a duplicate of the existing SelectItem
component. The existing component is preferred as it properly wraps children in SelectPrimitive.ItemText
.
- component
SelectItem
(select.tsx)
…194)" (#3196)"
This reverts commit a466afc103497c95a3aeaef120bb36bc4648baa0.
Important
Reintroduces observer feature in
PromptBox
with newObserverCruise
type and UI components, controlled byobserverFeatureEnabled
inenv.ts
.PromptBox.tsx
, allowing selection between 'Observer' and 'Task' modes.startObserverCruiseMutation
to handle observer mode, posting to/cruise
endpoint.observerFeatureEnabled
fromenv.ts
to toggle observer feature.ObserverCruise
type intypes.ts
for observer-related API responses.CustomSelectItem
andSelectItemText
toselect.tsx
for custom select UI.observerFeatureEnabled
inenv.ts
to control observer feature toggle.This description was created by for 21a61d4. It will automatically update as commits are pushed.