vole
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software:2222/vole.git
A free and open-source forge that lives in your Git repo.
Build out change review and threaded discussions
f6f4b1db24292d1df877680714952a9c568e2b78 · Keenan Nemetz · 15d ago · parent 564acd4b
Build out change review and threaded discussions - Add Conversation, Files and Runs tabs to change requests. Files uses the code-browser shape with a changed-file tree and one selected-file diff; Runs lists the head commit's workflow results. - Show anchored review comments beneath the line, with a collapsed excerpt read from the exact blob that was reviewed, and return posted anchors to their line note. - Add comment threads: any comment can be replied to, the UI flattens the descendants under one root, reply context links back to the parent, and reply targets feed a single composer at the foot of the discussion. - Collapse reply groups while keeping the root visible, and scroll to the composer when Reply is selected. - Add comment context menus with Reply, Copy text, Copy link, Edit and Delete. Add web edit/delete routes with author or admin checks; deletion leaves a tombstone so replies keep their thread. - Support --reply-to in the issue and change CLI commands, and treat a missing parent as a tombstone rather than an invalid tree. - Fix the diff comment gutter, action button colours, reply labels, and keep the Files tree and diff pane aligned. Update metadata validation, web templates, CSS, JavaScript, tests, and the CLI/change-request/issue docs.
server/web/templates/request_files.html +59
| @@ -0,0 +1,59 @@ | |||
| 1 | {{define "request_files"}} | ||
| 2 | {{template "header" .}} | ||
| 3 | {{template "repohead" (nav .Name "requests")}} | ||
| 4 | {{template "request_head" .}} | ||
| 5 | {{template "request_tabs" .}} | ||
| 6 | |||
| 7 | <div class="code-browser review-browser"> | ||
| 8 | <aside class="file-tree review-tree" id="review-tree" aria-label="Changed files"> | ||
| 9 | <div class="tree-head"> | ||
| 10 | <span>{{icon "file"}}Files</span> | ||
| 11 | <span class="muted">{{.FileCount}} changed</span> | ||
| 12 | </div> | ||
| 13 | {{if .Tree}} | ||
| 14 | <div class="tree-scroll">{{template "review_tree_nodes" (reviewTreeContext .Name .Request.ID .Tree)}}</div> | ||
| 15 | {{else}} | ||
| 16 | <p class="tree-empty muted">No changed files.</p> | ||
| 17 | {{end}} | ||
| 18 | </aside> | ||
| 19 | {{template "review_main" .Main}} | ||
| 20 | </div> | ||
| 21 | |||
| 22 | {{template "footer" .}} | ||
| 23 | {{end}} | ||
| 24 | |||
| 25 | {{define "review_tree_nodes"}} | ||
| 26 | <ul class="tree-list"> | ||
| 27 | {{range .Nodes}} | ||
| 28 | <li> | ||
| 29 | {{if eq .Type "tree"}} | ||
| 30 | <details class="tree-dir{{if .Active}} active{{end}}" data-path="{{.Path}}"{{if .Open}} open{{end}}> | ||
| 31 | <summary class="tree-row"> | ||
| 32 | <span class="tree-chevron">{{icon "chevron-right"}}</span> | ||
| 33 | <span class="tree-icon">{{icon "folder"}}</span> | ||
| 34 | <span class="tree-name" title="{{.Path}}">{{.Name}}</span> | ||
| 35 | </summary> | ||
| 36 | <div class="tree-children">{{template "review_tree_nodes" (reviewTreeContext $.Name $.RequestID .Children)}}</div> | ||
| 37 | </details> | ||
| 38 | {{else}} | ||
| 39 | <a class="tree-row tree-file{{if .Active}} active{{end}}" data-path="{{.Path}}" href="/r/{{$.Name}}/requests/{{$.RequestID}}/files/{{pathurl .Path}}" hx-get="/r/{{$.Name}}/requests/{{$.RequestID}}/files/{{pathurl .Path}}" hx-target="#review-main" hx-swap="outerHTML" hx-push-url="true" title="{{.Path}}"> | ||
| 40 | <span class="review-mark" data-status="{{.Status}}">{{.Status}}</span> | ||
| 41 | <span class="tree-name">{{.Name}}</span> | ||
| 42 | </a> | ||
| 43 | {{end}} | ||
| 44 | </li> | ||
| 45 | {{end}} | ||
| 46 | </ul> | ||
| 47 | {{end}} | ||
| 48 | |||
| 49 | {{define "review_main"}} | ||
| 50 | <section id="review-main" class="review-main" data-path="{{.Path}}"> | ||
| 51 | {{if .Files}} | ||
| 52 | {{template "diff" .}} | ||
| 53 | {{else if .AlreadyMerged}} | ||
| 54 | <p class="muted">Already merged into {{.Request.Base}}.</p> | ||
| 55 | {{else}} | ||
| 56 | <p class="muted">No changes, or the head is not reachable from this repository yet.</p> | ||
| 57 | {{end}} | ||
| 58 | </section> | ||
| 59 | {{end}} | ||