Monorepo for Tangled tangled.org
2

Configure Feed

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

appview/pages: surface jj change ids on commits

types.Commit already extracts the change-id commit header (written by
jj) on both the log and diff paths; this exposes it in the ui:

- commit lists (repo log, repo index): hovering the commit hash shows
the full change id as a tooltip
- commit page: full commit and parent hashes on their own line below
the commit meta, with the full change id underneath in
jj-conventional purple

author
Anirudh Oppiliappan
date (Jun 12, 2026, 4:26 PM +0300) commit 75b3402c parent b6af2285 change-id sntnrtyl
+74 -35
+7
appview/pages/funcmap.go
··· 104 104 } 105 105 return s[:30] + "…" 106 106 }, 107 + // short prefix of a commit hash or jj change id, safe on short input 108 + "shortId": func(s string) string { 109 + if len(s) <= 8 { 110 + return s 111 + } 112 + return s[:8] 113 + }, 107 114 "splitOn": func(s, sep string) []string { 108 115 return strings.Split(s, sep) 109 116 },
+59 -34
appview/pages/templates/repo/commit.html
··· 28 28 </div> 29 29 </div> 30 30 31 - <div class="flex flex-wrap items-center space-x-2 text-sm"> 32 - <p class="flex flex-wrap items-center gap-1 text-gray-500 dark:text-gray-300"> 33 - {{ template "attribution" . }} 31 + <div class="flex flex-col gap-2 text-sm pt-4"> 32 + {{ $showCommitter := ne $commit.Author.Email $commit.Committer.Email }} 33 + <div class="flex flex-col gap-1 font-mono text-gray-500 dark:text-gray-300"> 34 + <span class="inline-flex items-center flex-wrap"> 35 + <span class="w-24 text-gray-400 dark:text-gray-500 select-none">author</span> 36 + {{ template "attributedUser" (list $commit.Author.Email $commit.Author.Name $.EmailToDid) }} 37 + </span> 38 + 39 + {{ range $commit.CoAuthors }} 40 + <span class="inline-flex items-center flex-wrap"> 41 + <span class="w-24 text-gray-400 dark:text-gray-500 select-none">co-author</span> 42 + {{ template "attributedUser" (list .Email .Name $.EmailToDid) }} 43 + </span> 44 + {{ end }} 45 + 46 + {{ if $showCommitter }} 47 + <span class="inline-flex items-center flex-wrap"> 48 + <span class="w-24 text-gray-400 dark:text-gray-500 select-none">committer</span> 49 + {{ template "attributedUser" (list $commit.Committer.Email $commit.Committer.Name $.EmailToDid) }} 50 + </span> 51 + {{ end }} 52 + 53 + <span class="inline-flex items-center flex-wrap"> 54 + <span class="w-24 text-gray-400 dark:text-gray-500 select-none">date</span> 55 + <span class="inline-flex items-center flex-wrap gap-1"> 56 + {{ template "repo/fragments/time" $commit.Committer.When }} 57 + <span class="text-gray-500 dark:text-gray-400">({{ $commit.Committer.When | longTimeFmt }})</span> 58 + </span> 59 + </span> 34 60 35 - <span class="px-1 select-none before:content-['\00B7']"></span> 36 - <span class="inline-flex flex-wrap items-center gap-1"> 37 - {{ template "repo/fragments/time" $commit.Committer.When }} 38 - <span class="text-gray-500 dark:text-gray-400">({{ $commit.Committer.When | longTimeFmt }})</span> 39 - </span> 40 - <span class="px-1 select-none before:content-['\00B7']"></span> 61 + <span class="inline-flex items-center flex-wrap"> 62 + <span class="w-24 text-gray-400 dark:text-gray-500 select-none">commit</span> 63 + <a href="/{{ $repo }}/commit/{{ $commit.This }}" class="no-underline hover:underline break-all"> 64 + <span class="md:hidden">{{ shortId $commit.This }}</span> 65 + <span class="hidden md:inline">{{ $commit.This }}</span> 66 + </a> 67 + </span> 41 68 42 - <a href="/{{ $repo }}/commit/{{ $commit.This }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ slice $commit.This 0 8 }}</a> 69 + {{ if $commit.Parent }} 70 + <span class="inline-flex items-center flex-wrap"> 71 + <span class="w-24 text-gray-400 dark:text-gray-500 select-none">parent</span> 72 + <a href="/{{ $repo }}/commit/{{ $commit.Parent }}" class="no-underline hover:underline break-all"> 73 + <span class="md:hidden">{{ shortId $commit.Parent }}</span> 74 + <span class="hidden md:inline">{{ $commit.Parent }}</span> 75 + </a> 76 + </span> 77 + {{ end }} 43 78 44 - {{ if $commit.Parent }} 45 - {{ i "arrow-left" "w-3 h-3 mx-1" }} 46 - <a href="/{{ $repo }}/commit/{{ $commit.Parent }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ slice $commit.Parent 0 8 }}</a> 47 - {{ end }} 48 - </p> 79 + {{ if $commit.ChangeId }} 80 + <span class="inline-flex items-center flex-wrap"> 81 + <span class="w-24 text-gray-400 dark:text-gray-500 select-none">change-id</span> 82 + <span class="break-all"> 83 + <span class="md:hidden">{{ shortId $commit.ChangeId }}</span> 84 + <span class="hidden md:inline">{{ $commit.ChangeId }}</span> 85 + </span> 86 + </span> 87 + {{ end }} 88 + </div> 49 89 90 + {{ if or (.VerifiedCommit.IsVerified $commit.This) $.Pipeline }} 91 + <div class="flex flex-wrap items-center space-x-2"> 50 92 {{ if .VerifiedCommit.IsVerified $commit.This }} 51 93 <div class="group relative inline-block text-sm"> 52 94 <div class="bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 px-2 py-1 rounded cursor-pointer"> ··· 75 117 {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" $.Pipeline "RepoInfo" $.RepoInfo) }} 76 118 {{ end }} 77 119 </div> 120 + </div> 121 + {{ end }} 78 122 </div> 79 123 80 124 </section> 81 125 {{end}} 82 126 83 - {{ define "attribution" }} 84 - {{ $commit := .Diff.Commit }} 85 - {{ $showCommitter := true }} 86 - {{ if eq $commit.Author.Email $commit.Committer.Email }} 87 - {{ $showCommitter = false }} 88 - {{ end }} 89 - 90 - {{ if $showCommitter }} 91 - <span>authored by</span> {{ template "attributedUser" (list $commit.Author.Email $commit.Author.Name $.EmailToDid) }} 92 - {{ range $commit.CoAuthors }} 93 - {{ template "attributedUser" (list .Email .Name $.EmailToDid) }} 94 - {{ end }} 95 - <span>and committed by</span> {{ template "attributedUser" (list $commit.Committer.Email $commit.Committer.Name $.EmailToDid) }} 96 - {{ else }} 97 - {{ template "attributedUser" (list $commit.Author.Email $commit.Author.Name $.EmailToDid )}} 98 - {{ end }} 99 - {{ end }} 100 - 101 127 {{ define "attributedUser" }} 102 128 {{ $email := index . 0 }} 103 129 {{ $name := index . 1 }} ··· 129 155 {{ define "contentAfter" }} 130 156 {{ template "repo/fragments/diff" (list .Diff .DiffOpts) }} 131 157 {{end}} 132 -
+1
appview/pages/templates/repo/index.html
··· 213 213 {{ end }} 214 214 <span class="font-mono"> 215 215 <a href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash.String }}" 216 + {{ if .ChangeId }}title="jj change id: {{ .ChangeId }}"{{ end }} 216 217 class="no-underline hover:underline {{ $hashStyle }} px-2 py-1 rounded flex items-center gap-2"> 217 218 {{ slice .Hash.String 0 8 }} 218 219 {{ if $verified }}
+4 -1
appview/pages/templates/repo/log.html
··· 34 34 {{ if $verified }} 35 35 {{ $hashStyle = "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 px-2 rounded" }} 36 36 {{ end }} 37 - <a href="/{{ $.RepoInfo.FullName }}/commit/{{ $commit.Hash.String }}" class="no-underline hover:underline {{ $hashStyle }} px-2 py-1/2 rounded flex items-center gap-2"> 37 + <a href="/{{ $.RepoInfo.FullName }}/commit/{{ $commit.Hash.String }}" 38 + {{ if $commit.ChangeId }}title="jj change id: {{ $commit.ChangeId }}"{{ end }} 39 + class="no-underline hover:underline {{ $hashStyle }} px-2 py-1/2 rounded flex items-center gap-2"> 38 40 {{ slice $commit.Hash.String 0 8 }} 39 41 {{ if $verified }} 40 42 {{ i "shield-check" "w-4 h-4" }} ··· 140 142 {{ end }} 141 143 <span class="font-mono"> 142 144 <a href="/{{ $.RepoInfo.FullName }}/commit/{{ $commit.Hash.String }}" 145 + {{ if $commit.ChangeId }}title="jj change id: {{ $commit.ChangeId }}"{{ end }} 143 146 class="no-underline hover:underline {{ $hashStyle }} px-2 py-1 rounded flex items-center gap-2"> 144 147 {{ slice $commit.Hash.String 0 8 }} 145 148 {{ if $verified }}
+3
flake.nix
··· 320 320 rootDir=$(jj --ignore-working-copy root || git rev-parse --show-toplevel) || (echo "error: can't find repo root?"; exit 1) 321 321 cd "$rootDir" 322 322 323 + # Reset TMPDIR in case it points to a stale nix-shell temp dir 324 + export TMPDIR=/tmp 325 + 323 326 mkdir -p nix/vm-data/{knot,repos,spindle,spindle-logs} 324 327 325 328 export TANGLED_VM_DATA_DIR="$rootDir/nix/vm-data"