Monorepo for Tangled tangled.org
2

Configure Feed

Select the types of activity you want to include in your feed.

appview/pages: UrlBase for implicit project user in links

Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>

author
Anirudh Oppiliappan
date (Jun 24, 2026, 5:15 PM +0530) commit 22321aa5 parent 7faeb2aa change-id ooqqlmqz
+20 -7
+2 -2
appview/pages/markup/markdown.go
··· 253 253 254 254 actualPath := rctx.actualPath(dst) 255 255 256 - newPath := path.Join("/", rctx.RepoInfo.FullName(), "tree", rctx.RepoInfo.Ref, actualPath) 256 + newPath := path.Join("/", rctx.RepoInfo.UrlBase(), "tree", rctx.RepoInfo.Ref, actualPath) 257 257 link.Destination = []byte(newPath) 258 258 } 259 259 ··· 264 264 265 265 actualPath := rctx.actualPath(dst) 266 266 267 - newDest := path.Join("/", rctx.RepoInfo.FullName(), "raw", rctx.RepoInfo.Ref, actualPath) 267 + newDest := path.Join("/", rctx.RepoInfo.UrlBase(), "raw", rctx.RepoInfo.Ref, actualPath) 268 268 return newDest 269 269 } 270 270
+11
appview/pages/repoinfo/repoinfo.go
··· 30 30 return path.Join(r.owner(), r.Slug()) 31 31 } 32 32 33 + // UrlBase returns the URL prefix used to build intra-repo links. 34 + // In project mode the owner is implicit so only the rkey is needed; 35 + // otherwise it returns the full owner/rkey path. 36 + func (r RepoInfo) UrlBase() string { 37 + if r.ProjectMode { 38 + return r.Rkey 39 + } 40 + return r.FullName() 41 + } 42 + 33 43 func (r RepoInfo) RepoIdentifier() string { 34 44 if r.RepoDid != "" { 35 45 return r.RepoDid ··· 74 84 OwnerDid string 75 85 OwnerHandle string 76 86 RepoDid string 87 + ProjectMode bool 77 88 Description string 78 89 Website string 79 90 Topics []string
+2 -2
appview/pages/templates/layouts/repobase.html
··· 30 30 {{ $icon := index $item 2 }} 31 31 {{ $meta := index $tabmeta $key }} 32 32 <a 33 - href="/{{ $.RepoInfo.FullName }}{{ $value }}" 33 + href="/{{ $.RepoInfo.UrlBase }}{{ $value }}" 34 34 class="relative -mr-px group no-underline hover:no-underline" 35 35 hx-boost="true" 36 36 > ··· 68 68 <div class="flex items-center gap-2 flex-wrap text-lg"> 69 69 {{ template "user/fragments/picHandleLink" .RepoInfo.OwnerDid }} 70 70 <span class="select-none">/</span> 71 - <a href="/{{ .RepoInfo.FullName }}" class="font-bold">{{ .RepoInfo.Name }}</a> 71 + <a href="/{{ .RepoInfo.UrlBase }}" class="font-bold">{{ .RepoInfo.Name }}</a> 72 72 </div> 73 73 {{ end }} 74 74
+1 -1
appview/pages/templates/repo/settings/fragments/sidebar.html
··· 4 4 {{ $activeTab := "bg-white dark:bg-gray-700 drop-shadow-sm" }} 5 5 {{ $inactiveTab := "bg-gray-100 dark:bg-gray-800" }} 6 6 {{ range const.RepoSettingsTabs }} 7 - <a href="/{{ $.RepoInfo.FullName }}/settings?tab={{.Name}}" class="no-underline hover:no-underline hover:bg-gray-100/25 hover:dark:bg-gray-700/25"> 7 + <a href="/{{ $.RepoInfo.UrlBase }}/settings?tab={{.Name}}" class="no-underline hover:no-underline hover:bg-gray-100/25 hover:dark:bg-gray-700/25"> 8 8 <div class="flex gap-3 items-center p-2 {{ if eq .Name $active }} {{ $activeTab }} {{ else }} {{ $inactiveTab }} {{ end }}"> 9 9 {{ i .Icon "size-4" }} 10 10 {{ .Label }}
+2 -2
appview/pulls/compose.go
··· 182 182 } 183 183 184 184 func composeCanonicalURL(params pages.RepoNewPullParams) string { 185 - base := fmt.Sprintf("/%s/pulls/new", params.RepoInfo.FullName()) 185 + base := fmt.Sprintf("/%s/pulls/new", params.RepoInfo.UrlBase()) 186 186 q := url.Values{} 187 187 if params.IsStacked { 188 188 q.Set("mode", "stack") ··· 264 264 265 265 mergeCheck := s.composeMergeCheck(r.Context(), repo, targetBranch, comparison) 266 266 267 - refreshUrl := fmt.Sprintf("/%s/pulls/new/refresh", repoInfo.FullName()) 267 + refreshUrl := fmt.Sprintf("/%s/pulls/new/refresh", repoInfo.UrlBase()) 268 268 var diffOpts types.DiffOpts 269 269 if r.FormValue("diff") == "split" { 270 270 diffOpts.Split = true
+1
appview/pulls/single.go
··· 7 7 8 8 "tangled.org/core/api/tangled" 9 9 "tangled.org/core/appview/db" 10 + 10 11 "tangled.org/core/appview/models" 11 12 "tangled.org/core/appview/pages" 12 13 "tangled.org/core/appview/xrpcclient"
+1
appview/reporesolver/resolver.go
··· 151 151 RepoDid: repo.RepoDid, 152 152 Name: repo.Name, 153 153 Rkey: repo.Rkey, 154 + ProjectMode: rr.config.Project.Enabled, 154 155 Description: repo.Description, 155 156 Website: repo.Website, 156 157 Topics: repo.Topics,