Skip to content

[Bug] Shell command failure can crash renderer with Solid Switch TypeError #171

@Astro-Han

Description

@Astro-Han

What happened?

After the gh lookup regression surfaced, running gh --help from PawWork shell produced a renderer crash instead of a normal command failure display. The visible error was TypeError: switchFunc(...) is not a function from pawwork-renderer://renderer/assets/styles-C-a255bR.js:1147:29.

This appears to be a separate renderer resilience issue: even if a command is missing or fails, the app should render the shell output or an error card, not crash the renderer while displaying the failed command state.

Steps to reproduce

  1. Launch PawWork after PR fix: preserve gh cli auth config #167 in an environment where PawWork cannot resolve gh from its shell PATH.
  2. Use shell input to run gh --help.
  3. Observe the renderer throwing TypeError: switchFunc(...) is not a function with a stack pointing to styles-C-a255bR.js.

What did you expect to happen?

PawWork should display a normal shell command failure, for example command not found output or a tool error card. Renderer components should tolerate failed shell command states without throwing a Solid runtime error.

PawWork version

v0.2.5 dev build after PR #167

OS version

macOS, observed on Apple Silicon

Can you reproduce it again?

Yes, every time

Screenshots, recordings, or extra context

Observed stack: TypeError: switchFunc(...) is not a function at Object.fn (pawwork-renderer://renderer/assets/styles-C-a255bR.js:1147:29), followed by Solid computation frames. Local source inspection maps styles-C-a255bR.js:1147 to Solid's <Switch> runtime. The root command lookup regression should be tracked separately, but this issue should remain because command failures must not crash the renderer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High priorityappApplication behavior and product flowsbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions