Skip to content

Malformed --session value can leave the TUI on a black screen #1936

Description

@jnhu76

Description

Summary

Passing a malformed value to --session/-s can leave the TUI on a black screen instead of showing an error and returning to a safe route.

This is related to #1809, but it is a separate entry path: #1809 is triggered by --continue/-c constructing the placeholder session ID "dummy", while this issue is triggered directly by user-supplied --session input.

Reproduction

Start from a valid session ID and append a Chinese enumeration comma (U+3001):

mimo -s 'ses_05f0ea972ffeL0mm9UDAJ8edAi、'

Other nonexistent or malformed session values can exercise the same route-loading failure path.

Actual behavior

  • The TUI enters the session route.
  • session.get() fails for the supplied session ID.
  • The async session-route effect does not fully recover from the failure.
  • The UI can remain on an unloadable session route and render a black screen.
  • Sustained resource usage has also been observed after entering this state, although the precise renderer-level CPU mechanism has not been profiled.

Expected behavior

Any session-load failure should be recoverable:

  • Show a visible Session not found or generic load-failure notification.
  • Navigate back to Home.
  • Do not run stale session sync or scroll work after the route changes.
  • Do not require the CLI to define or rewrite the complete session-ID grammar merely to avoid a black screen.

Root cause

The session route calls sdk.client.session.get() from an async SolidJS effect.

The existing path used throwOnError: true without a complete catch boundary, so an HTTP error or another rejection could escape while the route remained set to the failed session.

The same missing recovery boundary is also what makes the "dummy" placeholder in #1809 become a black-screen failure rather than a visible error.

Suggested fix

  • Remove the "dummy" initial session route used by --continue.
  • Start --continue on Home and navigate only after resolving a real resumable session.
  • Handle unsuccessful session.get() results with a toast and navigation to Home.
  • Catch unexpected rejections from the full session-loading chain.
  • Add route-liveness checks after asynchronous fetch, bootstrap, and sync steps so stale work cannot affect a newly selected route.

A minimal fix has been prepared and will be submitted as a pull request.

Plugins

No response

MiMoCode version

v0.1.9

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions