You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## 📝 Summary
<!--
If this PR closes any issues, list them here by number (e.g., Closes#123).
Detail the specific changes made in this pull request. Explain the
problem addressed and how it was resolved. If applicable, provide before
and after comparisons, screenshots, or any relevant details to help
reviewers understand the changes easily.
-->
- Pressing Enter with no input in marimo's stdin box was silently
swallowed by the frontend, so any CLI calling `input("Press Enter to
continue:")` (e.g. `logfire`, `click.prompt`, `rich.prompt`, `pdb`)
would hang forever.
- Once unblocked, a second bug surfaced: `builtins.input()` raised
`EOFError` on blank submissions because `ThreadSafeStdin.readline()`
returned `""` — which CPython's `input()` interprets as EOF rather than
a blank line.
### Fix
**Frontend** (`ConsoleOutput.tsx`)
- `StdInput` now submits on Enter even when empty (history skip
preserved).
- `StdInputWithResponse` renders past responses with a `>` chevron,
sky-11 color, and an `(empty)` placeholder so user-typed responses are
visually distinct from stdout — even when the prompt half is empty
(which happens when CLIs `print()` the prompt themselves before calling
`input()`).
<img width="501" height="191" alt="image"
src="https://github.com/user-attachments/assets/59999aad-09fe-4174-9408-b009981130be"
/>
**Backend** (`marimo/_messaging/types.py`, `streams.py`,
`_pyodide/streams.py`)
- `Stdin.readline()` now appends `"\n"` so blank submissions surface as
`"\n"` rather than `""`. `readlines()` simplified to `[readline()]`.
- Lifted `readline`/`readlines` to the `Stdin` base class — both
subclasses had identical implementations.
- `_readline_with_prompt` unchanged: still returns the bare response, so
`input_override` continues to satisfy Python's `input()` contract.
## 📋 Pre-Review Checklist
<!-- These checks need to be completed before a PR is reviewed -->
- [x] For large changes, or changes that affect the public API: this
change was discussed or approved through an issue, on
[Discord](https://marimo.io/discord?ref=pr), or the community
[discussions](https://github.com/marimo-team/marimo/discussions) (Please
provide a link if applicable).
- [x] Any AI generated code has been reviewed line-by-line by the human
PR author, who stands by it.
- [x] Video or media evidence is provided for any visual changes
(optional). <!-- PR is more likely to be merged if evidence is provided
for changes made -->
## ✅ Merge Checklist
- [x] I have read the [contributor
guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md).
- [ ] Documentation has been updated where applicable, including
docstrings for API changes.
- [x] Tests have been added for the changes made.
0 commit comments