fix: show file picker empty message below the input line
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, node.js, react
- Área
- cli
Línea de trabajo
Comienza en src/tui/filePicker.js, en el bloque return final del componente FilePicker, donde el Text de entrada y el mensaje vacío son hermanos dentro de un Box de una sola columna. Revisa src/tui/inputArea.js alrededor de la rama pickerOpen para ver cómo el selector reemplaza el panel de entrada. Reproduce escribiendo @ seguido de un nombre que no coincida en la TUI. Está terminado cuando la línea " No matching files." se muestra debajo de la entrada escrita y un test en tests/unit/tui/filePicker.test.js comprueba ese orden.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
When the file picker's @ autocomplete filter matches no files, the "No matching files." empty message is displayed in a way that obscures the input line, so the user cannot see what they typed when they make a typo. The empty message should be positioned below the line the user types on.
Environment
- OS: Linux 7.0.14-19-pve
- Node.js: v25.8.1
- madz version: 1.113.1
- LLM provider: Unknown — user to confirm
Reproduction
Steps to reproduce the behavior:
- Start the madz TUI.
- Type
@followed by a typo (e.g.,@src/confgwhereconfgdoes not exist). - Observe the file picker shows "No matching files." but the user cannot see what they typed.
Expected Behavior
The "No matching files." empty message is shown below the line the user types on, so the typed input remains visible.
Actual Behavior
The empty message is displayed in a way that obscures the input line — the user cannot see what they typed when there is a typo.
Additional Context
The FilePicker component in src/tui/filePicker.js renders the input line and the empty message in a single column Box. The empty message positioning needs adjustment so it renders below the input line without obscuring the typed text.
Audit Findings (for Issue #1412)
- File:
src/tui/filePicker.js— The FilePicker renders its own input line (aTextwithbefore/at/aftercursor segments) and the empty message as siblings in a single columnBox(flexDirection: "column"). The empty message (" No matching files.") is the second child, so it should stack below the input line. The render block is thereturn React.createElement(Box, { flexDirection: "column", ... }, <input Text>, <empty message or file list>)near the end of the component. - File:
src/tui/inputArea.js— WhenpickerOpenis true, theInputPanelis hidden and theFilePickeris rendered in its place (lines ~278). The FilePicker owns the input line while open, so the empty message positioning is entirely withinfilePicker.js. - Likely culprit: The empty message is rendered as a sibling of the input
Textin the column. If the message is appearing on the same visual line as the input (or the input line is being obscured), the fix is to ensure the empty message is a distinct child rendered below the input line — e.g., wrap the inputTextin its ownBoxrow and place the message in a separate row, or add explicit spacing so the message never overlaps the typed text. - Related:
src/tui/commandPicker.jshas the same pattern (No matching commands.) — consider matching its behavior for consistency.
Fix Steps
- Locate the render — Open
src/tui/filePicker.jsand find thereturn React.createElement(Box, { flexDirection: "column", ... })block near the end of theFilePickercomponent. - Separate the input line — Wrap the input
Text(thebefore/at/aftercursor rendering) in its ownBoxrow so it occupies a distinct line. - Render the empty message below — Ensure the " No matching files." message is a separate child rendered below the input line, so the typed text remains visible when the filter matches nothing.
- Add a test — Add a test case in
tests/unit/tui/filePicker.test.js(or a render test) that verifies the empty message renders below the input line when the filter has no matches. - Verify — Run
npm run testandnpm run coverageto confirm no regressions.
- Lenguaje dominante
- JavaScript
- Estrellas
- 2
- Forks
- 0
- Merge medio
- 1 h 34 min
- PR fusionados (30 d)
- 231
Preparar el entorno
- Incluye un Dockerfile o un 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 avoidwork/madz
-
feature
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de avoidwork/madz
Issues similares
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
andromarces/agent-loops#886 ·
Los mantenedores suelen responder en 1 día
-
bug effort:low model:light plan planner:gpt-6-1-sol tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
B: visual
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
FreeTubeApp/FreeTube#9929 ·
Los mantenedores suelen responder en 1 día
-
🐛 Bug: `--clear-screen` not very useful (at least not for dealing with large test/error output)Abiertostatus: in triage type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
mochajs/mocha#6428 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
supabase/supabase-js#2768 ·
Los mantenedores suelen responder en 1 día