fix: show file picker empty message below the input line
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 70/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, node.js, react
- Ambito
- cli
Direzione di ricerca
Inizia da src/tui/filePicker.js, nel blocco return finale del componente FilePicker, dove il Text di input e il messaggio vuoto sono fratelli in un Box a colonna singola. Controlla src/tui/inputArea.js intorno al ramo pickerOpen per vedere come il selettore sostituisce il pannello di input. Riproduci digitando @ seguito da un nome che non corrisponde nella TUI. È completato quando la riga " No matching files." viene mostrata sotto l'input digitato e un test in tests/unit/tui/filePicker.test.js verifica questo ordine.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- JavaScript
- Stelle
- 2
- Fork
- 0
- Merge medio
- 1h 34m
- PR unite (30g)
- 231
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di avoidwork/madz
-
feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di avoidwork/madz
Issue simili
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
saayam-for-all/webapp#1919 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Uuriko/project-room#3728 ·
I maintainer di solito rispondono entro 1 giorno
-
docs(site): Mermaid edge-label contrast on Architecture and a table header on How it comparesApertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
devops-thiago/ThrillhouseBot#1132 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
andromarces/agent-loops#886 ·
I maintainer di solito rispondono entro 1 giorno
-
bug effort:low model:light plan planner:gpt-6-1-sol tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno