Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Desktop 2.2.2: hideCloseButton on a tab trigger has no stylesheet rule, so the New tab row shows a close button that cannot close it

Abierto Apto para principiantes
#60,541 2 comentarios 0 reacciones 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
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
desktop, frontend

Línea de trabajo

Empieza por ui/src/navigation/tabs/tabs.tsx:139 y las hojas de estilo de las pestañas; confirma qué elemento recibe data-hidden y dónde se controla su visibilidad. El issue sugiere añadir una regla para ocultar ese botón de cierre y, después, comprobar que la fila New tab ya no muestra ×. Inspecciona también app/src/runtime/plugin/side-region.tsx y app/src/runtime/plugin/panels.tsx si decides hacer que el cierre del panel vacío persista.

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

Descripción

Environment

  • OpenCode Desktop 2.2.2 (AppImage, Linux x64)

Summary
Tabs.Trigger accepts hideCloseButton, sets data-hidden on the close-button wrapper, but no stylesheet uses that attribute. The close button therefore stays visible on the New tab row, and clicking it does not close the row: the row is dismissed and immediately reopened by the side region's open effect.

Steps to reproduce

  1. Open a session with the right pane visible.
  2. Observe the New tab row in the pane's tab strip: it shows an ×.
  3. Click the ×.

Actual behaviour
The row flickers and stays. The pane never closes.

Expected behaviour
Either the close button is hidden on this row, or clicking it closes the row and the empty pane.

Evidence
ui/src/navigation/tabs/tabs.tsx:139 writes the attribute:

<div data-slot={closeSlot()} data-hidden={local.hideCloseButton ? "" : undefined}>

app/src/runtime/plugin/side-region.tsx:326 passes hideCloseButton, so the attribute is present in the DOM.

A grep across every stylesheet shipped in the 2.2.2 asar returns exactly one rule for that attribute, and it belongs to the session timeline, not to tabs:

[data-hidden] [data-slot=timeline-detail-activity]{

The close button's only visibility rule is the opposite one, which forces it on for the selected trigger:

[data-component=tabs] [data-slot=tabs-trigger-wrapper]:has([data-selected]) [data-slot=tabs-trigger-close-button]{opacity:1}

Because the New tab row is selected, the × renders.

Why closing does not stick
app/src/runtime/plugin/panels.tsx dismissNewTab() removes the entry and, when the strip is empty, calls onEmptied() to close the region. app/src/session/screen.tsx:97 implements that as a side toggle. app/src/runtime/plugin/side-region.tsx then reopens a New tab in the same update, because the pane is still marked as starting empty:

const starting = createMemo(() =>
  tabsOpen() && layout.ready() && props.region.empty() ? props.view.key : undefined,
)
createEffect(on(starting, (key) => key && props.region.openNewTab("side")))

So the close is undone immediately; the user only sees a flicker.

Suggested fix
Add the missing rule, for example:

[data-slot=tabs-trigger-close-button][data-hidden] { display: none; }
Lenguaje dominante
TypeScript
Estrellas
221k
Forks
29.6k
Merge medio
7 h 41 min
PR fusionados (30 d)
510

Preparar el entorno

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 anomalyco/opencode

Todos los issues de anomalyco/opencode

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.