Tray gateway menu and Local AI page show the raw gateway URL

Abierto Apto para principiantes
#2,004 2 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
85/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp
Área
desktop

Línea de trabajo

Empieza con BuildGatewayFlyout en TrayMenuPresenter.cs y GatewayDetail en LocalAiPageViewModel.cs; después, revisa GatewayUrlHelper.SanitizeForDisplay. Usa la URL guardada y saneada para el detalle del flyout y para el fallback de Local AI, conservando un nombre descriptivo cuando esté disponible. Añade cobertura de regresión que demuestre que la consulta de una URL guardada no aparece en ninguna de las dos cadenas; se considera terminado cuando ambas superficies superen las pruebas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

clawsweeper:needs-security-review clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:security issue-rating: 🦞 diamond lobster P2

What happens

The tray gateway flyout puts Uri.ToString() of the saved gateway URL in the card detail. That string keeps userinfo, the query, and the fragment. The card title already shows host and port, so the detail is a second, fuller copy.

The Local AI page shows the same saved URL when the gateway has no friendly name. Direct connect stores the URL after NormalizeForWebSocket, which removes userinfo and leaves the query and fragment. GatewayUrlHelper.SanitizeForDisplay is not used on either surface.

Where

Checked on 7967d509 by reading the code. The tray and Local AI page were not opened.

Suggested fix

Display GatewayUrlHelper.SanitizeForDisplay of the saved URL in both places. Prefer the friendly name on Local AI when one exists, and use the sanitized URL only as the fallback.

Environment

Windows 11. OpenClaw Companion source on main at commit 7967d509886fc9efecbb19c8236350a82867f69c (2026-11-04). No packaged installer build was used.

Steps

  1. Direct-connect a gateway URL that still has a query, and leave the friendly name empty.
  2. Open the tray gateway menu and read the card detail.
  3. Open Local AI and read the gateway line.

TrayMenuPresenter.BuildGatewayFlyout sets the detail to gatewayUri.ToString(). LocalAiPageViewModel.GatewayDetail falls back to GatewayUrl when GatewayName is empty. The card title already shows host and port.

Repair

Use GatewayUrlHelper.SanitizeForDisplay for the flyout detail and for the Local AI fallback. Add a regression that a query on the saved URL does not appear in either string. Stop there. This is not the Connection Status list (#2001) or the chat error (#2006).

Lenguaje dominante
C#
Estrellas
2.2k
Forks
340
Merge medio
3 d 3 h
PR fusionados (30 d)
168

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de openclaw/openclaw-windows-node

Todos los issues de openclaw/openclaw-windows-node

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.