fix(tangent): project window parity — share, new-session links, agent-created pipelines, and a folded-away project window - #2773
Draft
camielvs wants to merge 4 commits into
Conversation
Delete project arrived in the Project window without the Share beside it, so handing the project to someone meant going back to its own page for a link to the page you were already on. The two lines behind Share move next to the delete action both pages already share, so neither page can drift into copying a different link or saying something different about it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
"New session" on the project page lands in Tangent on whichever session was already there, having started none. The link says `?session=new`, and the hook that reads it runs in a child of the provider that wires the store up to Tangent. A child's effects run before its parent's, so on the first commit the store has no way to reach Tangent and `startSession` refuses. The ask was marked handled and stripped from the url anyway, so nothing ever started one. Asking for a session by id was unaffected: selecting one needs nothing of Tangent. The store now says whether it can start a session at all, and the ask waits for that rather than being spent on a refusal. Verified against a project with two sessions: clicking New session now leaves it with three, and reverting the guard reproduces the two. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
🎩 PreviewA preview build has been created at: |
This was referenced Sep 21, 2026
Draft
Collaborator
Author
Asked to build a pipeline with nothing open, Prime says it cannot edit the canvas because none is open, and stops. It is right, and there was no way out of it: every route to a canvas assumed one already existed. `open_workarea_target` opens a pipeline that is already in storage, `clone_pipeline` needs a run to copy, and the canvas tools — addTask and the rest — belong to a sub-agent spawned into a tab, which only exists because an editor is already mounted on a loaded pipeline. Nothing downstream of a tab can bring a pipeline into being. So `create_pipeline` joins the project-level catalog, the one level that is not bound to a canvas. It names the pipeline (uniquely), creates it, attaches it to the project so it appears in Resources, opens the tab and waits for its sub-agent host, so a spawn can follow straight on rather than costing another turn. The sequence is the one `usePrepareEmptyProject` already runs when someone opens an empty project; this gives an agent the same door. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Arriving at a project nobody has worked in, the first thing in the dock is a tall empty form — a blank description, a creation date from a minute ago — sitting above the sessions and resources the person came for. It is minimized on that arrival, by the same setup that starts the session and opens a pipeline, so it stays one click away in the dock rather than being taken off it. A project someone has already worked in is left exactly as they last had it. Layouts are saved per surface rather than per project, so once a new project folds it away that is where it stays for every project in that browser until someone opens it again. That is the existing behaviour of every window here, not something this introduces. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Sep 22, 2026
This was referenced Sep 22, 2026
This was referenced Sep 23, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Two fixes to the Tangent project page, found while testing the stack.
Share a project from the Tangent page
Delete project arrived in the Project window without the Share beside it, so handing a project to someone meant going back to its own page for a link to the page you were already on. The two lines behind Share move next to the delete action both pages already share, so neither page can drift into copying a different link or saying something different about it.
A link asking for a new session now starts one
"New session" on the project page landed in Tangent on whichever session was already there, having started none.
The link says
?session=new, and the hook that reads it runs inTangentProjectWorkspace— a child of theTangentProjectProviderthat wires the store up to Tangent. A child's effects run before its parent's, so on the first commit the store's#iois still null andstartSessionreturnsfalseimmediately. The ask was marked handled and stripped from the url anyway, so nothing ever started one, and the page settled on the most recent existing session.Asking for a session by id was unaffected —
selectSessionneeds nothing of Tangent, which is why only the "new" case looked broken.The store now exposes whether it can start a session at all, and the ask waits for that rather than being spent on a refusal.
An agent can now create a pipeline to work in
Asked to build a pipeline with nothing open, Prime answers "I couldn't edit the canvas because no Tangle pipeline canvas is currently open" and stops. It was right, and there was no way out: every route to a canvas assumed one already existed.
open_workarea_targetopens a pipeline already in storage — a name that resolves to nothing throwsPipeline "…" not found.clone_pipelineneeds a run to copy.addTask,connectNodes,createSubgraph— belong to a sub-agent spawned into a tab, and that tab only exists because an editor is already mounted on a loaded pipeline.Nothing downstream of a tab can bring a pipeline into being, so
create_pipelinejoins the project-level catalog — the one level not bound to a canvas. It names the pipeline (uniquely), creates it, attaches it to the project so it shows in Resources, opens the tab and waits for its sub-agent host, so a spawn can follow straight on instead of costing another turn. The sequence is the oneusePrepareEmptyProjectalready runs when someone opens an empty project.Verified against a live session: asked to call it, Prime got a canvas in one step.
Worth knowing for whoever picks this up next: Prime does not see these tools directly — it reaches them through
list_remote_tools/call_remote_tool, and its bundle prompt tells it to delegate work to spawned sub-agents without mentioning the workarea at all. So it takes the tool when told to and not yet on its own. Closing that is a bundle-prompt change, outside this repo.The project window folds away on a new project
Arriving at a project nobody has worked in, the first thing in the dock is a tall empty form — blank description, a creation date from a minute ago — sitting above the sessions and resources the person came for. It is minimized on that arrival, by the same setup that starts the session and opens a pipeline, so it stays one click away in the dock rather than being taken off it.
Minimized rather than hidden: a minimized docked window keeps its title bar and a chevron, while a hidden one leaves the dock entirely and comes back only through the window-management menu.
A project someone has already worked in is left exactly as they last had it. Layouts are saved per surface rather than per project, so once a new project folds it away that is where it stays for every project in that browser until someone opens it again — the existing behaviour of every window here, not something this adds.
Testing
pnpm run validateandnpx vitest rungreen (3048 tests), with new coverage for the deferred ask, the store flag, and the Share button.Verified in a browser against a project with two sessions:
so the second row is the reported bug reproducing on demand. Share copies
http://localhost:3000/tangent/<projectId>and toasts.🤖 Generated with Claude Code