Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 597cfb9573 | |||
| 703cf1f88b | |||
| 5dc7d44111 | |||
| ee348643f8 |
@@ -853,19 +853,31 @@ async def create_instance(
|
||||
# Generate unique name
|
||||
instance_name = f"{tool_type.name}-{repo.name}-{uuid.uuid4().hex[:8]}"
|
||||
|
||||
# Auto-generate display name with numbering when duplicates exist
|
||||
# Auto-generate display name with scoped numbering.
|
||||
# When a workspace is provided, use workspace name + tool type.
|
||||
# Otherwise fall back to repo name + tool type.
|
||||
if data.display_name:
|
||||
instance_display = data.display_name
|
||||
else:
|
||||
auto_name = f"{_project.name} / {repo.name} / {tool_type.display_name}"
|
||||
result = await session.execute(
|
||||
select(ToolInstance).where(
|
||||
ToolInstance.project_id == project_id,
|
||||
ToolInstance.repository_id == repo_id,
|
||||
ToolInstance.tool_type_id == tool_type_id,
|
||||
ToolInstance.owner_id == user_id,
|
||||
scope_name = workspace.name if workspace else repo.name
|
||||
auto_name = f"{scope_name} / {tool_type.display_name}"
|
||||
|
||||
if workspace:
|
||||
count_query = (
|
||||
select(ToolInstance)
|
||||
.where(ToolInstance.workspace_id == workspace_id)
|
||||
.where(ToolInstance.tool_type_id == tool_type_id)
|
||||
.where(ToolInstance.owner_id == user_id)
|
||||
)
|
||||
)
|
||||
else:
|
||||
count_query = (
|
||||
select(ToolInstance)
|
||||
.where(ToolInstance.repository_id == repo_id)
|
||||
.where(ToolInstance.tool_type_id == tool_type_id)
|
||||
.where(ToolInstance.owner_id == user_id)
|
||||
)
|
||||
|
||||
result = await session.execute(count_query)
|
||||
existing_count = len(result.scalars().all())
|
||||
if existing_count > 0:
|
||||
instance_display = f"{auto_name} #{existing_count + 1}"
|
||||
|
||||
@@ -41,9 +41,8 @@ from src.logging_config import (
|
||||
configure_logging,
|
||||
)
|
||||
from src.seeds.builtin_tool_types import seed_builtin_tool_types
|
||||
from src.services.correlation import CorrelationIdMiddleware
|
||||
from src.services.event_bus import InstanceEventBus
|
||||
from src.services.health_monitor import HealthMonitor
|
||||
from src.services.instance import InstanceEventBus, HealthMonitor
|
||||
from src.services.shared import CorrelationIdMiddleware
|
||||
|
||||
# Configure logging early
|
||||
log_level = os.getenv("LOG_LEVEL", "INFO").upper()
|
||||
|
||||
@@ -318,7 +318,7 @@ export const TerminalPage: React.FC = () => {
|
||||
<div className="mobile-terminal-toolbar-left">
|
||||
<button
|
||||
className="mobile-terminal-toolbtn"
|
||||
onClick={() => navigate(-1)}
|
||||
onClick={() => navigate("/sessions")}
|
||||
type="button"
|
||||
aria-label="Back"
|
||||
>
|
||||
@@ -353,7 +353,7 @@ export const TerminalPage: React.FC = () => {
|
||||
</button>
|
||||
<button
|
||||
className="mobile-terminal-toolbtn"
|
||||
onClick={() => navigate(-1)}
|
||||
onClick={() => navigate("/sessions")}
|
||||
type="button"
|
||||
aria-label="Exit terminal"
|
||||
>
|
||||
|
||||
@@ -4626,6 +4626,7 @@ a:active,
|
||||
.notification-center {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.notification-bell {
|
||||
@@ -4679,7 +4680,7 @@ a:active,
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
||||
z-index: 100;
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
|
||||
Reference in New Issue
Block a user