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
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
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
- Open a session with the right pane visible.
- Observe the
New tabrow in the pane's tab strip: it shows an×. - 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
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de anomalyco/opencode
-
core: OpenRouter BYOK sessions record cost = 0 since v2.2.0 (ignores cost_details.upstream_inference_cost)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoreproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
anomalyco/opencode#60558 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
anomalyco/opencode#60529 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
anomalyco/opencode#60469 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
TUI permission prompt for MCP tools doesn't show the call argumentsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
anomalyco/opencode#60350 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
reproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
anomalyco/opencode#60306 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de anomalyco/opencode
Issues similares
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
awslabs/visual-asset-management-system#937 ·
Los mantenedores suelen responder en 1 día
-
t0ggles
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
nolimits4web/swiper#8255 · 1 comentario ·
Los mantenedores suelen responder en 15 días
-
render: --variables-file (and --variables <path>) fails with "io.readFile is not a function" since 0.8.212Posiblemente ocupada @miguel-heygen la tomó hoy. Abiertobug triage/needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
heygen-com/hyperframes#6830 ·
Los mantenedores suelen responder en 1 día
-
bug launch local use
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
account: profile bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 5 días