Skip to content

fix: prevent GalleryDetail browser-open crash in TUI#26

Draft
cursor[bot] wants to merge 1 commit intomainfrom
cursor/critical-bug-inspection-5a6b
Draft

fix: prevent GalleryDetail browser-open crash in TUI#26
cursor[bot] wants to merge 1 commit intomainfrom
cursor/critical-bug-inspection-5a6b

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor bot commented Mar 31, 2026

Summary

  • fixes a critical crash path in GalleryDetail introduced by the [o] open in browser action
  • wraps the open(...) call in a handled promise (void ... .catch(...)) instead of firing an unhandled async rejection
  • surfaces a user-facing error (Failed to open browser or underlying message) in the existing error state

Critical bug

When the user presses [o] in gallery detail and the system opener fails (e.g. no desktop opener, missing xdg-open, headless environment), open() rejects. The previous code invoked open(...) without await/.catch(), creating an unhandled promise rejection from an input handler. On modern Node runtimes this can terminate the process, crashing the TUI.

Validation

  • pnpm typecheck passes
  • pnpm build && pnpm test passes (29 tests)
  • verified no behavioral change to successful open path
Open in Web View Automation 

Co-authored-by: Dylan Boudro <starmorph@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant