Skip to content

feat: let the project page and Tangent reach each other - #2762

Draft
camielvs wants to merge 4 commits into
09-18-fix_keep_long_project_names_inside_their_tilefrom
09-18-feat_connect_the_project_page_and_tangent
Draft

camielvs wants to merge 4 commits into
09-18-fix_keep_long_project_names_inside_their_tilefrom
09-18-feat_connect_the_project_page_and_tangent

Conversation

@camielvs

@camielvs camielvs commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

The two pages barely acknowledged each other. Tangent showed a bare project name whose only action was an inline rename — no way back to the project's own page, nothing about what the project is. The project page listed its sessions as Untitled rows that opened an empty preview, and offered no way to start one.

On the Tangent page

  • A Project docked window above Sessions, with the description (reusing ProjectAbout, so it stays editable) and created-by / created / updated.
  • The window deliberately omits Notes: on this page a project's notes are the agent's instructionsResourcesWindowContent reads project.notes as instructions and its Edit instructions dialog writes the same field, and a session opens with them. A second box labelled Notes made one field look like two. The project's own page still shows both.
  • The project name gains a Folder icon and links to the project's own page.
  • Clicking the name no longer renames — a pencil beside it opens the existing RenameProjectDialog instead of the old inline input.

On the project page

  • Sessions are numbered Session 1, 2, 3… in the order they were started, instead of Untitled.
  • Clicking a session opens it in Tangent rather than an empty preview pane.
  • A New session button beside Add, and the Add menu no longer lists a disabled Agent session row — a session is started, not added.
  • A session has no remove control. Like a run, a session that happened belongs to the project it happened in. Its cell is kept so the columns still line up; every other kind of row keeps its own remove or delete.

Two things worth a reviewer's eye

A session cannot be started from the project page. store.startSession needs io.newSession, which comes from useTangent() and only exists inside TangentProvider. So the button navigates to Tangent and asks it to start one. That is carried by a single new search param, since it is the same question in both directions — which session should Tangent open?

/tangent/$projectId?session=<sessionId>   open that one
/tangent/$projectId?session=new           start a fresh one

It is acted on once and stripped from the URL, so a reload does not start a second session. Following the repo's convention, there is no validateSearch — a hand-written guard reads it, because the router JSON-parses params and an all-digit id arrives as a number.

Dock ordering took two attempts. openWindow appends to the dock (windowStore.ts:78), so for anyone with a saved layout the project window landed below Sessions. Re-docking it by index did not fix it, as a reviewer with an existing layout found: dockWindow returns early while enabledDockSides lacks the side, and that set is empty until the DockArea mounts and fills it — which has not happened when these windows open.

tangentProjectWindowOrder.ts now writes the order through restoreDockArea, which has no such guard. It takes a snapshot of the dock before any window opens, because once a window is open there is nothing to distinguish a newcomer from one the layout placed — both are simply sitting in windowOrder. Only ids missing from that snapshot are moved, each in front of the first window it should precede, so a stack someone rearranged keeps the order they gave it.

Testing

pnpm run validate clean; 3018 tests pass, 31 new.

Verified in a browser against the dev server (projects on):

session row /tangent/<id>?session=<sessionId>
New session /tangent/<id>?session=new
document row still previews in place, URL unchanged
session row no remove/delete button; other rows keep theirs
400px heading row wraps, no horizontal scroll

No page errors in any case.

Not exercised in a browser: everything inside Tangent — the Project window and its position, the header's icon/link/pencil, and the param actually selecting or starting a session — because Tangent is not configured locally and the page shows the unreachable box from #2760. Those have unit tests only; the ordering ones drive the real WindowStoreImpl through both a fresh browser and a saved layout that predates the window.

Pre-existing, not from this PR: at 400px the resources table's Name column collapses to nothing behind the fixed-width Added column, and the Runs table's headers overlap. Confirmed identical on the parent branch by screenshotting both. Happy to fix separately.

🤖 Generated with Claude Code

@camielvs
camielvs requested a review from a team as a code owner September 19, 2026 00:45
@github-actions

github-actions Bot commented Sep 19, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 09-18-feat_connect_the_project_page_and_tangent/5f534f6

camielvs commented Sep 19, 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.

@camielvs
camielvs marked this pull request as draft September 19, 2026 01:04
camielvs and others added 2 commits September 23, 2026 13:53
The two pages barely acknowledged each other. Tangent showed a bare
project name whose only action was to rename it, with no way back and
nothing about what the project is. The project page listed its sessions
as untitled rows that opened an empty preview, and could not start one.

Tangent gains a Project window above Sessions, an icon and a link to the
project's own page on its name, and a pencil for the rename that used to
happen by clicking the name itself.

The project page numbers its sessions the way Tangent does and sends a
row to the session it names. Starting one has to be asked of Tangent,
since a session can only be opened from inside its provider, so the
button travels there and says what it went for.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A session's row offered to take it back out of the project, which is not
a thing a session can do: like a run, a session that happened belongs to
the project it happened in. The row keeps its cell so the columns still
line up, and every other kind of resource keeps its own way out.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
camielvs and others added 2 commits September 23, 2026 13:53
A project's notes are the agent's instructions on the Tangent page: the
Resources window edits them under that name and a session opens with
them. The project window showed the same field again as Notes, which
made one field look like two.

The project's own page still keeps both, where notes are only notes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Opening a window appends it to the dock, so for anyone whose saved layout
predates the project window it turned up underneath everything. Docking it
again by index did not help: dockWindow does nothing until the side's DockArea
has mounted and enabled it, which has not happened yet when these windows open.

The order now goes through restoreDockArea, which has no such guard, and a
snapshot taken before any window opens says which ones the saved layout already
knew about. Only the newcomers are moved; a stack someone rearranged keeps the
order they gave it.

A session is started from New session, or in Tangent, never by adding one to a
list, so the Add menu no longer offers a disabled row saying otherwise.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@camielvs
camielvs force-pushed the 09-18-fix_keep_long_project_names_inside_their_tile branch from 1a65b63 to f01c58f Compare September 23, 2026 20:57
@camielvs
camielvs force-pushed the 09-18-feat_connect_the_project_page_and_tangent branch from 68939e0 to 5f534f6 Compare September 23, 2026 20:57

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