Skip to content

Desktop: a second launch on a folder opens it in the running 1loop (#511) - #561

Open
MopigamesYT wants to merge 1 commit into
devfrom
fix/511-open-folder-in-running
Open

MopigamesYT wants to merge 1 commit into
devfrom
fix/511-open-folder-in-running

Conversation

@MopigamesYT

@MopigamesYT MopigamesYT commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Closes #511

What changed

  • Started with -workspace while 1loop already runs, the new process sends open <folder> on the single-instance socket instead of show.
  • The running window then adds the folder as a project if needed and switches to it, then comes to the front. It uses openProjectOn(localTarget, …), as the sidebar does, so it works from a server or SSH machine target too.
  • Without -workspace (a launch from the desktop menu), nothing changes: the window is only shown.
  • A running 1loop from before this change answers nothing to open. The new launch then falls back to show, so it never removes the old one's socket and takes its place.
  • Only an absolute folder on one line is accepted.

Screenshots

Taken on the linux-test VM: 1loop running on project ws, then 1loop -workspace /home/agent/t/1loop from a terminal. The second launch exits, and the running window adds 1loop and opens it (log: another launch on /home/agent/t/1loop: opened in the window). On dev the log only says window brought to the front.

a second launch added and opened the 1loop project

Checked here: go test ./internal/ui (whole package), go build ./..., go vet, gofmt. New tests: TestSecondLaunchOpensItsFolder and TestSecondLaunchFallsBackToShow (old protocol). Run with two real 1loop processes on the linux-test VM (screenshot and log above).

Note: make run passes -workspace ., so running it in another repository now opens that repository in the running window.

Assisted-by: Claude Opus 5.5 medium

🤖 Generated with Claude Code

)

A second launch only asked the running 1loop to show its window: the
folder given with -workspace was dropped. Started with -workspace, it
now sends "open <folder>": the running window adds the project if
needed, switches to it (from a server or SSH machine too, as the
sidebar does) and comes to the front. A running 1loop from before this
answers nothing to "open", so the launch falls back to "show" rather
than taking its place.

Tests: TestSecondLaunchOpensItsFolder, TestSecondLaunchFallsBackToShow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants