Skip to content

feat(projects): show a project's documents on both pages - #2774

Draft
camielvs wants to merge 1 commit into
09-21-fix_share_a_project_and_honour_a_new_session_linkfrom
09-21-feat_documents_on_both_pages
Draft

camielvs wants to merge 1 commit into
09-21-fix_share_a_project_and_honour_a_new_session_linkfrom
09-21-feat_documents_on_both_pages

Conversation

@camielvs

@camielvs camielvs commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Third of the standardization PRs. A document written on the project page was invisible in Tangent, and Tangent could not write one at all — each half of a project held things the other could not see.

What a document is now

{ type: "document" }          // payload: { content: "…" }

Documents say what they are, alongside the pipelines and runs #2765 already marked, so listing by kind is one rule rather than a rule plus the rows that fall outside it.

A document records no identity, which is the one place it differs from every other row. It carries its own body and points at nothing: the row is the document, and the row's own id is what addresses it. That id does not exist until the row does, so the identity cannot be written at creation time — ResourcesWindowContent derives document://id/<rowId> when it lists one, and document joins the target grammar as an id-only kind.

Both pages

  • Tangent can write one. "Add a document" joins the resource menu, using the project page's own form — extracted to DocumentForm so the wording, validation and trimming cannot drift apart between the two dialogs.
  • Tangent can show one. A document workarea kind renders payload.content read-only through CodeViewer, highlighted by whatever the author called the document (notes.md → markdown, anything unrecognised → plain text). languageFor moves next to the viewer it feeds now that two callers want it.
  • The project page is unchanged to look at — its preview already rendered payload.content, and now it renders Tangent's documents too.

Testing

pnpm run validate and npx vitest run green (3065 tests). New: the document kind's four render cases, the resources window's listing and filtering, and the descriptor and grammar additions.

Verified in a browser, both directions:

written in listed on the other page opens there
Tangent Model card · Document on the project page body previewed
project page Written on the project page · Document in Tangent read-only tab

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 09-21-feat_documents_on_both_pages/3424b58

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

A document written on the project page was invisible in Tangent, and
Tangent could not write one at all. The two halves of one project each held
things the other could not see.

Documents now say what they are — `type: "document"` alongside the pipelines
and runs already marked — so listing by kind is one rule rather than a rule
plus the rows that fall outside it. A document carries its own body and
points at nothing, so it records no identity: the row is the document, and
the row's own id is what addresses it, which is also why the identity cannot
be written at creation time.

Tangent gains the same form the project page uses, extracted so the wording,
validation and trimming cannot drift apart, and a workarea kind that shows
the body read-only, highlighted by whatever the author called it. The
language guess moves next to the viewer it feeds, since two callers now want
it.

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