Skip to content

fix: designer fe issues #794

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

Merged
merged 4 commits into from
May 7, 2025
Merged

fix: designer fe issues #794

merged 4 commits into from
May 7, 2025

Conversation

shczhen
Copy link
Collaborator

@shczhen shczhen commented May 7, 2025

  • fix style
  • support uint32
  • fix reload apps: app installed -> global reloaded -> graph_id changes, so we reset workspace.graph after app installed or reloaded

@shczhen shczhen requested a review from halajohn as a code owner May 7, 2025 06:54
@shczhen shczhen requested a review from Copilot May 7, 2025 06:54
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes several front-end issues for the designer by updating component styles, adding support for uint32 in schema conversion, and resetting the workspace graph after app installations or reloads.

  • Updated postActions type in widget data to support async operations
  • Adjusted various UI component styles for improved design consistency
  • Added support for uint32 and refined app reload behavior

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
core/src/ten_manager/designer_frontend/src/types/widgets.ts Updated the postActions callback type to also allow asynchronous operations
core/src/ten_manager/designer_frontend/src/components/ui/Select.tsx Modified utility classes in the select trigger, removing some text clamping and flex settings
core/src/ten_manager/designer_frontend/src/components/ui/Input.tsx Updated input component styling by removing shadow classes for a clean look
core/src/ten_manager/designer_frontend/src/components/ui/Button.tsx Made a minor adjustment to the button style (rounded-sm for xs variant)
core/src/ten_manager/designer_frontend/src/components/Widget/utils.ts Added support for the "uint32" type
core/src/ten_manager/designer_frontend/src/components/Widget/LogViewerWidget.tsx Added a ref (hasConnectedRef) to avoid repeated WebSocket connections
core/src/ten_manager/designer_frontend/src/components/Widget/ExtensionWidget/ExtensionList.tsx Revised hover and text styles for extension list items
core/src/ten_manager/designer_frontend/src/components/Widget/BackstageWidgets.tsx Filtered backstage widgets to render only LogViewer widgets
core/src/ten_manager/designer_frontend/src/components/Widget/AppsWidget.tsx Updated app widget behavior to reset workspace settings post app install or reload
Comments suppressed due to low confidence (1)

core/src/ten_manager/designer_frontend/src/components/ui/Select.tsx:41

  • [nitpick] Review the removal of text clamping and flex utility classes in the SelectTrigger component to ensure that text overflow is still handled appropriately.
className={cn( ... )}

@@ -187,7 +187,7 @@ export interface ILogViewerWidgetData<T extends ELogViewerScriptType> {
scriptType: T;
script: z.infer<(typeof LogViewerScriptSchemaMap)[T]>;
options?: ILogViewerWidgetOptions;
postActions?: () => void;
postActions?: () => void | Promise<void>;
Copy link
Preview

Copilot AI May 7, 2025

Choose a reason for hiding this comment

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

Ensure that consumers of the ILogViewerWidgetData interface are updated to handle asynchronous postActions, and consider adding documentation to clarify this change.

Suggested change
postActions?: () => void | Promise<void>;
/**
* A function to execute post-actions after the main script execution.
* This function can be asynchronous, so consumers should handle it properly
* (e.g., by awaiting it if it returns a Promise).
*/
postActions?: TPostActions;
export type TPostActions = () => void | Promise<void>;

Copilot uses AI. Check for mistakes.

@@ -187,7 +187,7 @@ export const ExtensionBaseItem = React.forwardRef<
className={cn(
"px-1 py-2",
"flex gap-2 w-full items-center max-w-full font-roboto h-fit",
"hover:bg-gray-100 dark:hover:bg-gray-800",
"hover:bg-ten-fill-4 rounded-sm",
Copy link
Preview

Copilot AI May 7, 2025

Choose a reason for hiding this comment

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

[nitpick] Confirm that the new hover background and border-radius settings align with the overall design standards and accessibility requirements.

Suggested change
"hover:bg-ten-fill-4 rounded-sm",
"hover:bg-hover-background rounded-standard",

Copilot uses AI. Check for mistakes.

@halajohn halajohn merged commit 24d3b44 into main May 7, 2025
29 of 30 checks passed
@halajohn halajohn deleted the designer-fix-250507 branch May 7, 2025 13:45
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