feat: Add UI for the in-component configuration assistance#3915
feat: Add UI for the in-component configuration assistance#3915re-pixel wants to merge 5 commits intosuperplanehq:mainfrom
Conversation
Signed-off-by: re-pixel <relja.brdar@gmail.com>
|
👋 Commands for maintainers:
|
|
Give us a markdown document with high-levels first. It will be easier to judge and review. 1/ Create a PR with a new file in docs/prd that describes how this will work |
| enableRealtimeValidation={true} | ||
| autocompleteExampleObj={resolvedAutocompleteExampleObj} | ||
| suggestFieldValue={inlineAssistantEnabled ? suggestFieldValue : undefined} | ||
| assistantEnabled={inlineAssistantEnabled} |
There was a problem hiding this comment.
What is this files doing, showing if the config value is enabled?
We don't need this. The users can't modify it, it is just noise.
There was a problem hiding this comment.
agreed, will remove it
| {proposedValue != null ? ( | ||
| <div className="space-y-2"> | ||
| <p className="text-xs font-medium text-muted-foreground">Suggested value</p> | ||
| <pre className="max-h-40 overflow-auto rounded-md bg-muted/50 p-2 text-xs whitespace-pre-wrap break-all"> | ||
| {proposedValue} | ||
| </pre> | ||
| {explanation ? <p className="text-xs text-muted-foreground">{explanation}</p> : null} | ||
| <div className="flex justify-end gap-2 pt-1"> | ||
| <Button type="button" size="sm" variant="outline" onClick={handleClose}> | ||
| Discard | ||
| </Button> | ||
| <Button type="button" size="sm" onClick={handleConfirm}> | ||
| Use this value | ||
| </Button> | ||
| </div> | ||
| </div> |
There was a problem hiding this comment.
Lets extract this to a dedicated component to not accoumulate too much stuff in this function.
|
/sp start |
|
✅ Ready. Web: https://pr-3915-ephemeral.superplane.com |
|
/sp stop |
|
✅ Ephemeral machine has been terminated. |
@shiroyasha this is because this commit added it just on i can add it to other fields in this PR if you want. |
|
Lets keep this PR open in that case, and first ship the backend part. The combination of the backend + frontend would allow us to judge the quality. |
Signed-off-by: re-pixel <relja.brdar@gmail.com>
…sistance being turned on
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| return { | ||
| value: trimmed.length > 0 ? trimmed : "true", | ||
| }; | ||
| }, []); |
There was a problem hiding this comment.
Stub implementation echoes user input as suggested value
Medium Severity
The suggestFieldValue callback is a hardcoded stub that fakes a 450ms delay and returns the user's own instruction text as the "suggested value" (or "true" if the instruction is empty). When the VITE_ENABLE_INLINE_CONFIG_ASSISTANT feature flag is enabled (which it is in docker-compose.dev.yml), users see an AI assistant panel that simply echoes their input back — producing misleading results with no actual backend integration. There's no comment or TODO marking this as temporary placeholder code.
| </Button> | ||
| <Button type="button" size="sm" variant="outline" onClick={handleClose} disabled={loading}> | ||
| Cancel | ||
| </Button> |
There was a problem hiding this comment.
Cancel button disabled during loading prevents aborting generation
Low Severity
All interactive controls — the Generate button, Cancel button, sparkle trigger, and textarea — are disabled while loading is true. If the suggestFieldValue promise takes a long time or hangs (e.g., network issue), the user has no way to cancel the operation or close the panel. The generationRef-based cancellation logic exists internally but is inaccessible to the user in this state.




Link to the video: https://drive.google.com/file/d/1OhS-7g8vUXmpLqAYg2H3TiDlhPEDNqnr/view?usp=sharing
Related Issues
#3714