Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Terminal panel: keys typed before the shell is ready are dropped; blank after reopening on macOS

Closed
#191 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
cli, desktop, testing

Research direction

Start with src/renderer/src/views/panels.ts:214-217 and src/main/panels/terminal.ts:20-23 to trace terminal input startup and reattachment. Then inspect tests/e2e/panels.test.ts:46 and run the panel e2e test. Done means startup keystrokes are preserved, the test waits for the prompt instead of sleeping, and reopening the terminal displays its prompt or recent output.

Written by the indexing model from the issue text.

Description

bug priority: low severity: low

Found in the 2026-10-07 code review (read).

Problem

  • Dropped keys: until terminal:start resolves, the panel's onData reacts only to \r (src/renderer/src/views/panels.ts:214-217), and every other key is lost. This is also why tests/e2e/panels.test.ts:46 needs waitForTimeout(1500) before typing, and why it is flaky on slow runners.
  • Blank after reopen: on macOS the pty outlives a closed window. terminal:start with the same working directory only resizes (src/main/panels/terminal.ts:20-23), so the new xterm shows no prompt until Enter is pressed, and output produced while the window was closed is lost.

Fix

  • Buffer input while the shell is starting and flush it once started = true. In the e2e test, wait for the prompt instead of sleeping.
  • On reattach, send a redraw (for example \x0c) or replay a small buffer of recent output.
Dominant language
TypeScript
Stars
2
Forks
2
Avg merge
5h 28m
Merged PRs (30d)
24

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PierrunoYT/patch

All issues in PierrunoYT/patch

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.