Skip to content

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
09-21-refactor_one_vocabulary_for_a_project_s_resourcesfrom
09-21-fix_share_a_project_and_honour_a_new_session_link
Draft

camielvs wants to merge 4 commits into
09-21-refactor_one_vocabulary_for_a_project_s_resourcesfrom
09-21-fix_share_a_project_and_honour_a_new_session_link

Conversation

@camielvs

@camielvs camielvs commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

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 in TangentProjectWorkspace — a child of the TangentProjectProvider that wires the store up to Tangent. A child's effects run before its parent's, so on the first commit the store's #io is still null and startSession returns false immediately. 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 — selectSession needs 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_target opens a pipeline already in storage — a name that resolves to nothing throws Pipeline "…" not found.
  • clone_pipeline needs a run to copy.
  • The canvas tools — 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_pipeline joins 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 one usePrepareEmptyProject already runs when someone opens an empty project.

Verified against a live session: asked to call it, Prime got a canvas in one step.

{ "id": "eff9a58b…", "kind": "pipeline", "title": "Mordor DAG",
  "target": "pipeline://id/f2b23145…", "active": true, "name": "Mordor DAG" }

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 validate and npx vitest run green (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:

sessions before after clicking New session
with the guard 2 3
guard removed 3 3

so the second row is the reported bug reproducing on demand. Share copies http://localhost:3000/tangent/<projectId> and toasts.

🤖 Generated with Claude Code

camielvs and others added 2 commits September 21, 2026 15:48
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>
@camielvs camielvs changed the title feat(projects): share a project from the Tangent page fix(tangent): share a project, and honour a link asking for a new session Sep 21, 2026
@github-actions

github-actions Bot commented Sep 21, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 09-21-fix_share_a_project_and_honour_a_new_session_link/9f0ec3e

camielvs commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

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>
@camielvs camielvs changed the title fix(tangent): share a project, and honour a link asking for a new session fix(tangent): share a project, honour a new-session link, and let an agent create a pipeline Sep 21, 2026
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 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.

1 participant