Add `permalinkPath` field to TreeType via TreePresenter
What does this MR do and why?
Related to: Provide `permalink_path` like functionality for... (#524081 - closed)
This merge request adds a permalinkPath field to the GraphQL TreeType, allowing the frontend to generate permalinks to specific commit versions of directories — just like the one we already have on each blob page.
It also introduces a TreePresenter to centralise decoration logic for trees, blobs, and submodules.
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
Run this query in your local host(http://127.0.0.1:3000/-/graphql-explorer)
query {
project(fullPath: "your-repository-path") {
repository {
paginatedTree(path: "the-dir-you-want-to-test", ref: "main") {
nodes {
__typename
permalinkPath
trees {
nodes {
name
}
}
}
}
}
}
}

