What happened?
If a render error occurs in the Ink UI (e.g., a raw string returned inside a ), the CLI can crash so hard that the terminal becomes unresponsive and even Ctrl+C no longer works. The process appears stuck in a broken render loop.
Example error seen in the terminal:
ERROR Text string " " must be rendered inside component
node_modules/ink/build/reconciler.js:156:19
153: },
154: createTextInstance(text, _root, hostContext) {
155: if (!hostContext.isInsideText) {
156: throw new Error(Text string "${text}" must be rendered inside <Text> component);
157: }
158: return createTextNode(text);
159: },
...
Example user flow that triggered this recently:
- Pressing ? to open the shortcuts UI, which renders a panel with inline spacing.
What did you expect to happen?
- Render errors should never hard‑crash the CLI.
- The UI should fall back to a safe minimal screen that still allows Ctrl+C to exit.
- Errors should be logged so they can be debugged later.
- (Optional) Provide a lightweight “failsafe” input handler outside Ink so Ctrl+C always works even
if the UI crashes.
Analysis / Recommendations
- Add a top‑level error boundary around the Ink app:
- Catches render exceptions.
- Shows a minimal safe fallback.
- Logs the error (and stack) to a debug log or crash file.
- Keeps stdin listeners alive so Ctrl+C still works.
- Add a failsafe SIGINT handler outside the React tree:
- If the UI crashes, Ctrl+C still terminates the process cleanly.
- Enforce safe rendering practices:
- Lint/test rules to prevent raw strings inside .
- Small helper components for layout spacing that always render .
- Add a smoke test for rendering:
- Render key UI surfaces and assert no render exceptions.
Client information
Client Information
Run gemini to enter the interactive CLI, then run the /about command.
> /about
# paste output here
Login information
No response
Anything else we need to know?
No response
What happened?
If a render error occurs in the Ink UI (e.g., a raw string returned inside a ), the CLI can crash so hard that the terminal becomes unresponsive and even Ctrl+C no longer works. The process appears stuck in a broken render loop.
Example error seen in the terminal:
ERROR Text string " " must be rendered inside component
node_modules/ink/build/reconciler.js:156:19
153: },
154: createTextInstance(text, _root, hostContext) {
155: if (!hostContext.isInsideText) {
156: throw new Error(
Text string "${text}" must be rendered inside <Text> component);157: }
158: return createTextNode(text);
159: },
...
Example user flow that triggered this recently:
What did you expect to happen?
if the UI crashes.
Analysis / Recommendations
Client information
Client Information
Run
geminito enter the interactive CLI, then run the/aboutcommand.Login information
No response
Anything else we need to know?
No response