Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "uipath-dev"
version = "0.0.18"
version = "0.0.19"
description = "UiPath Developer Console"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
Expand Down
26 changes: 20 additions & 6 deletions src/uipath/dev/ui/panels/new_run_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import json
from typing import Any, Tuple, cast

from rich.text import Text
from textual.app import ComposeResult
from textual.containers import Container, Horizontal, Vertical
from textual.reactive import reactive
from textual.widgets import Button, Select, TabbedContent, TabPane
from textual.widgets import Button, Select, Static, TabbedContent, TabPane
from uipath.runtime import UiPathRuntimeFactoryProtocol, UiPathRuntimeProtocol

from uipath.dev.ui.widgets.json_input import JsonInput
Expand Down Expand Up @@ -46,6 +47,12 @@ def compose(self) -> ComposeResult:
allow_blank=True,
)

yield Static(
"",
id="error-message",
classes="error-message hidden",
)

yield JsonInput(
text=self.initial_input,
language="json",
Expand Down Expand Up @@ -112,6 +119,13 @@ async def on_mount(self) -> None:
async def _load_schema_and_update_input(self, entrypoint: str) -> None:
"""Ensure schema for entrypoint is loaded, then update JSON input."""
json_input = self.query_one("#json-input", JsonInput)
error_message = self.query_one("#error-message", Static)
select = self.query_one("#entrypoint-select", Select)

# Hide error, show input by default
error_message.add_class("hidden")
json_input.remove_class("hidden")
select.remove_class("hidden")

if not entrypoint or entrypoint == "no-entrypoints":
json_input.text = "{}"
Expand All @@ -131,12 +145,12 @@ async def _load_schema_and_update_input(self, entrypoint: str) -> None:
self.entrypoint_schemas[entrypoint] = input_schema
schema = input_schema
except Exception as e:
json_input.text = "{}"
self.app.notify(
f"Error loading schema for '{entrypoint}': {str(e)}",
severity="error",
timeout=5,
json_input.add_class("hidden")
select.add_class("hidden")
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Hiding the select dropdown when an error occurs prevents users from selecting a different entrypoint to recover from the error. Consider keeping the select visible so users can attempt to select another entrypoint that might load successfully.

Suggested change
select.add_class("hidden")

Copilot uses AI. Check for mistakes.
error_message.update(
Text(f"Error loading schema for '{entrypoint}':\n\n{str(e)}")
)
error_message.remove_class("hidden")
return
finally:
if runtime is not None:
Expand Down
10 changes: 10 additions & 0 deletions src/uipath/dev/ui/styles/terminal.tcss
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ Screen {
border: solid #ff4444;
}

.error-message {
color: $error;
background: $surface;
padding: 1 2;
border: solid $error;
height: auto;
max-height: 50%;
overflow-y: auto;
}

.hidden {
display: none;
}
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading