Skip to content

Auto-connect to a host on startup and open a new chat, the last chat or a terminal #62

Description

@jankarres

Every time I open the app it starts from nothing. Tap the host, wait, tap the agent, wait, tap +, tap the project. On my iPhone 13 that is six taps and about seventeen seconds before I can type anything, and on nearly every launch my answer to all six is the same one as last time.

It is specifically the cold start. While the app is still in memory this is all fine: you come back to the screen you left, and recover() reconnects you on resume. But recover() reads lastConnectedHost out of React state, so once the process is gone there is nothing to recover from and a fresh launch does not even try to connect.

The case I care about most is picking work up from my desk. The session list comes from the host, so the chat I had open on my laptop is sitting right there, and I still have to walk to it every single time.

What I would like is a small Startup section in Settings with two choices: which host to connect to when the app opens (off, last used, or a specific one), and what to open once it is connected (Home, a new chat, the last chat, terminal, git client, system monitor, ports). The two chat options would remember an agent and a project.

Defaults would stay exactly as they are now, so anyone who never opens the page sees no difference.

I mocked it up rather than describe it, and it is attached here. It has the settings screen with the selects live, so you can see which rows appear for which target, and the launch that comes out of it, including what cancelling and a missing project look like. Every screen in it was traced from the current app on an iPhone 13, so it should look like the app rather than like a wireframe.

mockup.html

Three things I think it would need. It has to be cancellable while it runs, since guessing wrong and being dragged somewhere is worse than the six taps. It should only fire on a cold start, never when coming back from the background. And if the target is gone, say the project was removed, it should tell you and stay on Home rather than helpfully opening something else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions